通过批处理脚本自动执行 adb 命令
Automating adb commands via batch script
有没有办法通过 windows 运行 adb shell 命令?
我想要运行一个像这样的批处理脚本
adb shell
mount -o rw,remount /system
exit
当前,当我 运行 批处理脚本时,它仅 运行 第一个命令 adb shell
其他方法也可以
问题在于 adb shell
从标准输入(例如键盘)获取输入,因此它看不到后续命令。相反,一旦 adb
退出,这些将 运行 在您的本地计算机上。
adb shell
takes a shell command as its argument,所以你应该可以做到:
adb shell "mount -o rw,remount /system"
在这种情况下,最后的 exit
是不必要的,因为 adb
在命令完成后立即退出。
有没有办法通过 windows 运行 adb shell 命令?
我想要运行一个像这样的批处理脚本
adb shell
mount -o rw,remount /system
exit
当前,当我 运行 批处理脚本时,它仅 运行 第一个命令 adb shell
其他方法也可以
问题在于 adb shell
从标准输入(例如键盘)获取输入,因此它看不到后续命令。相反,一旦 adb
退出,这些将 运行 在您的本地计算机上。
adb shell
takes a shell command as its argument,所以你应该可以做到:
adb shell "mount -o rw,remount /system"
在这种情况下,最后的 exit
是不必要的,因为 adb
在命令完成后立即退出。