Skip to content

Commit

Permalink
Fix the device selection failure
Browse files Browse the repository at this point in the history
If the adb server was not started yet, the output from adb devices would
contain the adb start log, which caused device selection failure
when single device attached. This change fixes that

Change-Id: If4f15729aa9bb2b3f5ae8d49cf77089079c4b2f0
  • Loading branch information
naomipappe committed Oct 10, 2023
1 parent abdca80 commit f3afc15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/scripts/gfxrecon.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class DeviceSelectionException(Exception):
pass

def QueryAvailableDevices():
devices = subprocess.getoutput(adb_devices).splitlines()[1:]
result = subprocess.run(shlex.split(adb_devices, posix='win' not in sys.platform), capture_output=True, check=True)
devices = result.stdout.decode().strip().splitlines()[1:]
return [device.split('\t')[0] for device in devices]

def CheckDeviceSelection():
Expand Down

0 comments on commit f3afc15

Please sign in to comment.