2015-09-18 140 views
-1

有没有办法通过windows运行adb shell命令?通过批处理脚本自动执行adb命令

我想运行一个批处理脚本,如本

adb shell 
mount -o rw,remount /system 
exit 

目前,当我运行该批处理脚本它只能运行在第一个命令adb shell

任何其他的方法是罚款也

回答

1

问题是adb shell从标准输入(例如键盘)输入它的输入,所以它不会看到后续的命令。相反,只要adb退出,这些将在您的本地机器上运行。

adb shelltakes a shell command as its argument,所以你应该能够做到:

adb shell "mount -o rw,remount /system" 

最后exit在这种情况下没有必要的,因为adb出口一旦命令完成。

相关问题