← ClaudeAtlas

android-verify-on-devicelisted

Use when a UI or behaviour change has to be confirmed on a running Android app rather than by a test — a setting that must take effect, a screen that has never been opened, a class the project cannot construct under Robolectric. Fire when the user says "check it on the device", "does it actually work", "run it and look", or when a change lands in a class that reaches Play Services and so has no unit-test seam. Fire also when a layout question has been answered twice from captures and the answer keeps moving, or when what is on screen depends on something a test cannot supply: a filled ad, a real inset, an orientation the manifest may lock away. Skip when a screenshot golden or a Robolectric test can hold the same claim — they are cheaper and they run in CI, which this never does.
damson/hard-won-skills · ★ 1 · AI & Automation · score 67
Install: claude install-skill damson/hard-won-skills
# Verify a change on a device Driving an emulator is slow and every step of it can lie. A tap can miss and be silently absorbed by the app; a capture can be of the previous screen, of a transition, or of a splash frame that has not been replaced yet. **Each of those reads as "the change did not work".** The cost of getting it wrong is not a failed check, it is a real fix reported as broken and then "fixed" again. So never act on a capture without knowing which activity was resumed and that the frame changed since the action. ## Procedure 1. **Install the build you mean to test.** `./gradlew :<module>:installDebug` — the app module under test, not necessarily `:app` — after the change compiles. Where the state under test is stored, `adb uninstall` first — a preference left by an earlier run is the most common false result. 2. **Launch and wait for a real frame**, not for the command to return: ```bash adb shell am force-stop <pkg> adb logcat -c # BEFORE the launch, or see below adb shell monkey -p <pkg> 1 >/dev/null 2>&1 until adb logcat -d | grep -q "Displayed <pkg>/.*MainActivity"; do sleep 1; done ``` **Clear the buffer first, or the wait is not a wait.** `logcat -d` dumps the whole ring buffer, so the `Displayed` line from a launch ten minutes ago matches on the first pass and the loop returns before this launch has drawn anything — green, instant, and wrong. If the buffer cannot be cleared, match on a line