android-use

v0.2.0
io.github.GhostFaceModz/android-use Checked 3 days ago Published 1 month ago

Let AI agents see and control an Android phone over ADB, with safety guards.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_devices

List connected ADB devices (filtered by ADB_SERIAL allowlist if set)

connect_wifi

Connect to a device over Wi-Fi. For Android 11+ wireless debugging, pass pairing_code and pair_port (from 'Pair device with pairing code') to pair first.

ParameterTypeDescription
host *string
pair_portinteger
pairing_codestring
portinteger

screenshot

Take a screenshot (PNG)

ParameterTypeDescription
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

get_screen_size

Get screen resolution in pixels

ParameterTypeDescription
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

tap

Tap at pixel coordinates

ParameterTypeDescription
x *integer
y *integer
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

swipe

Swipe from (x1,y1) to (x2,y2) over ms milliseconds

ParameterTypeDescription
x1 *integer
x2 *integer
y1 *integer
y2 *integer
msinteger
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

long_press

Long-press at coordinates

ParameterTypeDescription
x *integer
y *integer
msinteger
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

type_text

Type text into the focused field (printable ASCII)

ParameterTypeDescription
text *string
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

key_event

Send a key event. Names: home, back, call, endcall, up, down, left, right, center, volume_up, volume_down, power, camera, tab, enter, delete, menu, search, play_pause, mute, recents, app_switch, wakeup, sleep; or a numeric keycode

ParameterTypeDescription
key *string
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

open_app

Launch an app by package name

ParameterTypeDescription
package *string
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

list_apps

List installed packages (third-party by default)

ParameterTypeDescription
filterstring
include_systemboolean
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

current_app

Get the foreground app package

ParameterTypeDescription
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

ui_dump

Dump the UI hierarchy as a compact list of clickable/labelled elements with bounds and center coordinates

ParameterTypeDescription
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)

tap_element

Find an element by text/content-desc (substring, case-insensitive) or resource-id and tap its center

ParameterTypeDescription
indexintegerWhich match to tap if several
resource_idstring
serialstringDevice serial (optional; defaults to first ADB_SERIAL entry or the only connected device)
textstring