

Transport_timeout_s ( float, None) – The potential transport timeout Returns Use the provided transport_timeout_s if it is not None otherwise, use self._default_transport_timeout_s Parameters _get_transport_timeout_s ( transport_timeout_s ) ¶ Size ( int, None) – Optionally override size from len(data). Parametersĭata ( str, bytes) – Optional data to send, must set data or size. Messages have a response from the device, so this will always get flushed. Packets are buffered and only flushed when this connection is read from. _filesync_send ( command_id, adb_info, filesync_info, data=b'', size=None ) ¶ Parametersįinish_ids ( tuple ) – We will read until we find a header ID that is in finish_ids Useful wrapper around AdbDevice._filesync_read(). Parametersīytearray _filesync_read_until ( expected_ids, finish_ids, adb_info, filesync_info ) ¶ Read size bytes of data from self.recv_buffer. _filesync_read_buffered ( size, adb_info, filesync_info ) ¶ ParametersĮxpected_ids ( tuple ) – If the received header ID is not in expected_ids, an exception will be raisedĬommand_id ( bytes) – The received header IDĭata ( bytearray, None) – The received data, or None if the command ID is adb_Īdb_ – Command failedĪdb_ – Received response was not in expected_ids Read ADB messages and return FileSync packets. _filesync_read ( expected_ids, adb_info, filesync_info ) ¶ ParametersĪdb_info ( _AdbTransactionInfo) – Info and settings for this ADB transactionįilesync_info ( _FileSyncTransactionInfo) – Data and storage for this FileSync transaction Write the data in the buffer up to filesync_nd_idx, then set filesync_nd_idx to 0. This is not to be confused with the AdbDevice.close() method! ParametersĪdb_info ( _AdbTransactionInfo) – Info and settings for this ADB transaction _filesync_flush ( adb_info, filesync_info ) ¶ Send a b'CLSE' message and then read a b'CLSE' message. Maximum amount of data in an ADB packet Type The local ID that is used for ADB transactions the value is incremented each time and is always in the range [1, 2^32) TypeĪ lock for protecting _local_id this is never held for long Type The hostname of the machine where the Python interpreter is currently running Typeīytearray, bytes _default_transport_timeout_s ¶ĭefault timeout in seconds for transport packets, or None Type Whether an ADB connection to the device has been established Type It is not provided, it will be determined via socket.gethostname()Īdb_ – The passed transport is not an instance of a subclass of BaseTransport _available ¶ Transport ( BaseTransport) – A user-provided transport for communicating with the device must be an instance of a subclass of BaseTransportĭefault_transport_timeout_s ( float, None) – Default timeout in seconds for transport packets, or Noneīanner ( str, bytes, None) – The hostname of the machine where the Python interpreter is currently running if

AdbDevice ( transport, default_transport_timeout_s=None, banner=None ) ¶Ī class with methods for connecting to a device and executing ADB commands.
