adb_command
Executes ADB shell commands or host ADB operations on a connected Android device, with optional target serial, timeout, and shell/host mode selection.
Instructions
Execute an ADB shell command or host ADB operation on a connected Android device.
Args:
command: Shell command (e.g. 'logcat -d -t 50', 'dumpsys battery', 'input keyevent 26')
or ADB subcommand when is_shell=False (e.g. 'install app.apk', 'forward tcp:8000 tcp:8000').
device_serial: Optional target device serial from adb_list_devices (when multiple devices are connected).
is_shell: If True (default), runs adb shell <command>. If False, runs adb <command>.
timeout_sec: Command timeout in seconds (default 20.0).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "adb_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| is_shell | No | ||
| timeout_sec | No | ||
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||