Search code examples
androidbatch-fileadbpull

How can I pull a file in /data/data/ from a rooted android device in one click using a windows' .bat file?


I wrote the following .bat file, but it did not work for me. Could anybody help me?

adb shell
su
cd /data/data
cp -r com.example.myapp /sdcard
exit
adb pull /sdcard/com.example.myapp

The .bat stop in the first command and did not go ahead. Just as this snapshot show. I would be greatly appreciated if someone could help me.


Solution

  • You can run adb as root

    adb root
    

    then you can just do

    adb pull /data/data/com.example.myapp/ .