进行ADB批处理[ADB Shell停止问题] [英] Making an ADB batch [ADB shell stopping issue]
本文介绍了进行ADB批处理[ADB Shell停止问题]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我要执行的操作的想法,只需执行以下命令,而是在行 adb shell停止后立即执行,无论其他命令都无法触发。
This is my idea of what I want to do, simply execute the following commands but instead right after the line "adb shell" it stops, no other command can be triggered, whatever it is.
adb connect 192.168.1.101:5555
adb shell
su
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shm
PAUSE
reboot
推荐答案
adb shell
单独使用命令而没有任何额外的参数将以 interactive 模式启动外壳。意味着它就坐在那里无限期地等待用户输入。您的脚本永远不会越过这一行。
adb shell
command alone with out any extra parameters starts the shell in the interactive mode. Meaning it just sits there waiting for user input indefinitely. Your script never gets past that line.
您真正想要的是:
adb connect 192.168.1.101:5555
adb shell su 0 rm /data/system/locksettings.db
adb shell su 0 rm /data/system/locksettings.db-wal
adb shell su 0 rm /data/system/locksettings.db-shm
PAUSE
adb reboot
这篇关于进行ADB批处理[ADB Shell停止问题]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文