android-device-deploy
Installation
SKILL.md
Deploying APKs to Jason's Android devices
When to Use
Sideloading an APK, installing/updating an app on the phone, emulator, or TV, testing an APK build against a device, or signing/release-building an APK before install.
Procedure
- Locate adb:
~/Android/Sdk/platform-tools/adb(not on PATH; no SDK env vars set). - Run
adb devicesFIRST and pick the transport explicitly. Never install without-s <transport>— three devices are routinely attached and the default target is whichever connected last. - Identify the target before installing:
adb -s <dev> shell getprop ro.product.modelandro.build.version.sdk. Match the model, not the address format — see references/devices.md. - Check for a same-package install on the target first (
pm list packages --user 0 | grep <pkg>, thendumpsys package <pkg>for versionName/installer). Installing a release package that collides with a differently-signed build of the same app fails with a signature mismatch, so pick the right package name (e.g. a debug suffix vs the release package) BEFORE building or signing. - Verify APK integrity when a release ships a checksum:
sha256sum -c file.apk.sha256from the download directory. Write the checksum file verbatim first (curl -o), thensha256sum -c file.apk.sha256directly; do NOT build the check line by hand with echo. - Install:
adb -s <dev> install --user 0 -r app.apk. - Verify: the install output must say
Success. - Smoke-test a user-facing install: launch it, confirm the foreground activity (
dumpsys window | grep mCurrentFocus), then checkadb -s <dev> logcat -d -b crash | grep -i <pkg>for crashes. See references/smoke-test.md.