android-run-devicelisted
Install: claude install-skill yybd/app-factory
# Run an Android app on a connected device
The Android counterpart of building to an iPhone. Everything here is the **debug**
loop: unsigned-by-debug-key, installed over USB, launched immediately. Nothing in
it touches release signing — that is `play-store-ship`, and the two must not be
confused, because a debug APK and a release AAB are signed by different keys and
cannot replace each other on a device.
## Prerequisites
- **Tools:** a JDK of the version the project declares (Android Studio's JBR as fallback),
Android SDK platform-tools (`adb`), the repo's `./gradlew`; Capacitor: `npm`, `npx cap`.
- **Credentials:** none — debug builds use the per-machine debug key.
- **Hub (`$APP_HUB`):** not used.
- **Other tracks:** `capacitor-bug-flow-review` (capacitor-track) for a bug that shows
up on the device.
## First: does the repo already have a script?
Look for `run-android.sh` (usually beside the project's iOS run script, in whatever directory
holds the Capacitor project). If it exists, **run it** rather than re-deriving the
steps — it already encodes the app's package name, launcher activity, and build
command, and re-deriving them by hand is how those drift apart.
If it does not exist, do the steps below, and then **offer to write the script**.
The knowledge belongs in the skill; the artifact belongs in the repo, so a person
can run it without opening a session at all. The template is at the end.
## The two things that actually go wrong
Both of these have cost real