def _FindFuchsiaDevice(sdk_root, is_emulator): ffx_path = os.path.join(sdk_root, 'tools', 'x64', 'ffx') if is_emulator: logging.warning('Fuchsia emulators not supported at this time.') return None ffx_cmd = [ffx_path, '-T', str(_LIST_DEVICES_TIMEOUT_SECS), 'target', 'list', '-f', 's'] device_list, _ = cmd_util.GetAllCmdOutput(ffx_cmd) if not device_list: logging.warning('No Fuchsia device found. Ensure your device is set up ' 'and can be connected to.') return device_list
def _FindFuchsiaDevice(sdk_root, is_emulator): dev_finder_path = os.path.join(sdk_root, 'tools', 'dev_finder') if is_emulator: logging.warning('Fuchsia emulators not supported at this time.') return None finder_cmd = [dev_finder_path, 'list', '-full', '-timeout', str(_LIST_DEVICES_TIMEOUT_MILLISECS)] device_list, _ = cmd_util.GetAllCmdOutput(finder_cmd) if not device_list: logging.warning('No Fuchsia device found. Ensure your device is set up ' 'and can be connected to.') return device_list
def GetAllCmdOutput(args, cwd=None, quiet=False): return cmd_util.GetAllCmdOutput(args, cwd, quiet)