@@ -91,80 +91,66 @@ jobs:
9191 adb shell pm grant com.scisammy.ubuntuandroid android.permission.READ_EXTERNAL_STORAGE || true
9292 adb shell pm grant com.scisammy.ubuntuandroid android.permission.WRITE_EXTERNAL_STORAGE || true
9393
94+ echo "=== Clearing app data for fresh start ==="
95+ adb shell pm clear com.scisammy.ubuntuandroid || true
96+ sleep 2
97+
98+ echo "=== Granting permissions again after clear ==="
99+ adb shell pm grant com.scisammy.ubuntuandroid android.permission.READ_EXTERNAL_STORAGE || true
100+ adb shell pm grant com.scisammy.ubuntuandroid android.permission.WRITE_EXTERNAL_STORAGE || true
101+
94102 echo "=== Clearing logcat ==="
95103 adb logcat -c || true
96104
97- echo "=== Launching app ==="
105+ echo "=== Launching app (debug auto-start will select Ubuntu) ==="
98106 adb shell am start -W -n com.scisammy.ubuntuandroid/tech.ula.MainActivity || true
99- sleep 10
100-
101- echo "=== UI after launch ==="
102- adb shell uiautomator dump /sdcard/ui1.xml || true
103- adb pull /sdcard/ui1.xml /tmp/ui1.xml || true
104-
105- echo "=== Dismiss error dialog ==="
106- adb shell input tap 278 143 || true
107- sleep 3
108-
109- echo "=== Tap Ubuntu ==="
110- adb shell input tap 540 496 || true
111- sleep 5
112-
113- echo "=== UI after Ubuntu tap ==="
114- adb shell uiautomator dump /sdcard/ui2.xml || true
115- adb pull /sdcard/ui2.xml /tmp/ui2.xml || true
116-
117- echo "=== Enter credentials ==="
118- adb shell input tap 540 909 || true
119- sleep 1
120- adb shell input text "user" || true
121- adb shell input keyevent 61 || true
122- sleep 0.5
123- adb shell input text "password" || true
124- adb shell input keyevent 61 || true
125- sleep 0.5
126- adb shell input text "password" || true
127- sleep 1
128- adb shell input tap 854 1113 || true
129- sleep 5
130-
131- echo "=== UI after credentials ==="
132- adb shell uiautomator dump /sdcard/ui3.xml || true
133- adb pull /sdcard/ui3.xml /tmp/ui3.xml || true
134-
135- echo "=== Select SSH ==="
136- adb shell uiautomator dump /sdcard/ui3b.xml || true
137- adb pull /sdcard/ui3b.xml /tmp/ui3b.xml || true
138- sleep 2
139107
140- echo "=== UI after SSH ==="
141- adb shell uiautomator dump /sdcard/ui4.xml || true
142- adb pull /sdcard/ui4.xml /tmp/ui4.xml || true
143-
144- echo "=== Waiting for download ==="
145- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_1.xml && adb pull /sdcard/ui_check_1.xml /tmp/ui_check_1.xml || true
146- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_2.xml && adb pull /sdcard/ui_check_2.xml /tmp/ui_check_2.xml || true
147- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_3.xml && adb pull /sdcard/ui_check_3.xml /tmp/ui_check_3.xml || true
148- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_4.xml && adb pull /sdcard/ui_check_4.xml /tmp/ui_check_4.xml || true
149- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_5.xml && adb pull /sdcard/ui_check_5.xml /tmp/ui_check_5.xml || true
150- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_6.xml && adb pull /sdcard/ui_check_6.xml /tmp/ui_check_6.xml || true
151- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_7.xml && adb pull /sdcard/ui_check_7.xml /tmp/ui_check_7.xml || true
152- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_8.xml && adb pull /sdcard/ui_check_8.xml /tmp/ui_check_8.xml || true
153- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_9.xml && adb pull /sdcard/ui_check_9.xml /tmp/ui_check_9.xml || true
154- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_10.xml && adb pull /sdcard/ui_check_10.xml /tmp/ui_check_10.xml || true
155- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_11.xml && adb pull /sdcard/ui_check_11.xml /tmp/ui_check_11.xml || true
156- sleep 15 && adb shell uiautomator dump /sdcard/ui_check_12.xml && adb pull /sdcard/ui_check_12.xml /tmp/ui_check_12.xml || true
157-
158- echo "=== Final UI ==="
159- adb shell uiautomator dump /sdcard/ui_final.xml || true
160- adb pull /sdcard/ui_final.xml /tmp/ui_final.xml || true
161-
162- echo "=== Logcat ula ==="
163- adb logcat -d | grep -i -E "tech.ula|ServerService|LocalServer|MissingExec|FailedExec|startSSH|execInProot|proot|busybox|setupLinks|UlaApp|FATAL|AndroidRuntime" > /tmp/logcat_filtered.txt || true
108+ echo "=== Waiting 30s for app init and auto-start ==="
109+ sleep 30
110+
111+ echo "=== UI dump after 30s ==="
112+ adb shell uiautomator dump /sdcard/ui_30s.xml || true
113+ adb pull /sdcard/ui_30s.xml /tmp/ui_30s.xml || true
114+
115+ echo "=== Logcat after 30s ==="
116+ adb logcat -d > /tmp/logcat_30s.txt || true
117+
118+ echo "=== Waiting 60s more (download/setup progress) ==="
119+ sleep 60
120+
121+ echo "=== UI dump after 90s ==="
122+ adb shell uiautomator dump /sdcard/ui_90s.xml || true
123+ adb pull /sdcard/ui_90s.xml /tmp/ui_90s.xml || true
124+
125+ echo "=== Logcat after 90s ==="
126+ adb logcat -d > /tmp/logcat_90s.txt || true
127+
128+ echo "=== Waiting 120s more ==="
129+ sleep 120
130+
131+ echo "=== UI dump after 210s ==="
132+ adb shell uiautomator dump /sdcard/ui_210s.xml || true
133+ adb pull /sdcard/ui_210s.xml /tmp/ui_210s.xml || true
134+
135+ echo "=== Logcat after 210s ==="
136+ adb logcat -d > /tmp/logcat_210s.txt || true
137+
138+ echo "=== Waiting 180s more (long wait for extraction/server start) ==="
139+ sleep 180
140+
141+ echo "=== UI dump after 390s ==="
142+ adb shell uiautomator dump /sdcard/ui_390s.xml || true
143+ adb pull /sdcard/ui_390s.xml /tmp/ui_390s.xml || true
164144
165145 echo "=== Processes ==="
166146 adb shell ps -A > /tmp/ps_output.txt || true
167147
148+ echo "=== Logcat ula filtered ==="
149+ adb logcat -d | grep -i -E "tech.ula|ServerService|LocalServer|MissingExec|FailedExec|startSSH|execInProot|proot|busybox|setupLinks|UlaApp|FATAL|AndroidRuntime|DEBUG" > /tmp/logcat_filtered.txt || true
150+
151+ echo "=== Full logcat ==="
152+ adb logcat -d > /tmp/logcat_full.txt || true
153+
168154 echo "=== Screenshot ==="
169155 adb shell screencap -p /sdcard/screen.png || true
170156 adb pull /sdcard/screen.png /tmp/screen.png || true
@@ -177,8 +163,12 @@ jobs:
177163 with :
178164 name : test-results
179165 path : |
180- /tmp/ui *.xml
166+ /tmp/ui_ *.xml
181167 /tmp/screen.png
182168 /tmp/logcat_filtered.txt
169+ /tmp/logcat_full.txt
170+ /tmp/logcat_30s.txt
171+ /tmp/logcat_90s.txt
172+ /tmp/logcat_210s.txt
183173 /tmp/ps_output.txt
184174 if-no-files-found : ignore
0 commit comments