@echo off setlocal adb root rem Set package name set packageName=com.pateo.platformoversea rem Get PID of the package for /f "tokens=2" %%a in ('adb shell ps ^| findstr %packageName%') do set pid=%%a rem Check if PID was found if "%pid%"=="" ( echo Failed to find PID for package %packageName% exit /b 1 ) rem Get current time for /f "tokens=1-4 delims=:. " %%i in ("%time%") do set hh=%%i& set mn=%%j& set ss=%%k& set ms=%%l set timestamp=%hh%%mn%%ss% rem Run debuggerd and output to local file adb shell debuggerd -b %pid% > debuggerd_output_%timestamp%_%pid%.txt echo Output saved to debuggerd_output_%packageName%_%timestamp%.txt