diff --git a/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt b/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt index bde1cb7b..317cc1da 100644 --- a/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt +++ b/android/app/src/main/java/tv/orbit/classic/DirectorChair.kt @@ -410,7 +410,7 @@ internal fun DirectorChair(load: (DirectorMode) -> DeskReport?, first: FocusRequ var lesson by remember { mutableStateOf(null) } var eventOpen by remember { mutableStateOf(null) } val scope = rememberCoroutineScope() - LaunchedEffect(mode, version) { withContext(Dispatchers.Default) { runCatching { load(mode) }.getOrNull() }?.let { report = it; OrbitTiming.ready("Director's Chair") } } + LaunchedEffect(mode, version) { withContext(Dispatchers.Default) { runCatching { load(mode) }.getOrNull() }?.let { report = it; OrbitTiming.ready("Settings/Director") } } Column(modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) { Row(verticalAlignment = androidx.compose.ui.Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) { Text("DIRECTOR'S CHAIR", color = ChairGold, fontFamily = Anton, fontSize = 20.sp) diff --git a/android/app/src/main/java/tv/orbit/classic/OrbitTiming.kt b/android/app/src/main/java/tv/orbit/classic/OrbitTiming.kt index 9abe22bb..0f1738dc 100644 --- a/android/app/src/main/java/tv/orbit/classic/OrbitTiming.kt +++ b/android/app/src/main/java/tv/orbit/classic/OrbitTiming.kt @@ -21,7 +21,7 @@ import java.util.concurrent.Executors * - `key`: a remote key pressed, to the end of the next frame drawn after it (the screen's answer to the press). * - `screen`: a screen opened (from the key press that opened it, when there was one), to the end of its first frame. * - `ready`: a screen that loads first (Director's Chair), from opening to its content shown. - * - `tune`, `firstFrame`, `firstSound`: a programme asked for, its player ready, its first picture, its sound starting. + * - `playerReady`, `firstFrame`, `firstSound`: from a programme being asked for to its player ready, its first picture, and its sound starting. * - `frames`: once a minute, frames drawn, frames over 16.7 ms and over 33 ms, the slowest, and the memory in use. */ internal object OrbitTiming { @@ -95,7 +95,7 @@ internal object OrbitTiming { fun ready(name: String) { if (!on) return; opened.remove(name)?.let { record("ready", (System.nanoTime() - it) / 1e6, JSONObject().put("screen", name)) } } fun tune(channel: Int?) { if (on) { tuneAt = startFrom(System.nanoTime()); tuneChannel = channel } } - fun prepared() { since("ready") } + fun prepared() { since("playerReady") } fun firstFrame() { since("firstFrame") } fun firstSound() { since("firstSound") } private fun since(kind: String) { diff --git a/docs/audit-0.129/STAGE0-BASELINE.md b/docs/audit-0.129/STAGE0-BASELINE.md new file mode 100644 index 00000000..44cb6e5d --- /dev/null +++ b/docs/audit-0.129/STAGE0-BASELINE.md @@ -0,0 +1,60 @@ +# 0.129 stage 0: the baseline before any fix (10 November 2026) + +Build: branch `ux-0.129` at the stage 0 commit, which is 0.128.0 with the timing log added and nothing else. It ran as the +household edition on the Android TV 14 emulator, signed with a throwaway key, against the Silo test server (fictional media). +Raw files sit beside this one. + +**Caution:** the emulator draws in software (SwiftShader), so its frame times are far slower than a real box. Treat them as a +before/after comparison on the same emulator only. + +## First run, fresh install, small library (Silo: 6 films, 1 series) + +From `first-run-steps.txt` (clock times, each ±1 s for the screen polling): + +| Step | Time | +| --- | --- | +| Launch to first frame (`am start -W`) | 0.96 s | +| Launch to the Welcome words showing | 6.7 s (the opening animation) | +| Sign in pressed to "Your channels" | 2.3 s | +| "Set up 8 channels" to its result | 3.1 s | +| Result | **"All matched · 0 titles across 0 channels"**: every channel reads "Couldn't set up" | +| All set → "You're on air. Your channels are ready." | That message is shown although no channel is on | +| Landing | **Settings › Channels, "0 of 36 channels on". Nothing playing.** | +| Recovery via a phone (Companion › Create a channel from the 7 titles) | Planned and on in 4 s | +| Tune to first picture / first sound (local Silo) | 924 ms / 1,155 ms; the next programme 390 ms / 518 ms | + +**Fails the acceptance test:** a fresh install with a small compatible library doesn't reach a playing programme without a +phone. The copy is also wrong: "All matched" and "Your channels are ready" appear when nothing matched. + +## Navigation map (scripted remote, `tools/nav_map.py`) + +- `navmap-before.md`: Home, the top bar and Settings. +- `navmap-before-2.md`: Director's Chair, plus Who's watching opened from the top bar. +- `navmap-before-3.md`: Who's watching at launch. + +What it shows: + +- **Director's Chair:** OK on its card opens the Chair, but focus lands on **Home in the top bar**. Down then goes to the + **Channels** item in the Settings list. Left stays there, and Back from the Chair doesn't return to its card. This is your + report, reproduced. +- **Who's watching:** + - It's drawn over Home with no backdrop: "What would you like to watch?" and the All Channels bar show through it (see the + screenshot in the report). + - On the emulator the remote stayed on the profiles. + - The five-second carry-on closed it by itself during the test. A Back after that closed Orbit. +- **Top bar:** Right runs Home → What's On → TV Guide → Catch Up → Drive-In → Arcade → the profile picture → Settings, then + stops. The profile picture has no accessibility label. + +## Timings on the emulator (`timing-before.jsonl`) + +| Measure | n | p50 | p95 | max | +| --- | --- | --- | --- | --- | +| Key to next frame | 80 | 26 ms | 74 ms | 201 ms | +| Open Home | 5 | 20 ms | 29 ms | 29 ms | +| Open Settings › Channels | 6 | 48 ms | 210 ms | 210 ms | +| Open Director's Chair (first frame) | 2 | 33 ms | 47 ms | 47 ms | +| Open TV Guide | 1 | 18 ms | — | — | +| Tune to first picture | 3 | 408 ms | 924 ms | 924 ms | +| Tune to first sound | 3 | 707 ms | 1,155 ms | 1,155 ms | + +Frames over 16.7 ms: most of them, on software rendering. The Xiaomi box is the place to judge this, after stage 1. diff --git a/docs/audit-0.129/first-run-steps.txt b/docs/audit-0.129/first-run-steps.txt new file mode 100644 index 00000000..9fd60d26 --- /dev/null +++ b/docs/audit-0.129/first-run-steps.txt @@ -0,0 +1,17 @@ +1794328047.937 launch +TotalTime: 962 +WaitTime: 967 +1794328054.624 welcome-shown +1794328060.671 look-shown +1794328063.271 server-shown +1794328065.325 signin-shown +1794328080.226 signin-pressed +1794328082.501 channels-shown +1794328083.710 setup-pressed +1794328086.810 setup-result +1794328097.963 who-shown +1794328100.559 allset-shown +1794328103.622 landed +1794328121.423 create-sent +1794328125.502 channel-on +1794328125.520 watch-sent diff --git a/docs/audit-0.129/navmap-before-2.md b/docs/audit-0.129/navmap-before-2.md new file mode 100644 index 00000000..6c21e6a3 --- /dev/null +++ b/docs/audit-0.129/navmap-before-2.md @@ -0,0 +1,15 @@ +| From | Press | Before | After | Note | +| --- | --- | --- | --- | --- | +| Director's Chair card | OK | Settings: Director's Chair / Suggestions for your channels, and events | Settings: Home | Chair on screen: False | +| Director's Chair (open) | Down | Settings: Home | Settings: Channels / Turn on, make your own, suggestions | Chair on screen: False | +| Director's Chair (open) | Left | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | Chair on screen: False | +| Director's Chair (open) | Left | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | Chair on screen: False | +| Director's Chair (open) | Back | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | Chair on screen: False | +| Top bar (profile picture) | OK | What would you like to watch?: (unlabelled View at [1670,12][1762,108]) | Who's watching?: Kids | | +| Who's watching (opened inside Orbit) | Up | Who's watching?: Kids | Who's watching?: Kids | | +| Who's watching (opened inside Orbit) | Down | Who's watching?: Kids | Who's watching?: Kids | | +| Who's watching (opened inside Orbit) | Left | Who's watching?: Kids | Who's watching?: Kids | | +| Who's watching (opened inside Orbit) | Right | Who's watching?: Kids | Who's watching?: Adult | | +| Who's watching (opened inside Orbit) | Right | Who's watching?: Adult | Who's watching?: Adult | | +| Who's watching (opened inside Orbit) | Right | Who's watching?: Adult | Who's watching?: Adult | | +| Who's watching (opened inside Orbit) | Back | Who's watching?: Adult | Enter name of Wi-Fi network: FictionalNet | | diff --git a/docs/audit-0.129/navmap-before-3.md b/docs/audit-0.129/navmap-before-3.md new file mode 100644 index 00000000..42c1ab88 --- /dev/null +++ b/docs/audit-0.129/navmap-before-3.md @@ -0,0 +1,13 @@ +| From | Press | Before | After | +| --- | --- | --- | --- | +| Who's watching at launch | Up | Who's watching?: Kids | Who's watching?: Kids | +| Who's watching at launch | Up | Who's watching?: Kids | Who's watching?: Kids | +| Who's watching at launch | Down | Who's watching?: Kids | Who's watching?: Kids | +| Who's watching at launch | Down | Who's watching?: Kids | Who's watching?: Kids | +| Who's watching at launch | Left | Who's watching?: Kids | Who's watching?: Kids | +| Who's watching at launch | Left | Who's watching?: Kids | Who's watching?: Kids | +| Who's watching at launch | Right | Who's watching?: Kids | Who's watching?: Adult | +| Who's watching at launch | Right | Who's watching?: Adult | Who's watching?: Adult | +| Who's watching at launch | Right | Who's watching?: Adult | Who's watching?: Adult | +| Who's watching at launch | Up | Who's watching?: Adult | Who's watching?: Adult | +| Who's watching at launch | OK | Who's watching?: Adult | What would you like to watch?: Adult | diff --git a/docs/audit-0.129/navmap-before.md b/docs/audit-0.129/navmap-before.md new file mode 100644 index 00000000..8e305023 --- /dev/null +++ b/docs/audit-0.129/navmap-before.md @@ -0,0 +1,30 @@ +| From | Press | Before | After | Should be | +| --- | --- | --- | --- | --- | +| Home | Up | What would you like to watch?: ALL CHANNELS | What would you like to watch?: Home | | +| Home | Down | What would you like to watch?: Home | What would you like to watch?: ALL CHANNELS | | +| Home | Left | What would you like to watch?: ALL CHANNELS | What would you like to watch?: Home | | +| Home | Right | What would you like to watch?: Home | What would you like to watch?: What's On | | +| Top bar | Right | What would you like to watch?: What's On | What would you like to watch?: TV Guide | | +| Top bar | Right | What would you like to watch?: TV Guide | What would you like to watch?: Catch Up | | +| Top bar | Right | What would you like to watch?: Catch Up | What would you like to watch?: Drive-In | | +| Top bar | Right | What would you like to watch?: Drive-In | What would you like to watch?: Arcade | | +| Top bar | Right | What would you like to watch?: Arcade | What would you like to watch?: (unlabelled View at [1670,12][1762,108]) | | +| Top bar | Right | What would you like to watch?: (unlabelled View at [1670,12][1762,108]) | What would you like to watch?: Settings | | +| Top bar | Right | What would you like to watch?: Settings | What would you like to watch?: Settings | | +| Top bar | Right | What would you like to watch?: Settings | What would you like to watch?: Settings | | +| Top bar (Settings gear) | OK | What would you like to watch?: Settings | Settings: Channels / Turn on, make your own, suggestions | Settings opens | +| Settings rail | Right | Settings: Channels / Turn on, make your own, suggestions | Settings: Create your own / Your own channel, on this TV or your phone | into Channels: Create your own | +| Settings › Channels | Right | Settings: Create your own / Your own channel, on this TV or your phone | Settings: Director's Chair / Suggestions for your channels, and events | Director's Chair card | +| Director's Chair card | OK | Settings: Director's Chair / Suggestions for your channels, and events | Settings: Home | Chair opens, focus inside it | +| Director's Chair (open) | Down | Settings: Home | Settings: Channels / Turn on, make your own, suggestions | stays inside the Chair | +| Director's Chair (open) | Left | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | stays inside the Chair | +| Director's Chair (open) | Left | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | stays inside the Chair | +| Director's Chair (open) | Back | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | back to the Channels list, Chair card focused | +| Top bar (profile) | OK | What would you like to watch?: Settings | Settings: Channels / Turn on, make your own, suggestions | Who's watching opens | +| Who's watching (from inside Orbit) | Up | Settings: Channels / Turn on, make your own, suggestions | Settings: Home | stays on the profiles | +| Who's watching (from inside Orbit) | Down | Settings: Home | Settings: Channels / Turn on, make your own, suggestions | stays on the profiles | +| Who's watching (from inside Orbit) | Left | Settings: Channels / Turn on, make your own, suggestions | Settings: Channels / Turn on, make your own, suggestions | stays on the profiles | +| Who's watching (from inside Orbit) | Right | Settings: Channels / Turn on, make your own, suggestions | Settings: Create your own / Your own channel, on this TV or your phone | stays on the profiles | +| Who's watching (from inside Orbit) | Right | Settings: Create your own / Your own channel, on this TV or your phone | Settings: Director's Chair / Suggestions for your channels, and events | stays on the profiles | +| Who's watching (from inside Orbit) | Right | Settings: Director's Chair / Suggestions for your channels, and events | Settings: New in your library / What's arrived, and where it went | stays on the profiles | +| Who's watching (from inside Orbit) | Back | Settings: New in your library / What's arrived, and where it went | What would you like to watch?: ALL CHANNELS | back where it was opened, profile kept | diff --git a/docs/audit-0.129/timing-before.jsonl b/docs/audit-0.129/timing-before.jsonl new file mode 100644 index 00000000..4117e22a --- /dev/null +++ b/docs/audit-0.129/timing-before.jsonl @@ -0,0 +1,111 @@ +{"screen":"Connect Emby","at":1794324461623,"kind":"screen","ms":1.7} +{"code":23,"at":1794324470865,"kind":"key","ms":74.1} +{"code":20,"at":1794324472915,"kind":"key","ms":42.3} +{"code":23,"at":1794324473448,"kind":"key","ms":36.4} +{"code":23,"at":1794324475452,"kind":"key","ms":24.7} +{"code":13,"at":1794324485798,"kind":"key","ms":25.6} +{"code":48,"at":1794324487886,"kind":"key","ms":22.9} +{"code":10,"at":1794324489297,"kind":"key","ms":34.9} +{"code":20,"at":1794324491384,"kind":"key","ms":28.3} +{"code":23,"at":1794324492434,"kind":"key","ms":36.3} +{"code":20,"at":1794324494699,"kind":"key","ms":18.2} +{"code":20,"at":1794324494800,"kind":"key","ms":30.7} +{"code":20,"at":1794324494865,"kind":"key","ms":29.5} +{"code":23,"at":1794324495981,"kind":"key","ms":90.9} +{"code":23,"at":1794324508201,"kind":"key","ms":86.5} +{"code":20,"at":1794324510149,"kind":"key","ms":31.1} +{"code":23,"at":1794324510715,"kind":"key","ms":68.7} +{"code":23,"at":1794324512780,"kind":"key","ms":61.6} +{"screen":"Settings\/Channels","at":1794324513015,"kind":"screen","ms":210.3} +{"code":22,"at":1794324528015,"kind":"key","ms":56.7} +{"frames":1353,"over16ms":1330,"over33ms":877,"heapMb":11,"at":1794324528015,"kind":"frames","ms":625.2} +{"code":23,"at":1794324529048,"kind":"key","ms":46.6} +{"screen":"TV Guide","at":1794324537917,"kind":"screen","ms":18.2} +{"channel":701,"at":1794324538877,"kind":"firstFrame","ms":923.9} +{"channel":701,"at":1794324538883,"kind":"ready","ms":929.5} +{"channel":701,"at":1794324539108,"kind":"firstSound","ms":1155} +{"channel":701,"at":1794324549388,"kind":"firstFrame","ms":390.2} +{"channel":701,"at":1794324549416,"kind":"ready","ms":418.2} +{"channel":701,"at":1794324549516,"kind":"firstSound","ms":518.4} +{"channel":701,"at":1794324564407,"kind":"firstFrame","ms":408} +{"channel":701,"at":1794324564417,"kind":"ready","ms":417.8} +{"channel":701,"at":1794324564706,"kind":"firstSound","ms":706.7} +{"code":4,"at":1794324577865,"kind":"key","ms":201.2} +{"screen":"Home","at":1794324578985,"kind":"screen","ms":13.2} +{"code":19,"at":1794324584815,"kind":"key","ms":8.6} +{"code":20,"at":1794324592000,"kind":"key","ms":24.9} +{"frames":101,"over16ms":86,"over33ms":43,"heapMb":99,"at":1794324592001,"kind":"frames","ms":356.4} +{"code":21,"at":1794324599152,"kind":"key","ms":19.2} +{"code":22,"at":1794324606335,"kind":"key","ms":22} +{"code":22,"at":1794324614735,"kind":"key","ms":20} +{"code":22,"at":1794324619932,"kind":"key","ms":24.7} +{"code":22,"at":1794324625115,"kind":"key","ms":23.5} +{"code":22,"at":1794324630300,"kind":"key","ms":23.1} +{"code":22,"at":1794324635516,"kind":"key","ms":29.8} +{"code":22,"at":1794324640701,"kind":"key","ms":26} +{"code":23,"at":1794324656333,"kind":"key","ms":51.9} +{"screen":"Settings\/Channels","at":1794324656333,"kind":"screen","ms":51.9} +{"frames":42,"over16ms":37,"over33ms":2,"heapMb":101,"at":1794324656333,"kind":"frames","ms":45.4} +{"code":22,"at":1794324661703,"kind":"key","ms":32.8} +{"code":22,"at":1794324667069,"kind":"key","ms":17.4} +{"code":23,"at":1794324672467,"kind":"key","ms":46.8} +{"screen":"Settings\/Director","at":1794324672467,"kind":"screen","ms":46.8} +{"code":20,"at":1794324681682,"kind":"key","ms":17.8} +{"code":4,"at":1794324697397,"kind":"key","ms":49.7} +{"screen":"Settings\/Channels","at":1794324697397,"kind":"screen","ms":49.7} +{"code":4,"at":1794324702749,"kind":"key","ms":19.9} +{"screen":"Home","at":1794324702749,"kind":"screen","ms":19.9} +{"code":19,"at":1794324705967,"kind":"key","ms":21.1} +{"code":22,"at":1794324707183,"kind":"key","ms":21.1} +{"code":22,"at":1794324707818,"kind":"key","ms":23.8} +{"code":22,"at":1794324708450,"kind":"key","ms":30} +{"code":22,"at":1794324709066,"kind":"key","ms":17.4} +{"code":22,"at":1794324709706,"kind":"key","ms":31} +{"code":22,"at":1794324710317,"kind":"key","ms":18.9} +{"code":22,"at":1794324710949,"kind":"key","ms":20.1} +{"code":23,"at":1794324713598,"kind":"key","ms":46.1} +{"screen":"Settings\/Channels","at":1794324713599,"kind":"screen","ms":46.1} +{"code":19,"at":1794324718920,"kind":"key","ms":25.4} +{"frames":70,"over16ms":56,"over33ms":10,"heapMb":25,"at":1794324718920,"kind":"frames","ms":38.3} +{"code":20,"at":1794324724303,"kind":"key","ms":28.3} +{"code":22,"at":1794324735033,"kind":"key","ms":28.5} +{"code":22,"at":1794324740414,"kind":"key","ms":19} +{"code":22,"at":1794324745801,"kind":"key","ms":26.8} +{"code":4,"at":1794324751106,"kind":"key","ms":23.7} +{"screen":"Home","at":1794324751106,"kind":"screen","ms":23.7} +{"code":19,"at":1794324769751,"kind":"key","ms":19.3} +{"code":22,"at":1794324770965,"kind":"key","ms":22.5} +{"code":22,"at":1794324771498,"kind":"key","ms":27.3} +{"code":22,"at":1794324772017,"kind":"key","ms":18.9} +{"code":22,"at":1794324772533,"kind":"key","ms":19.5} +{"code":22,"at":1794324773073,"kind":"key","ms":32.8} +{"code":22,"at":1794324773583,"kind":"key","ms":7.9} +{"code":22,"at":1794324774115,"kind":"key","ms":17.6} +{"code":23,"at":1794324774668,"kind":"key","ms":45.9} +{"screen":"Settings\/Channels","at":1794324774668,"kind":"screen","ms":45.9} +{"code":22,"at":1794324776700,"kind":"key","ms":32.4} +{"code":22,"at":1794324777935,"kind":"key","ms":48.2} +{"frames":60,"over16ms":43,"over33ms":4,"heapMb":29,"at":1794324780100,"kind":"frames","ms":33.6} +{"code":23,"at":1794324781117,"kind":"key","ms":19.7} +{"screen":"Settings\/Director","at":1794324781118,"kind":"screen","ms":19.7} +{"code":20,"at":1794324792348,"kind":"key","ms":19.5} +{"code":4,"at":1794324814047,"kind":"key","ms":41.5} +{"screen":"Settings\/Channels","at":1794324814047,"kind":"screen","ms":41.5} +{"code":4,"at":1794324821269,"kind":"key","ms":29.1} +{"screen":"Home","at":1794324821269,"kind":"screen","ms":29.1} +{"code":19,"at":1794324824483,"kind":"key","ms":22.6} +{"code":22,"at":1794324825715,"kind":"key","ms":22.6} +{"code":22,"at":1794324826249,"kind":"key","ms":22.9} +{"code":22,"at":1794324826786,"kind":"key","ms":29.2} +{"code":22,"at":1794324827298,"kind":"key","ms":10.6} +{"code":22,"at":1794324827830,"kind":"key","ms":26.8} +{"code":22,"at":1794324828368,"kind":"key","ms":23.8} +{"code":23,"at":1794324830866,"kind":"key","ms":26.9} +{"code":19,"at":1794324836049,"kind":"key","ms":25.4} +{"code":22,"at":1794324851683,"kind":"key","ms":31.8} +{"frames":43,"over16ms":29,"over33ms":3,"heapMb":39,"at":1794324851683,"kind":"frames","ms":33.7} +{"screen":"Home","at":1794324881802,"kind":"screen","ms":9.8} +{"code":19,"at":1794324891849,"kind":"key","ms":31.3} +{"code":22,"at":1794324923000,"kind":"key","ms":21.5} +{"code":23,"at":1794324943830,"kind":"key","ms":98.8} +{"frames":10,"over16ms":10,"over33ms":5,"heapMb":63,"at":1794324943830,"kind":"frames","ms":483.4} diff --git a/tools/nav_map.py b/tools/nav_map.py new file mode 100644 index 00000000..26b95c9b --- /dev/null +++ b/tools/nav_map.py @@ -0,0 +1,83 @@ +"""Navigation map for the disposable emulator only (emulator-5580): runs remote presses and records where focus lands. +Usage: python3 -I navmap.py OUT.md (Orbit must be open on Home, signed in, with channel 701 on)""" +import subprocess, sys, time, re +import xml.etree.ElementTree as ET + +A = ["/opt/android-sdk/platform-tools/adb", "-s", "emulator-5580"] +KEYS = {"Up": 19, "Down": 20, "Left": 21, "Right": 22, "OK": 23, "Back": 4} + +def sh(*a): + return subprocess.run(A + ["shell", *a], capture_output=True, text=True).stdout + +def key(name, wait=1.2): + sh("input", "keyevent", str(KEYS[name])); time.sleep(wait) + +def texts(node): + out = [n.get("text") or n.get("content-desc") for n in node.iter() if (n.get("text") or n.get("content-desc"))] + return [t for t in out if t.strip()] + +def state(): + sh("uiautomator", "dump", "/sdcard/nav.xml") + x = sh("cat", "/sdcard/nav.xml") + try: + root = ET.fromstring(x[x.index("