安卓终端,模拟用户按键开关机

发布时间 2023-12-27 16:46:58作者: 老坛刘肉

@echo off
color 2
set num=0
:Loop
echo startCal..
set /a num += 1
echo checkDeviceStatus
adb wait-for-device
echo longpress
adb shell input keyevent --longpress 26
ping -n 3 127.0.0.1 >nul 2>nul
echo restart
adb shell input tap 1066 477
echo waitting
ping -n 35 127.0.0.1 >nul 2>nul
echo.ThisIsALoop,AlreadyRun %num% times
if "%num%" == "200" echo.Finished!&&pause
goto Loop