Repository navigation
Description
Summary
While Maestro drives a leased Android emulator, the device goes offline or not found on Simlock's adb server for about a second, then comes back. The emulator doesn't restart and the lease survives, but adb reverse rules are lost and Maestro exits with no assertion. We don't know the cause, and it may not be Simlock: Maestro and a relay of ours are also involved (see "A relay is in the path"). iOS flows on the same Mac run without trouble through the same tooling, but iOS has no adb transport, so that only rules out the Mac and the flows in general.
Environment
- Simlock 0.4.0, worker and gateway on one Mac, under launchd
- macOS 26.6.2, Apple M1 Max (arm64), 32 GB
- Node 24.18.0
- Android emulator 37.2.13.0, adb 1.0.41 (37.0.1), arm64-v8a Android 36 image, Pixel 9
- Maestro 2.10.0
android.emulator.headless: true,gpu: auto, warm pool off- Leases taken through a Simlock client (T3 Code's device tools), with Maestro run separately on the Mac
What we see
simlock adband Maestro reportdevice offlineordevice '<serial>' not found.host:track-devicesshows the serial leave and come back within about a second.- Reverse rules are gone afterwards. Maestro stops with a stack trace and no failed step.
- In one drop we looked at closely,
adbdloggedconnection terminated: write failed, and itshost-Ncounter showed many earlier reconnects.adbdhadn't restarted, which suggests the host side of the transport closed. We didn't establish who closed it. - A
logcatreader opened 20 ms before that drop. We saw this once and didn't check other drops. - Simlock's daemon log was silent around the drops we checked.
Numbers
All counts are in time order and not randomised, so treat them as rough.
| Condition | Result |
|---|---|
| Earlier route, one emulator, Maestro restarting for every step, no viewer | 13 runs passed, 34 killed by a drop |
| Same, with a screen stream up | 0 passed, 7 killed |
| Screen stream alone, screen kept busy, no Maestro (25 cycles) | 0 drops seen |
30 plain simlock adb calls alone |
0 drops |
| Short Maestro flows, one lease, several batches | From 0 of 24 to nearly every run, varying by batch |
| Fewer Maestro restarts, two leased Pixels | 3 drops in 30 Maestro starts, all on the second lease |
Of the last three drops, two came about 1 second after Maestro started and one about 31 seconds into a flow.
What we've tried
- Not lease age: drops happened on leases minutes old and an hour old.
- A viewer isn't required: drops happen with no capture running. Whether a stream makes them more likely is unproved.
- Not
adb reversecalls: a batch that made none still dropped. - Not a plain adb server on 5037: drops continued after we stopped it.
A relay is in the path
Maestro lists Android devices at start-up on any platform, by asking the adb server on 5037. That server can't see Simlock's emulators, so Maestro then scans ports itself and blocks for ever on the emulator's console port. ANDROID_ADB_SERVER_PORT didn't help. iOS runs hang the same way while any emulator is up.
So each run starts a small relay from [::1]:5037 to Simlock's server on 5038, and starts Maestro with -Djava.net.preferIPv6Addresses=true. It forwards bytes and doesn't touch the emulator, but every Android Maestro run has gone through it, so we can't rule it out. An early version also cut any adb stream quiet for 3 seconds. Drops continued after we fixed that.
Questions
- Is there a supported way for Maestro to use a leased emulator, without a relay? Other tools get
environmentfrom a grant, and we didn't find what Maestro needs there. - Is it expected that anything on the transport can drop a lease's connection this way? Does the adb server on 5038 ever reset transports by itself, for example on a health check or a lease renewal? One drop fell in the same second as
lease.renewedand another 2 seconds after one, but a third matched none, so this is weak. - What would help you diagnose it? We can run adb with
ADB_TRACE, for example, if you tell us where.
Separately: emulator crashes
The same day we had three qemu-system-aarch64-headless crash reports. Two were hvf_map_safe in a qemu_abort, and one was in gfxstream's context clean-up. We haven't linked them to the drops. One ended a lease as device-lost about 10 minutes after the crash. We have the .ips files if useful.
Activity
V3RON commentedon Nov 1, 2026
Not reproduced. No Simlock code path drops a lease's transport, so a fast test has nothing to fail on, and the slow lane cannot run Maestro or your relay.
What was checked:
Your questions:
ANDROID_ADB_SERVER_PORT, which dadb ignores (5037 is hard-coded).ADB_TRACEon Simlock's server goes nowhere today: its output is discarded (Simlock discards its adb server's output, so a transport drop leaves no record #1169).What would let us reproduce it:
host:disconnect:orreconnectthere names the trigger;simlock adb disconnectpasses through today (simlock adb disconnect drops every leased emulator on Simlock's adb server #1168).track-devicesshow both serials leave, or only one?disconnectdrops both;reconnector a socket error drops one.Written by an agent.
github-actions commentedon Nov 16, 2026
Closing: no reply in two weeks. Comment with the missing information and it reopens for triage.