fix(android): keep a timed-out target probe from failing discovery of other devices
Summary
Android discovery probes every listed emulator's target (getprop, has-feature, pm list features). A timeout on one busy emulator rejected the whole discovery, so it failed an open for a different device.
A device whose target probe times out (typed adbFailure: 'timeout') now stays listed with an unknown target. Unknown reads as mobile in selection. Discovery emits one warn diagnostic, android_inventory_target_probe_failed, with the serial. The requested --serial, other failures, and request aborts still fail discovery, so a selected device never runs with a demoted target.
Two files changed: packages/platform-android/src/inventory.ts and its test. No new flags or modes.
Fixes #4765
Before / after
- Before: a fake adb that times out
pm list featuresforemulator-5554makes discovery reject, soemulator-5556is unreachable. - After: both devices are listed,
emulator-5556has targetmobile, and a diagnostic names the slow device.
Validation
pnpm vitest run packages/platform-android/src/inventory.test.ts: the new regression test fails on basec37bb95630source (rejects withadb timed out after 10000ms). It passes at head7a4ff0289d(19/19).- Further tests check that an aborted request and a timed-out requested serial still reject.
pnpm typecheckandpnpm formatpass locally.- CI owns full validation. No device run: the change is inventory logic covered by a fake adb.
- Unverified: live behavior on a loaded emulator host.
🤖 Generated with Claude Code

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.