android
v1.2.1Control Android devices and emulators via ADB — screenshots, UI automation, and logcat.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_devices
List connected Android devices and emulators
list_avds
List available Android Virtual Devices
start_emulator
Start an Android emulator. Waits up to 60s for it to come online.
| Parameter | Type | Description |
|---|---|---|
avd_name * | string | Name of the AVD to start (from list_avds) |
screenshot
Take a screenshot of the Android device. Returns the image for visual analysis. Optionally saves to a file path.
| Parameter | Type | Description |
|---|---|---|
device_id | string | Device ID (optional if only one device) |
save_path | string | Local file path to save the screenshot PNG (optional) |
get_ui_tree
Get the UI element hierarchy of the current screen. Returns interactive elements with their bounds, text, resource IDs, and state. Use this to find elements before tapping.
| Parameter | Type | Description |
|---|---|---|
device_id | string | Device ID (optional if only one device) |
tap
Tap at specific screen coordinates
| Parameter | Type | Description |
|---|---|---|
x * | number | X coordinate |
y * | number | Y coordinate |
device_id | string | Device ID (optional if only one device) |
tap_element
Tap a UI element by its resource-id, text, or content-desc. Finds the element in the UI tree and taps its center.
| Parameter | Type | Description |
|---|---|---|
by * | string | How to find the element |
value * | string | Value to match |
device_id | string | Device ID (optional if only one device) |
tap_and_wait
Tap element then wait for UI to settle and return the new UI tree. Combines tap + wait + get_ui_tree into a single fast operation.
| Parameter | Type | Description |
|---|---|---|
by * | string | How to find the element to tap |
value * | string | Value to match |
device_id | string | Device ID (optional if only one device) |
wait_ms | number | Time to wait for UI to settle after tap (default 1000ms) |
type_text
Type text into the currently focused input field
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to type |
device_id | string | Device ID (optional if only one device) |
press_key
Press a hardware/software key
| Parameter | Type | Description |
|---|---|---|
key * | string | Key to press |
device_id | string | Device ID (optional if only one device) |
swipe
Perform a swipe gesture on the screen
| Parameter | Type | Description |
|---|---|---|
end_x * | number | End X coordinate |
end_y * | number | End Y coordinate |
start_x * | number | Start X coordinate |
start_y * | number | Start Y coordinate |
device_id | string | Device ID (optional if only one device) |
duration_ms | number | Swipe duration in ms (default 300) |
scroll_to_element
Scroll down repeatedly until an element matching the given criteria is visible
| Parameter | Type | Description |
|---|---|---|
by * | string | How to find the element |
value * | string | Value to match |
device_id | string | Device ID (optional if only one device) |
max_scrolls | number | Maximum scroll attempts (default 10) |
wait_for_element
Wait for a UI element to appear on screen. Polls every 500ms.
| Parameter | Type | Description |
|---|---|---|
by * | string | How to find the element |
value * | string | Value to match |
device_id | string | Device ID (optional if only one device) |
timeout_ms | number | Timeout in ms (default 10000) |
launch_app
Launch an Android app by package name
| Parameter | Type | Description |
|---|---|---|
package_name * | string | App package name (e.g., com.android.settings) |
activity | string | Activity to launch (optional - launches default if omitted) |
device_id | string | Device ID (optional if only one device) |
install_apk
Install an APK file on the device
| Parameter | Type | Description |
|---|---|---|
apk_path * | string | Local path to the APK file |
device_id | string | Device ID (optional if only one device) |
get_current_activity
Get the currently displayed app and activity
| Parameter | Type | Description |
|---|---|---|
device_id | string | Device ID (optional if only one device) |
adb_shell
Run an arbitrary ADB shell command
| Parameter | Type | Description |
|---|---|---|
command * | string | Shell command to execute on the device |
device_id | string | Device ID (optional if only one device) |
get_logs
Get device logcat output. Use to find crashes, exceptions, and errors after reproducing a bug.
| Parameter | Type | Description |
|---|---|---|
device_id | string | Device ID (optional if only one device) |
level | string | Minimum log level: V(erbose), D(ebug), I(nfo), W(arn), E(rror), F(atal) |
lines | number | Number of recent log lines to return (default 200) |
package_name | string | Filter logs by app package name (e.g., com.example.app) |
since | string | Show logs since timestamp (e.g., '2024-01-15 10:30:00.000') |
clear_logs
Clear the logcat buffer. Call this before reproducing a bug to get clean logs.
| Parameter | Type | Description |
|---|---|---|
device_id | string | Device ID (optional if only one device) |
get_device_info
Get device details: model, manufacturer, Android version, API level, screen size, and DPI.
| Parameter | Type | Description |
|---|---|---|
device_id | string | Device ID (optional if only one device) |
pull_file
Pull a file from the Android device to the local filesystem.
| Parameter | Type | Description |
|---|---|---|
local_path * | string | Local path to save the file to |
remote_path * | string | Path on the device (e.g., /sdcard/somefile.txt) |
device_id | string | Device ID (optional if only one device) |