Show unauthorized/offline adb devices instead of hiding them - #62
Merged
Conversation
list_devices dropped "unauthorized" / "no permissions" entries, so a freshly-plugged-in phone (unauthorized until you tap "allow USB debugging" on the device) showed up as "0 devices" — looking like the app or cable was broken. Now every reachable device is listed; a ready one is just its serial, anything else is labeled "SERIAL (unauthorized)" / "(offline)" so the user sees the device and why it may not work yet. `-s` uses the bare serial (device_serial strips the label). Combined with the reap fix, selecting a not-ready device and running now also surfaces adb's own reason.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
list_devicesdroppedunauthorized/no permissionsentries, so a freshly-plugged-in phone — which is unauthorized until you tap "Allow USB debugging" on the device — showed up as "0 devices", looking like the app or cable was broken.Now every reachable device is listed:
emulator-5554)SERIAL (unauthorized),SERIAL (offline),SERIAL (no permissions), …adb -suses the bare serial (device_serialstrips the label). Combined with the reap fix (#59), selecting a not-ready device and hitting Run now also surfaces adb's own reason in the status bar.Test plan
parse_device_lines_labels_non_ready_states— ready device bare, others labeled, none droppeddevice_serial_strips_state_label