graph LR
ADBCommandExecutor["ADBCommandExecutor"]
StateResetter["StateResetter"]
DeviceConnector["DeviceConnector"]
CommandExecutor["CommandExecutor"]
FilePusher["FilePusher"]
FilePuller["FilePuller"]
ServiceConnectionManager["ServiceConnectionManager"]
StreamingShell["StreamingShell"]
ADBCommandExecutor -- "manages state through" --> StateResetter
ADBCommandExecutor -- "relies on" --> DeviceConnector
ADBCommandExecutor -- "utilizes" --> ServiceConnectionManager
ADBCommandExecutor -- "delegates to" --> CommandExecutor
ADBCommandExecutor -- "orchestrates file transfers with" --> FilePusher
ADBCommandExecutor -- "orchestrates file transfers with" --> FilePuller
ADBCommandExecutor -- "manages lifecycle and interaction with" --> StreamingShell
FilePusher -- "uses" --> CommandExecutor
The ADB Command Executor subsystem is primarily defined by the adb.adb_commands module, specifically the AdbCommands class and its methods, all contained within the file /mnt/e/StartUp/python-adb/adb/adb_commands.py. This subsystem provides a comprehensive interface for interacting with Android devices via the ADB protocol.
The primary interface for all high-level ADB operations. It orchestrates interactions with the device and manages the lifecycle of ADB connections.
Related Classes/Methods:
Resets the internal state of the ADBCommandExecutor instance, clearing connection handles and service connections to ensure a clean slate for new operations or after closing a connection.
Related Classes/Methods:
Handles the underlying logic for establishing a connection to an ADB device, supporting both USB and TCP connections. It abstracts the details of finding and opening device handles.
Related Classes/Methods:
Executes arbitrary shell commands directly on the connected Android device. The Install and Uninstall methods are higher-level wrappers that leverage the Shell command.
Related Classes/Methods:
adb.adb_commands.AdbCommands.Shelladb.adb_commands.AdbCommands.Installadb.adb_commands.AdbCommands.Uninstall
Manages the transfer of files and directories from the host system to the Android device. It handles opening the source file/directory and initiating the sync protocol.
Related Classes/Methods:
Manages the transfer of files from the Android device to the host system. It handles writing the received data to a destination file or returning it as bytes.
Related Classes/Methods:
Establishes and manages persistent connections to specific ADB services (e.g., "shell", "sync"). It optimizes by reusing existing connections for the same service type.
Related Classes/Methods:
Provides a mechanism for continuous, streaming output from shell commands, suitable for long-running processes like log retrieval.
Related Classes/Methods: