From 5616ed8aba73f5a3968e86928ec5884afe34ead3 Mon Sep 17 00:00:00 2001 From: iris <2+iris@noreply.localhost> Date: Sun, 30 Aug 2026 00:17:38 -0400 Subject: [PATCH] Say which emulator, now that this checkout has its own `run-android.sh` derives its AVD from the checkout, so two clones of this repo run two emulators, and with both attached a bare `adb` call stops working. The failures do not say so: `adb shell` and `adb get-state` fail with `more than one device/emulator`, and `adb shell pm list packages` comes back empty -- which reads as the app having been uninstalled, and sent dev-updater's session looking for a wipe that had not happened. Its enrolment script mis-diagnosed the same ambiguity as "no emulator is running", whose advice is to start a third. The enrolment line in this file was itself a bare `adb shell`, so it was the instruction that would have produced the confusion. --- AGENTS.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index cdd7e0f..51d549a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -214,8 +214,18 @@ first if a remote spawn ever mangles an argument. `$XDG_CONFIG_HOME` (`~/.config` when that is unset), never in the checkout, so a relative `certs/ca.pem` finds nothing. The emulator app reaches it at `https://10.0.2.2:8443`; enroll it with - `adb shell "am start -a android.intent.action.VIEW -d 'aiapp://enroll?host=10.0.2.2&port=8443&token=…'"` + `adb -s "$SERIAL" shell "am start -a android.intent.action.VIEW -d 'aiapp://enroll?host=10.0.2.2&port=8443&token=…'"` (quote so the device shell doesn't eat the `&`s). +- **Name the device on every `adb` call.** This checkout runs its own + emulator — `run-android.sh` derives the AVD name from the directory, so + a second clone gets a second AVD rather than queueing for one shared + machine-wide `tdep`. With more than one attached, a bare `adb shell` or + `adb get-state` fails with `more than one device/emulator` and a bare + `adb shell pm list packages` comes back **empty**, which reads as the app + having been uninstalled rather than as the question being ambiguous. + Get the serial the way `run-android.sh` does — match `adb -s emu + avd name` against the AVD — or export `ANDROID_SERIAL`, which every + `adb` call honours without `-s`. ## Where things run (host vs this VM)