Need one-line adb shell su push & pull to access /data from Windows batch file I wrote a Windows batch file that replaces Amazon lockscreen ads with user images on rooted kindle fire hd 7&quot;, 2013 (kfsowi). Just learned I botched the adb commands because I was running &quot;adb insecure&quot; so was getting su access without writing it into the adb commands.
What I need: To run in batch file, I need one-line adb shell su commands to pull from/push to /data on this device. (Or I could use adb -d shell su -c &quot;mount -o remount rw, /data on one line followed by the pull or push)
I have fixed an ls command like this:

this worked with adb insecure: adb ls &quot;/data/securedStorageLocation&quot;
what I needed was: adb shell su -c &quot;ls ./data/securedStorageLocation&quot;

Now I need same for pull and push. The problem:

With adb insecure, this works fine: adb pull &quot;/data/securedStorageLocation&quot; &quot;C:/destination&quot;
Without adb insecure I get: remote object '/data/securedStorageLocation/' does not exist

Above happens even if I first run: adb -d shell su -c &quot;mount -o remount rw, /data
Can someone tell me how to do the pull and push with adb shell and su?
EDIT: adb root command doesn't gain root on this device
Well, you have to do a few commands, as I don't believe it will work in one.

You need to do:


adb shell
su
cd /data/path/of/file
cp /data/path/of/file/copyme /data/local/tmp
chown shell.shell /data/local/tmp/copyme
exit
exit
adb pull /data/local/tmp/copyme /destination/copyme


This works for me every time.