AdbTools
AdbTools.__init__
serial
- Device serial numberuse_tcp
- Whether to use TCP communication (default: False)tcp_port
- TCP port for communication (default: 8080)
AdbTools.setup_tcp_forward
bool
- True if forwarding was set up successfully, False otherwise
AdbTools.teardown_tcp_forward
bool
- True if forwarding was removed successfully, False otherwise
AdbTools.__del__
AdbTools.tap_by_index
index
- Index of the element to tap
AdbTools.tap_by_coordinates
x
- X coordinatey
- Y coordinate
AdbTools.tap
index
- Index of the element to tap
AdbTools.swipe
start_x
- Starting X coordinatestart_y
- Starting Y coordinateend_x
- Ending X coordinateend_y
- Ending Y coordinateduration
- Duration of swipe in seconds
AdbTools.drag
start_x
- Starting X coordinatestart_y
- Starting Y coordinateend_x
- Ending X coordinateend_y
- Ending Y coordinateduration
- Duration of swipe in seconds
AdbTools.input_text
text
- Text to input. Can contain spaces, newlines, and special characters including non-ASCII.
AdbTools.back
AdbTools.press_key
- 3: HOME
- 4: BACK
- 66: ENTER
- 67: DELETE
keycode
- Android keycode to press
AdbTools.start_app
package
- Package name (e.g., “com.android.settings”)activity
- Optional activity name
AdbTools.install_app
apk_path
- Path to the APK filereinstall
- Whether to reinstall if app existsgrant_permissions
- Whether to grant all permissions
AdbTools.take_screenshot
AdbTools.list_packages
include_system_apps
- Whether to include system apps (default: False)
AdbTools.complete
success
- Indicates if the task was successful.reason
- Reason for failure/success
AdbTools.remember
information
- The information to remember
AdbTools.get_memory
AdbTools.get_state
serial
- Optional device serial number