android-tv-testing
Skill4 starsChanged 4 months agoMIT-0View on GitHub
Android TV build and D-pad QA using Android CLI first, with bounded Gradle and ADB fallbacks
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 10ft-uiSkill
- amazon-devices-vega-app-performanceSkill
- amazon-devices-vega-best-practicesSkill
- amazon-devices-vega-setup-sdkSkill
- changelog-static-siteSkill
- creative-tv-uiSkill
- eas-buildSkill
- expo-tv-configSkill
- firetv-leanbackSkill
- kmp-build-commandsSkill
- kmp-compose-tvSkill
- kmp-data-layerSkill
- kmp-navigationSkill
- kmp-template-anatomySkill
- kmp-themingSkill
- kmp-verify-patternsSkill
- metaSkill
- rn-manifest-wiringSkill
- rn-shared-ui-catalogSkill
- rn-spatial-navigationSkill
- rn-template-anatomySkill
- rn-themingSkill
- vega-sdkSkill
- video-playerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 9
Use the official Android CLI as the primary Android automation surface.
- Very specific: line 23
Use android skills find <query> and android skills add --skill=<name> when a task needs another Android skill.
- Distinctive: line 43
Use the repository's Gradle wrapper for compilation and assembly.
- Distinctive: line 79
Use these Android key codes only through the bounded fallback:
- Distinctive: line 92
When Android Studio Quail 2 Canary 1 or newer is open with Gemini enabled:
- Very specific: line 114
Do not replace android run, android layout, or android screen capture with ADB when Android CLI is available.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android TV Testing
Use the official Android CLI as the primary Android automation surface. It standardizes project discovery, SDK/emulator management, deployment, UI layout, screenshots, Android knowledge, agent skills, and Android Studio integration.
Set up the agent
command -v android
android update
android init
android skills list --longandroid init installs or updates the android-cli skill for detected agents.
Use android skills find <query> and android skills add --skill=<name> when a
task needs another Android skill. Use android docs search followed by
android docs fetch kb://... instead of relying on remembered Android advice.
Command ownership
| Concern | Primary command |
| SDK location | android info |
| Project/build metadata | android describe --project_dir=<dir> |
| SDK packages | android sdk list/install/update |
| Virtual devices | android emulator list/create/start/stop |
| Install and launch APK | android run --apks=<apk> --device=<serial> |
| UI hierarchy | android layout --pretty --output=<file> |
| UI changes | android layout --diff |
| Screenshot | android screen capture --output=<png> |
| IDE inspection | android studio check/analyze-file/find-usages |
| Android guidance | android docs search/fetch |
Android CLI's run command deploys an already-built APK; it does not compile.
Use the repository's Gradle wrapper for compilation and assembly. Android CLI
does not currently expose D-pad input, connected-device boot state, or Logcat,
so use ADB only for those gaps.
Canonical TV loop
# Discover the generated native project and APK metadata.
android describe --project_dir=<android-project>
# Compile with the project-owned wrapper.
./gradlew :app:compileDebugKotlin
./gradlew :app:assembleDebug
# Deploy and launch with Android CLI.
android run \
--apks=<apk-from-describe> \
--device=<serial> \
--activity=.MainActivity
# Inspect before interaction.
android layout --pretty --output=home.json
android screen capture --output=home.png
# Android CLI has no remote-key command yet.
adb -s <serial> shell input keyevent 22
android layout --diff
android screen capture --output=after-right.pngFocus verification
Capture a layout before and after each D-pad action. Verify that the node marked focused changes. A changed screenshot alone is not sufficient: animation can change pixels while focus remains stuck.
Use these Android key codes only through the bounded fallback:
| Action | Key code |
| Up | 19 |
| Down | 20 |
| Left | 21 |
| Right | 22 |
| Select | 23 |
| Back | 4 |
Android Studio integration
When Android Studio Quail 2 Canary 1 or newer is open with Gemini enabled:
android studio check
android studio analyze-file app/src/main/java/.../MainActivity.kt
android studio find-declaration --short MainActivity
android studio find-usages --short MainActivityFor Compose projects, use android studio render-compose-preview with
--print-semantics to give the agent both an image and accessibility semantics.
Failure handling
| Symptom | Evidence and action |
| Compile error | Keep the Gradle output; inspect the affected file with android studio analyze-file when available. |
| App fails to deploy | Keep android run output and verify the APK path from android describe. |
| Empty or wrong screen | Capture android layout and a screenshot; verify activity metadata. |
| Focus does not move | Compare focused nodes before/after input; inspect focus registration and screen activation. |
| Crash | Use adb -s <serial> logcat -d because Android CLI has no Logcat command. |
Do not replace android run, android layout, or android screen capture with
ADB when Android CLI is available. Do not modify generated native files when an
Expo config plugin owns them. Preserve focus-system wiring and tile dimensions
while fixing navigation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

