emu: Stop silent early exits in the emulator start script
The script's set -euo pipefail made it die without any visible error in two places: an empty /tmp/jtube-adbkeys/ failed the glob cat (the error itself was discarded, so the output just stopped mid-script — this hits any host after a reboot), and the boot-wait loop was killed on its first iteration because adb exits non-zero while the device is still booting. Both were swallowing the whole && chain (adb connect, scrcpy), making it look like the emulator was broken when it was fine or about to be. The stale bridge-emulator.sh duplicate (different port, broken vendor keys path) is removed in the same spirit — keeping it invites running the wrong script. Docs updated to match the one script.
This commit is contained in:
parent
c19024355c
commit
a71de07969
3 changed files with 22 additions and 49 deletions
|
|
@ -9,6 +9,12 @@ emulator works, and what needs to exist again after a rebuild.
|
|||
`scripts/start-emulator.sh`). **Headless is the default**; set
|
||||
`JTUBE_EMU_MODE=windowed` if you want the Qt window (e.g. for desktop
|
||||
interaction testing). View it via scrcpy either way.
|
||||
- **Only the host can start the emulator** (by design — no SSH from the
|
||||
container to the host, no SDK/KVM inside the container). If the agent
|
||||
finds no emulator, it should tell the user to run
|
||||
`./scripts/start-emulator.sh` on the host rather than try to work around
|
||||
it. Reachability check: `adb connect rutherford:5556` then
|
||||
`adb -s rutherford:5556 shell getprop sys.boot_completed` → `1`.
|
||||
- **Agent container**: image `agent-container:latest`, container name pattern
|
||||
`ac-<project>-<hash>`, launched with **`--network host`** — it shares the
|
||||
host's network namespace. This is load-bearing: see below.
|
||||
|
|
@ -46,7 +52,8 @@ So inside the container:
|
|||
`/tmp/jtube-adbkeys/*.pub`) and launches the emulator with
|
||||
`ADB_VENDOR_KEYS` pointing at it. To trust a new client: put its
|
||||
`~/.android/adbkey.pub` into `/tmp/jtube-adbkeys/` **before** launching.
|
||||
- Logs: `/tmp/jtube-emu.log` (QEMU) and `/tmp/jtube-emu-run.log` (script).
|
||||
- Logs: `/tmp/jtube-emu.log` (QEMU), `/tmp/jtube-socat.log` (bridge),
|
||||
`/tmp/jtube-adbkeys-combined` (rebuilt each launch).
|
||||
- Viewing: `scrcpy -s emulator-5600` on the host, or from any LAN machine:
|
||||
`adb connect rutherford:5556 && scrcpy -s 127.0.0.1:5556`.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue