Prashant Mishra Prashant Mishra - 1 year ago 151
Bash Question

Batch script for adb commands

i am writing batch script for executing adb commands but while executing "SU" commands only the first commands runs "adb shell" and stops
as the script is typing all the commands very fast and not waiting for previous command to run completely so that next command can be entered into the shell window that is "su" example of code is below

adb shell
rm /data/system/gesture.key
rm /data/system/*.key
goto menu4

i also tried

adb shell & su

but still same Result

shell@Samsung_s4:/ $

please help

Answer Source

Please try

adb shell "su -c 'rm /data/system/gesture.key'"
adb shell "su -c 'rm /data/system/*.key'"

and see the question in How to use su command over adb shell?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download