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)