@echo off
setlocal
cd /d "%~dp0"
set "ADB=%LOCALAPPDATA%\Android\Sdk\platform-tools\adb.exe"
if not exist "%ADB%" set "ADB=adb"
set "OUT=ITHAKI_V249472_TRANSLATION_BIL_FEED_AUDIO_LOG"
if exist "%OUT%" rmdir /s /q "%OUT%"
mkdir "%OUT%"
"%ADB%" shell dumpsys package com.okithaki.autoapp > "%OUT%\PACKAGE.txt"
"%ADB%" shell dumpsys notification --noredact > "%OUT%\NOTIFICATIONS.txt"
"%ADB%" logcat -c
"%ADB%" shell am force-stop com.okithaki.autoapp
"%ADB%" shell monkey -p com.okithaki.autoapp -c android.intent.category.LAUNCHER 1
ping 127.0.0.1 -n 16 >nul
"%ADB%" logcat -d -v threadtime > "%OUT%\LOGCAT.txt"
"%ADB%" exec-out screencap -p > "%OUT%\SCREEN_HOME.png"
"%ADB%" shell uiautomator dump /sdcard/ithaki_v249472.xml >nul
"%ADB%" pull /sdcard/ithaki_v249472.xml "%OUT%\SCREEN_UI.xml" >nul
echo LOG_READY=%OUT%
pause
