The Pixel 8a is attached to .27 at the same time as the headless
emulator, so bare adb calls failed with
"error: more than one device/emulator". Every device-specific adb call
now gets an explicit serial.
- Add serial selection: ANDROID_SERIAL when set, else the first
emulator-* entry from "adb devices".
- Pass -s "$SERIAL" to the adb calls in install, screenshot, status and
stop.
- wait polls for the emulator serial instead of bare
"adb wait-for-device", which fails at once when the Pixel 8a is
attached, then waits with -s and accepts an optional timeout.
- Fail with a clear message, and not a raw adb error, when no emulator
runs; screenshot also fails on an empty capture.
- Interface unchanged: start|wait|install <apk>|screenshot [out]|stop|status.
Proven on .27 with the Pixel 8a attached (USB and wireless):
install -> Success, screenshot -> 1392860 bytes from emulator-5554.
The deployed copy at ~/android/emu.sh is byte-identical to this file.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Scaffold the Android Gradle project under android/ mirroring the proven
internet_use_control toolchain: Gradle wrapper 8.11.1, AGP 8.7.3, Kotlin
2.0.21, compileSdk/targetSdk 35, Java/Kotlin 17, minSdk 29 (AGENTS.md §9).
One Activity calls GET http://192.168.20.13:8788/health off the main thread
and renders ok, service, version and every checks value plus the raw body.
INTERNET permission and usesCleartextTraffic are declared for the LAN Hub.
A failed or non-2xx call renders an explicit error line and never reports
success (AGENTS.md §10 rule 4).
applicationId au.audasmedia.hub.phone, versionName 0.1.0-phase1.
Co-Authored-By: Paperclip <noreply@paperclip.ing>