Add emulator and device connection notes to state.md

Documents how to launch the Pixel_3a_API_35 AVD via start-avd, and
the wireless ADB pairing workflow for the Pixel 7a.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ltadeu6 2026-05-17 16:09:46 -03:00
parent 3747172488
commit 33028728b9

View file

@ -73,13 +73,46 @@ Element Web (`e6CqkKos`) keeps sending `BAD_MESSAGE_KEY_ID` PRE_KEY messages. Th
```bash ```bash
nix develop -c gradle --no-daemon assembleDebug nix develop -c gradle --no-daemon assembleDebug
# Emulator
adb install -r app/build/outputs/apk/debug/app-debug.apk adb install -r app/build/outputs/apk/debug/app-debug.apk
# Pixel 7a (wireless)
adb -s 192.168.1.101:45201 install -r app/build/outputs/apk/debug/app-debug.apk
``` ```
`adb install -r` preserves user data. Use `logout()` in-app to wipe crypto state. `adb install -r` preserves user data. Use `logout()` in-app to wipe crypto state.
Full wipe: `adb shell pm clear com.ltadeu6.matrix`
To send a test message from matrix-commander: To send a test message from matrix-commander:
```bash ```bash
nix develop -c matrix-commander --credentials .mc/credentials.json --store .mc/store \ nix develop -c matrix-commander --credentials .mc/credentials.json --store .mc/store \
-m "test message" --room '!rNfgFvyFMQEWIQnYVV:matrix.org' -m "test message" --room '!rNfgFvyFMQEWIQnYVV:matrix.org'
``` ```
## Emulator
AVD name: `Pixel_3a_API_35`, ADB serial: `emulator-5554`.
```bash
nix develop
start-avd # defined in flake.nix shellHook; creates AVD on first run
adb wait-for-device # wait for boot
```
`start-avd` uses system image `system-images;android-35;google_apis;x86_64` and launches with `-no-snapshot-load`.
## Physical devices
### Pixel 7a (wireless ADB)
IP: `192.168.1.101`, ADB serial: `192.168.1.101:45201`.
Ports change every time wireless debugging is toggled — re-pair if connection drops.
**Connect workflow:**
1. Phone: Settings → Developer options → Wireless debugging → enable
2. Tap **"Pair device with pairing code"** — note the pairing IP:port and 6-digit code
3. `adb pair <pairing-ip>:<pairing-port>` → enter code when prompted
4. `adb connect <ip>:<connect-port>` (connect port is on the main Wireless debugging screen, different from pairing port)
5. Verify: `adb devices`