自动脚本启动和关闭安卓应用

1 阅读1分钟

1、环境变量要配置 adb

2、windows脚本命令 -- start.bat

@echo off
:loop
adb shell am start -n 应用包名(com.example.helloworld)/应用启动页面路径(com.example.helloworld.start.SplashActivity)
::
ping -n 10 127.0.0.1 >nul
adb shell am force-stop com.example.helloworld
::
ping -n 10 127.0.0.1 >nul
goto loop

如果需要别的平台的脚本,让ai帮你改一下