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 authored and MarkY-LunarG committed Jan 29, 2025
1 parent 3a78b99 commit 5f9fab3
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 @@ -60,7 +60,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 5f9fab3

Please sign in to comment.