adb_shell.constants module
Constants used throughout the code.
- adb_shell.constants.AUTH_RSAPUBLICKEY = 3
AUTH constant for
arg0
- adb_shell.constants.AUTH_SIGNATURE = 2
AUTH constant for
arg0
- adb_shell.constants.AUTH_TOKEN = 1
AUTH constant for
arg0
- adb_shell.constants.CLASS = 255
From adb.h
- adb_shell.constants.DEFAULT_AUTH_TIMEOUT_S = 10.0
Default authentication timeout (in s) for
adb_shell.adb_device.AdbDevice.connect()
andadb_shell.adb_device_async.AdbDeviceAsync.connect()
- adb_shell.constants.DEFAULT_PUSH_MODE = 33272
Default mode for pushed files.
- adb_shell.constants.DEFAULT_READ_TIMEOUT_S = 10.0
Default total timeout (in s) for reading data from the device
- adb_shell.constants.FILESYNC_IDS = (b'DATA', b'DENT', b'DONE', b'FAIL', b'LIST', b'OKAY', b'QUIT', b'RECV', b'SEND', b'STAT')
Commands that are recognized by
adb_shell.adb_device.AdbDevice._filesync_read()
andadb_shell.adb_device_async.AdbDeviceAsync._filesync_read()
- adb_shell.constants.FILESYNC_ID_TO_WIRE = {b'DATA': 1096040772, b'DENT': 1414415684, b'DONE': 1162760004, b'FAIL': 1279869254, b'LIST': 1414744396, b'OKAY': 1497451343, b'QUIT': 1414092113, b'RECV': 1447249234, b'SEND': 1145980243, b'STAT': 1413567571}
A dictionary where the keys are the commands in
FILESYNC_IDS
and the values are the keys converted to integers
- adb_shell.constants.FILESYNC_LIST_FORMAT = b'<5I'
The format for FileSync “list” messages
- adb_shell.constants.FILESYNC_PULL_FORMAT = b'<2I'
The format for FileSync “pull” messages
- adb_shell.constants.FILESYNC_PUSH_FORMAT = b'<2I'
The format for FileSync “push” messages
- adb_shell.constants.FILESYNC_STAT_FORMAT = b'<4I'
The format for FileSync “stat” messages
- adb_shell.constants.FILESYNC_WIRE_TO_ID = {1096040772: b'DATA', 1145980243: b'SEND', 1162760004: b'DONE', 1279869254: b'FAIL', 1413567571: b'STAT', 1414092113: b'QUIT', 1414415684: b'DENT', 1414744396: b'LIST', 1447249234: b'RECV', 1497451343: b'OKAY'}
A dictionary where the keys are integers and the values are their corresponding commands (type = bytes) from
FILESYNC_IDS
- adb_shell.constants.IDS = (b'AUTH', b'CLSE', b'CNXN', b'OKAY', b'OPEN', b'SYNC', b'WRTE')
Commands that are recognized by
adb_shell.adb_device._AdbIOManager._read_packet_from_device()
andadb_shell.adb_device_async._AdbIOManagerAsync._read_packet_from_device()
- adb_shell.constants.ID_TO_WIRE = {b'AUTH': 1213486401, b'CLSE': 1163086915, b'CNXN': 1314410051, b'OKAY': 1497451343, b'OPEN': 1313165391, b'SYNC': 1129208147, b'WRTE': 1163154007}
A dictionary where the keys are the commands in
IDS
and the values are the keys converted to integers
- adb_shell.constants.MAX_ADB_DATA = 1048576
//android.googlesource.com/platform/system/core/+/master/adb/adb.h
- Type:
Maximum amount of data in an ADB packet. According to
- Type:
https
- adb_shell.constants.MAX_CHUNK_SIZE = 65536
//android.googlesource.com/platform/system/core/+/master/adb/SYNC.TXT
- Type:
Maximum chunk size. According to https
- adb_shell.constants.MAX_PUSH_DATA = 2048
Maximum size of a filesync DATA packet. Default size.
- adb_shell.constants.MESSAGE_FORMAT = b'<6I'
An ADB message is 6 words in little-endian.
- adb_shell.constants.MESSAGE_SIZE = 24
The size of an ADB message
- adb_shell.constants.PROTOCOL = 1
From adb.h
- adb_shell.constants.SUBCLASS = 66
From adb.h
- adb_shell.constants.VERSION = 16777216
ADB protocol version.