I need to be able to run the following commands on a rooted Android phone connected to my PC:
su
mount -o rw,remount /system
chmod 777 /system/app/
exit
exit
And then I need to execute the following command on my PC:
adb push ..\bin\MyApp_signed.apk /system/app/
And finally, I need to do some clean up and reboot the phone:
su
chmod 755 /system/app/
reboot
exit
exit
How can I create a windows batch file so that those shell commands are passed to the android shell?
adb shell <command>allows you to run a shell command on the device from your computer. If yoursucommand supports the-coption, you can do this:If your
sucommand doesn’t support commands, you could make a script to leave on the device that bundles the device side of it.