INNER CODE UNIT · Python
is_connected_device
cvet/fonline · BuildTools/android_device.py:160
def is_connected_device(adb_path: str, endpoint: str) -> bool:
for serial, state in list_connected_devices(adb_path):
if serial == endpoint and state in CONNECTED_DEVICE_STATES:
return True
return False
def parse_mdns_devices(output: str) -> list[MdnsDevice]:
devices: list[MdnsDevice] = []
seen: set[str] = set()
for raw_line in output.splitlines():
line = raw_line.strip()
if not line or line.startswith('List of discovered mdns services'):
continue
if not any(marker in line for marker in MDNS_CONNECT_MARKERS):
continue