android-tv-diagnostics
Installation
SKILL.md
Android TV diagnostics over the LAN
When to use
Use when diagnosing a TV-side app on a Google TV / Android TV device on Jason's LAN — slow app after update, crashes, playback issues — via ADB logs and UI automation instead of asking Jason to babysit the remote.
Procedure
- Discover the device via mDNS (avahi-browse is preinstalled):
timeout 8 avahi-browse -art | grep -iE '_androidtvremote2|_googlecast'lists TVs and cast devices by friendly name (e.g. "Living Room TV", "Google-TV-Streamer").- Resolve an IPv4:
avahi-resolve -n <hostname-from-browse>.local. avahi-browse-routput carries a hostname but not always an IPv4; resolve it explicitly.
- Bootstrap adb (it is not preinstalled on this immutable host): download the official static zip into scratch —
curl -L -o $TMPDIR/platform-tools.zip https://dl.google.com/android/repository/platform-tools-latest-linux.zip && unzip -oqin the scratch dir. No rpm-ostree/flatpak needed. - Check whether network debugging is reachable before promising anything:
timeout 3 bash -c '</dev/tcp/<IP>/5555'. If refused, the device-side switch is off — do not proceed, go to step 4. - Device-side enable needs Jason's hands. Android TVs do not have wireless-debugging pairing like phones; the path is Settings > System > About > click 'Android TV OS build' 7 times, then System > Developer options > 'Network debugging', then accept the 'Always allow' RSA prompt when
adb connect <ip>:5555first fires. Ask once, with these exact steps, then act on the answer — including accepting 'skip the TV side, server logs only' as a scope reduction without re-asking later. - Once connected, offer to drive the UI yourself:
adb shell input keyeventfor D-pad navigation plus screencap + vision analysis to see the screen, so Jason does not have to operate the remote for test cases. Cold-start timing viaadb shell am start -W <package>; per-package version viaadb shell dumpsys package <pkg> | grep version.