Tool Reference¶
Every tool the server exposes, grouped by area. Select a tool name for its full parameters, response format, error behavior, and a worked example.
Tools marked Destructive can permanently remove data or interrupt the device. They
are hidden from clients unless the server is started with
ADB_AUTOMATION_ALLOW_DESTRUCTIVE=1 (see Configuration).
Devices & Connection¶
Find devices, manage the adb connection, forward ports, and control power.
Device Info¶
| Tool | What it does |
|---|---|
list_connected_devices |
List currently connected adb devices, as reported by adb devices -l. |
Connection¶
| Tool | What it does |
|---|---|
restart_adb_server |
Restart the local adb server. |
connect_device |
Connect to a device over TCP/IP. |
disconnect_device |
Disconnect a device connected over TCP/IP. |
restart_adbd_as_root |
Restart the on-device adbd daemon as root. Destructive |
restart_adbd_as_shell |
Restart the on-device adbd daemon as non-root (shell). |
wait_for_device_state |
Block until a device reaches a given adb transport state. |
Diagnostics¶
| Tool | What it does |
|---|---|
check_adb_available |
Check whether the adb binary is reachable and able to list connected devices. |
get_adb_version |
Report the version of the adb client this server is driving. |
generate_bugreport |
Generate a full Android bugreport and save it to the host. |
Port Forwarding¶
| Tool | What it does |
|---|---|
create_forward |
Forward a host TCP port to a device TCP port. |
list_forwards |
List active host→device forwards. |
remove_forward |
Remove one host→device forward. |
create_reverse |
Reverse-forward a device TCP port to a host TCP port. |
list_reverses |
List active device→host reverses for one device. |
remove_reverse |
Remove one device→host reverse. |
Power¶
| Tool | What it does |
|---|---|
get_power_state |
Get the device's current high-level power state. |
reboot_device |
Reboot a device into its normal system image. Destructive |
wake_device |
Wake a sleeping device's screen. |
Date & Time¶
| Tool | What it does |
|---|---|
get_date_time |
Get the device's current system date/time. |
Apps¶
Install and inspect apps, launch components, manage permissions and processes, and run tests.
Packages¶
| Tool | What it does |
|---|---|
list_packages |
List installed Android packages on a device. |
install_apk |
Install an APK on a connected device. |
uninstall_package |
Uninstall a package on a connected device. Destructive |
install_existing_for_user |
Make an already-installed package available to another Android user. |
get_package_path |
Resolve an installed package's on-device APK paths. |
get_package_info |
Curated snapshot of an installed package. |
set_package_enabled_state |
Enable or disable an app, or one of its components. |
Activities¶
| Tool | What it does |
|---|---|
start_activity |
Launch an Android activity on a device. |
resolve_activity |
Resolve which Activity would handle an Intent, without launching it. |
get_foreground_activity |
Report the currently resumed/top Activity. |
Services¶
| Tool | What it does |
|---|---|
start_service |
Start an Android service on a device. |
start_foreground_service |
Start an Android foreground service. |
stop_service |
Stop a started Android service. |
get_service_status |
Status snapshot for one Android Service. |
Broadcasts¶
| Tool | What it does |
|---|---|
send_broadcast |
Send an Android intent broadcast to a device. |
Permissions¶
| Tool | What it does |
|---|---|
grant_permission |
Grant one Android runtime permission to a package. |
revoke_permission |
Revoke one Android runtime permission from a package. |
get_package_permissions |
A package's full permission picture. |
App Data¶
| Tool | What it does |
|---|---|
clear_app_data |
Wipe a package's full application data on a device. Destructive |
clear_app_cache |
Clear only a package's cache, leaving its data intact. |
Processes¶
| Tool | What it does |
|---|---|
force_stop_app |
Force-stop an Android package on a device. |
kill_background_processes |
Kill a package's killable background processes. |
list_processes |
List running processes on a device. |
get_process_id |
Resolve a process/package name to its PIDs. |
get_process_memory |
Read a curated memory snapshot for a process. |
Content Providers¶
| Tool | What it does |
|---|---|
query_content |
Query a ContentProvider and return its rows. |
Instrumentation Tests¶
| Tool | What it does |
|---|---|
run_instrumentation |
Run an instrumentation test runner. |
Screen & Interaction¶
See what's on screen and drive the UI.
Screenshots & Recording¶
| Tool | What it does |
|---|---|
take_screenshot |
Capture the device's screen as a PNG, save it to the host, return the path. |
record_screen |
Record the device screen to an MP4, save it to the host, return the path. |
Input¶
| Tool | What it does |
|---|---|
tap |
Inject a single touch/tap event on a device. |
swipe |
Inject a swipe gesture between two points. |
input_text |
Type literal text into the focused input field. |
press_key |
Inject one Android key event. |
UI Inspection¶
| Tool | What it does |
|---|---|
dump_ui_hierarchy |
Retrieve the device's current UI hierarchy. |
find_ui_elements |
Search the current UI hierarchy for nodes matching structured criteria. |
wait_for_ui_element |
Poll the UI hierarchy until an element appears or disappears. |
Displays¶
| Tool | What it does |
|---|---|
list_displays |
Enumerate a device's logical displays. |
get_display_size |
Get a display's pixel dimensions. |
get_display_density |
Get a display's density in dpi. |
Device Configuration¶
Read and change device settings, system properties, users, and network state.
Settings¶
| Tool | What it does |
|---|---|
get_setting |
Read one Android Settings-provider value. |
set_setting |
Write one Android Settings-provider value. |
System Properties¶
| Tool | What it does |
|---|---|
get_property |
Get the value of one Android system property. |
list_properties |
List Android system properties as structured data. |
get_property_metadata |
Get metadata for one Android system property. |
set_property |
Set an ordinary mutable Android system property. |
Users¶
| Tool | What it does |
|---|---|
get_current_user |
Get the current Android user on a device. |
dump_user |
Dump detailed Android user info for a device. |
user_info |
Get detailed info for one Android user. |
list_users |
List every Android user on a device. |
switch_user |
Switch the active Android user on a device. |
create_user |
Create a full secondary Android user on a device. |
remove_user |
Delete an Android user/profile from a device. Destructive |
get_user_capabilities |
Get device-wide Android multi-user capabilities: what the platform build supports, not info about any one particular user. |
start_user |
Start a stopped Android user in the background. |
is_user_stopped |
Check whether an Android user is stopped. |
get_user_state |
Get a started user's lifecycle state. |
Network¶
| Tool | What it does |
|---|---|
list_network_interfaces |
List the device's network interfaces and their addresses. |
get_routes |
List the device's kernel routing table. |
get_connectivity_state |
Curated connectivity snapshot. |
Files¶
Move files between the device and your machine.
Files¶
| Tool | What it does |
|---|---|
pull_file |
Copy one file from a device to this server's host. |
push_file |
Copy one file from this server's host to a device. |
Logs & Debugging¶
Read logs, investigate crashes and ANRs, and attach debuggers.
Logs (logcat)¶
| Tool | What it does |
|---|---|
read_logs |
Dump recent device logs. |
clear_logs |
Clear a device's log buffer. |
get_log_buffer_size |
Report a log buffer's ring size and usage. |
read_package_logs |
Dump recent logs for one package. |
start_log_session |
Start a log-capture session: anchors on the device's current log position, to be replayed later by stop_log_session. |
stop_log_session |
Stop a log-capture session and write everything logged since start_log_session to a file on the host running this server. |
ANR Reports¶
| Tool | What it does |
|---|---|
get_anr_reports |
Get a package's ANR reports from the device's DropBox. |
Debugging¶
| Tool | What it does |
|---|---|
get_process_exit_history |
Get a package's recent process-exit records. |
set_debug_app |
Mark an app as ActivityManager's debug app. |
clear_debug_app |
Clear ActivityManager's configured debug app. |
list_jdwp_processes |
List processes exposing a JDWP transport. |
capture_native_backtrace |
Capture native thread backtraces for a running process. |
capture_native_tombstone |
Request a full native tombstone for a process and save it to the host. |
Performance¶
Measure memory, rendering, CPU, and IPC behavior.
Memory¶
| Tool | What it does |
|---|---|
get_app_memory_summary |
Compact memory snapshot for one app/process. |
get_app_memory_details |
Detailed memory breakdown for one app. |
get_system_memory_summary |
System-wide memory totals and top consumers. |
get_memory_history |
Historical memory bands for a package. |
capture_heap_dump |
Capture a heap dump and save it to the host. |
set_heap_watch |
Auto-collect a heap dump when a process gets large. |
clear_heap_watch |
Clear a previously configured heap watch. |
get_memory_maps |
Get a process's memory-map aggregates. |
Graphics & Frame Stats¶
| Tool | What it does |
|---|---|
get_frame_stats |
Get an app's rendering / jank statistics. |
reset_frame_stats |
Reset an app's graphics frame statistics. |
Method Profiling¶
| Tool | What it does |
|---|---|
start_method_profile |
Start Android method profiling for a process. |
stop_method_profile |
Stop method profiling and save the trace to the host. |
System Tracing¶
| Tool | What it does |
|---|---|
capture_system_trace |
Capture a bounded Perfetto system trace. |
start_ipc_trace |
Start ActivityManager Binder/IPC transaction tracing. |
stop_ipc_trace |
Stop IPC tracing, dump it, and save it to the host. |
Binder IPC¶
| Tool | What it does |
|---|---|
get_binder_call_stats |
Get Binder IPC call statistics. |
reset_binder_call_stats |
Reset Binder IPC call statistics. |