@echo off
::1.获取最开始的文件夹路径
set "Start_BT=%~dp0"
for /f %%A in ('powershell -Command "Get-Date -Format yyyy_MMdd_HHmmss"') do set "timestamp=%%A"
echo Timestamp: %timestamp%
title Set_Debug_Set_HCI_LOG%timestamp%
::打开工程模式
adb shell am start -n 工程模式包名/工程模式包名.MainActivity&
::4.获取root权限
:retry
adb root
if %errorlevel% neq 0 (
echo adb root failed. Retrying...
goto retry
)
echo Congratulations To Adb Root For His Success....
::................start................
::设置debug模式
:Set_DEBUG
adb shell setprop persist.log.tag DEBUG
if %errorlevel% neq 0 (
echo Set_DEBUG Failed. Set_DEBUG...
goto Set_DEBUG
)
::重启工程模式
adb shell am force-stop 工程模式包名
adb shell am start -n 工程模式包名/工程模式包名.MainActivity&
timeout /nobreak /t 1
adb shell input tap 216 413
::................end................
cls
timeout /nobreak /t 4
adb shell am force-stop 工程模式包名
exit