Device - High-level representation of an Android device.
High-level representation of an Android device.
Initialize device.
Arguments:
serial
- Device serial numberadb
- ADB wrapper instanceGet device serial number.
Get all device properties.
Get a specific device property.
Get device model.
Get device brand.
Get Android version.
Get SDK level.
Execute a shell command on the device.
Tap at coordinates.
Arguments:
x
- X coordinatey
- Y coordinatePerform swipe gesture.
Arguments:
start_x
- Starting X coordinatestart_y
- Starting Y coordinateend_x
- Ending X coordinateend_y
- Ending Y coordinateduration_ms
- Swipe duration in millisecondsInput text.
Arguments:
text
- Text to inputPress a key.
Arguments:
keycode
- Android keycode to pressStart an app activity.
Arguments:
package
- Package nameactivity
- Activity nameextras
- Intent extrasStart an app on the device.
Arguments:
package
- Package nameactivity
- Optional activity name (if empty, launches default activity)Returns:
Result message
Install an APK on the device.
Arguments:
apk_path
- Path to the APK filereinstall
- Whether to reinstall if app existsgrant_permissions
- Whether to grant all requested permissionsReturns:
Installation result
Uninstall an app from the device.
Arguments:
package
- Package name to uninstallkeep_data
- Whether to keep app data and cache directoriesReturns:
Uninstallation result
Take a screenshot of the device and compress it.
Arguments:
quality
- JPEG quality (1-100, lower means smaller file size)Returns:
Tuple of (local file path, screenshot data as bytes)
List installed packages on the device.
Arguments:
include_system_apps
- Whether to include system apps (default: False)Returns:
List of package names
Device Manager - Manages Android device connections.
Manages Android device connections.
Initialize device manager.
Arguments:
adb_path
- Path to ADB binaryList connected devices.
Returns:
List of connected devices
Get a specific device.
Arguments:
serial
- Device serial numberReturns:
Device instance if found, None otherwise
Connect to a device over TCP/IP.
Arguments:
host
- Device IP addressport
- Device portReturns:
Connected device instance
Disconnect from a device.
Arguments:
serial
- Device serial numberReturns:
True if disconnected successfully
Device - High-level representation of an Android device.
High-level representation of an Android device.
Initialize device.
Arguments:
serial
- Device serial numberadb
- ADB wrapper instanceGet device serial number.
Get all device properties.
Get a specific device property.
Get device model.
Get device brand.
Get Android version.
Get SDK level.
Execute a shell command on the device.
Tap at coordinates.
Arguments:
x
- X coordinatey
- Y coordinatePerform swipe gesture.
Arguments:
start_x
- Starting X coordinatestart_y
- Starting Y coordinateend_x
- Ending X coordinateend_y
- Ending Y coordinateduration_ms
- Swipe duration in millisecondsInput text.
Arguments:
text
- Text to inputPress a key.
Arguments:
keycode
- Android keycode to pressStart an app activity.
Arguments:
package
- Package nameactivity
- Activity nameextras
- Intent extrasStart an app on the device.
Arguments:
package
- Package nameactivity
- Optional activity name (if empty, launches default activity)Returns:
Result message
Install an APK on the device.
Arguments:
apk_path
- Path to the APK filereinstall
- Whether to reinstall if app existsgrant_permissions
- Whether to grant all requested permissionsReturns:
Installation result
Uninstall an app from the device.
Arguments:
package
- Package name to uninstallkeep_data
- Whether to keep app data and cache directoriesReturns:
Uninstallation result
Take a screenshot of the device and compress it.
Arguments:
quality
- JPEG quality (1-100, lower means smaller file size)Returns:
Tuple of (local file path, screenshot data as bytes)
List installed packages on the device.
Arguments:
include_system_apps
- Whether to include system apps (default: False)Returns:
List of package names
Device Manager - Manages Android device connections.
Manages Android device connections.
Initialize device manager.
Arguments:
adb_path
- Path to ADB binaryList connected devices.
Returns:
List of connected devices
Get a specific device.
Arguments:
serial
- Device serial numberReturns:
Device instance if found, None otherwise
Connect to a device over TCP/IP.
Arguments:
host
- Device IP addressport
- Device portReturns:
Connected device instance
Disconnect from a device.
Arguments:
serial
- Device serial numberReturns:
True if disconnected successfully