因特尔同事写的简单的adb 自动化测试命令
touch.sh
adb shell input 命令可参考:http://www.w3c.com.cn/android%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95-input
#!/system/bin/sh
:hello
#ping 123.45.67.89 -n 1 -w 2000> nul //模拟停2000ms
#adb shell input keyevent 26 //电源键(power)
#adb shell input keyevent 82 //解锁
adb shell input tap 110 311 //触屏坐标
ping 123.45.67.89 -n 1 -w 2000> nul
adb shell input text a //输入a
adb shell input tap 907 225
ping 123.45.67.89 -n 1 -w 2000> nul
adb shell input text b
adb shell input keyevent 26
adb shell input keyevent 26
ping 123.45.67.89 -n 1 -w 20> nul
adb shell input keyevent 82
goto hello
ping 123.45.67.89 -n 1 -w 20> nul
adb shell input keyevent 82
goto hello