Skip to content Skip to sidebar Skip to footer

Running Multiple Adb Commands With Python Popen Or Os.system

One problem with ADB is that you need multiple commands to get things done. For example: adb shell su cp /data/local/x /data/local/y exit adb pull /data/local/y Can this be d

Solution 1:

You can simply do:

adb shell su -c cp /data/local/x /data/local/y
adb pull /data/local/y

or, if you want to run more than one command (only Linux & OSX):

adb shell <<EOF
ls
date
cat /proc/version
exit
EOF

Post a Comment for "Running Multiple Adb Commands With Python Popen Or Os.system"