adb_exec
Run one-shot ADB commands on a connected device to list devices, install apps, push files, or execute short shell commands—without maintaining a persistent session.
Instructions
Execute a one-shot ADB command without a persistent session. Use for adb devices, install, push, or short shell commands.
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_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Target device alias, e.g. "board-lubancat". PREFER passing the alias when you know the target device: it reads the serialNo bound in config and runs the command directly without device probing, and logging follows the alias. Passing a raw serial number is also accepted — it is auto-resolved back to the alias when bound. Omit only when no specific device is intended; the program then auto-discovers the single connected device (errors out if 0 or >1 devices). There is NO need to call adb_device_list first. | |
| command | Yes | ADB command and arguments (without 'adb' prefix), e.g. 'devices', 'shell ls /sdcard' |