def list_fastboot_devices(): """List all android devices connected to the computer that are in in fastboot mode. These are detected by fastboot. Returns: A list of android device serials. Empty if there's none. """ out = fastboot.FastbootProxy().devices() return _parse_device_list(out, 'fastboot')
def list_fastboot_devices(): """List all android devices connected to the computer that are in in fastboot mode. These are detected by fastboot. This function doesn't raise any error if `fastboot` binary doesn't exist, because `FastbootProxy` itself doesn't raise any error. Returns: A list of android device serials. Empty if there's none. """ out = fastboot.FastbootProxy().devices() return parse_device_list(out, 'fastboot')
def __init__(self, serial="", host_port=None, device_port=8080): self.serial = serial self.h_port = host_port self.d_port = device_port # logging.log_path only exists when this is used in an Mobly test run. log_path_base = getattr(logging, "log_path", "/tmp/logs") self.log_path = os.path.join(log_path_base, "AndroidDevice%s" % serial) self.log = AndroidDeviceLoggerAdapter(logging.getLogger(), {"serial": self.serial}) self._droid_sessions = {} self._event_dispatchers = {} self.adb_logcat_process = None self.adb_logcat_file_path = None self.adb = adb.AdbProxy(serial) self.fastboot = fastboot.FastbootProxy(serial) if not self.is_bootloader: self.root_adb()
def __init__(self, serial=''): self._serial = str(serial) # logging.log_path only exists when this is used in an Mobly test run. self._log_path_base = getattr(logging, 'log_path', '/tmp/logs') self._log_path = os.path.join( self._log_path_base, 'AndroidDevice%s' % self._normalized_serial) self._debug_tag = self._serial self.log = AndroidDeviceLoggerAdapter(logging.getLogger(), {'tag': self.debug_tag}) self.adb = adb.AdbProxy(serial) self.fastboot = fastboot.FastbootProxy(serial) if not self.is_bootloader and self.is_rootable: self.root_adb() self.services = service_manager.ServiceManager(self) self.services.register( 'snippets', snippet_management_service.SnippetManagementService) # Device info cache. self._user_added_device_info = {}
def __init__(self, serial=''): self.serial = serial # logging.log_path only exists when this is used in an Mobly test run. log_path_base = getattr(logging, 'log_path', '/tmp/logs') self.log_path = os.path.join(log_path_base, 'AndroidDevice%s' % serial) self._debug_tag = self.serial self.log = AndroidDeviceLoggerAdapter(logging.getLogger(), {'tag': self.debug_tag}) self.sl4a = None self.ed = None self._adb_logcat_process = None self.adb_logcat_file_path = None self.adb = adb.AdbProxy(serial) self.fastboot = fastboot.FastbootProxy(serial) if not self.is_bootloader and self.is_rootable: self.root_adb() # A dict for tracking snippet clients. Keys are clients' attribute # names, values are the clients: {<attr name string>: <client object>}. self._snippet_clients = {}