From d7750b722081d04709b933b1f78c8c8267c1b6e3 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Mon, 11 Dec 2023 20:32:33 +0800 Subject: [PATCH] uiautomator dump to /data/local/tmp --- scripts/avd_test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/avd_test.sh b/scripts/avd_test.sh index 20026b5ac..6bc9ff9b8 100755 --- a/scripts/avd_test.sh +++ b/scripts/avd_test.sh @@ -150,10 +150,13 @@ test_emu() { # Try to launch LSPosed if [ $api -ge $lsposed_min_api -a $api -le $atd_max_api ]; then + adb shell rm -f /data/local/tmp/window_dump.xml adb shell am start -c org.lsposed.manager.LAUNCH_MANAGER com.android.shell/.BugreportWarningActivity - sleep 10 - adb shell uiautomator dump - adb shell grep -q org.lsposed.manager /sdcard/window_dump.xml + while adb shell '[ ! -f /data/local/tmp/window_dump.xml ]'; do + sleep 10 + adb shell uiautomator dump /data/local/tmp/window_dump.xml + done + adb shell grep -q org.lsposed.manager /data/local/tmp/window_dump.xml fi }