| name | android-ui-automator-preview |
| description | Capture quick Android UI evidence with explicit launches, UIAutomator dumps, and adb screenshots for fast visual debugging and reproducible repro notes. |
| argument-hint | Provide the full application ID, target screen, and whether app data should be cleared first |
Android UI Automator Preview
What This Skill Produces
- A deterministic launch path into the real app activity.
- Repeatable post-clear-data navigation steps for AniTrend onboarding flows.
- Paired UI evidence: XML hierarchy plus PNG screenshot.
- Fast text extraction from dumps to confirm whether expected labels are present.
When To Use
- You need quick visual proof of what is currently on-screen.
- A repro depends on onboarding or permission prompts after
pm clear.
- You suspect drawer/menu truncation and need objective evidence before code changes.
Preconditions
- If the full application ID is not provided, stop and ask for it before running any adb command.
- If the target device is not the expected resolution or density, re-derive coordinates from a fresh
uiautomator dump or scale them from the recorded 1080x2400 @ 420dpi baseline.
- If the user says app data should not be cleared, skip the clear-data command and continue from the explicit launch step.
Procedure
- Start from a known state.
adb devices -l
adb logcat -c
- Launch the intended activity explicitly.
adb shell am start -n <package-name>/co.anitrend.android.deeplink.component.screen.DeepLinkScreen
Why:
- Replace
<package-name> with the application ID for the installed build.
- The activity class is fixed for AniTrend; replace it only if you are targeting a different app.
- Explicit launch avoids
monkey randomness.
- Drive onboarding and permission prompts (AniTrend profile).
These coordinates are a recorded baseline for 1080x2400 @ 420dpi only.
Re-derive coordinates from a fresh uiautomator dump before using them on a
different device or resolution.
- Open target UI (example: drawer nav button region).
- Capture XML and screenshot.
adb shell uiautomator dump /sdcard/window_dump.xml
adb pull /sdcard/window_dump.xml /tmp/window_dump.xml
adb exec-out screencap -p > /tmp/screen.png
- Validate expected labels.
grep -E "General|Manage|Catalogs|Support|Home|Discover|News|Forums|Episodes|FAQ" /tmp/window_dump.xml
- Optional: capture process-scoped logs during same window.
pid=$(adb shell pidof -s <package-name> | tr -d '\r')
adb logcat -d --pid="$pid" > /tmp/<package-name>-ui-window.log
Completion Checklist
- Explicit activity launch command recorded.
- XML dump and PNG screenshot captured from same UI state.
- Any onboarding/permission steps documented with tap/swipe actions.
- At least one text-based assertion from the XML hierarchy included.
Fast Invocation Examples
- "Capture current drawer screen as XML + PNG after clear-data flow"
- "Run explicit launch and show whether onboarding is blocking main shell"
- "Grab small screenshot proof for this emulator repro"