Skip to content

fix: skip unavailable devices during adb-server enumeration#107

Open
PointBreaker wants to merge 1 commit into
mobile-dev-inc:masterfrom
PointBreaker:codex/filter-unavailable-devices
Open

fix: skip unavailable devices during adb-server enumeration#107
PointBreaker wants to merge 1 commit into
mobile-dev-inc:masterfrom
PointBreaker:codex/filter-unavailable-devices

Conversation

@PointBreaker

Copy link
Copy Markdown

Problem

host:devices includes each transport's state, but listDadbs() currently discards it and constructs a Dadb for every serial. Constructing an unauthorized or offline transport throws during the feature query and aborts the whole list, hiding healthy devices on the same host.

This was reproduced through Maestro with a healthy requested device remaining continuously available to adb while dadb-based discovery reported no connected Android devices.

Change

  • Only construct connections for entries in the device state.
  • Isolate an IOException from one entry so a transport race cannot hide the other healthy devices.
  • Keep AdbServerDadb initialization and connection behavior unchanged.

Testing

  • ./gradlew :dadb:test --tests dadb.adbserver.AdbServerDeviceListTest

Fixes #55
Fixes #62

Related to #98 and mobile-dev-inc/Maestro#3456.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When one of the devices is offline, Exception has been throwed Dadb.list throws IOException on unauthorized device (OFFLINE)?

1 participant