adb_shell
Run any adb shell command to perform custom actions on an Android emulator when other tools lack the needed functionality.
Instructions
Run an arbitrary adb shell command for anything not covered by the other tools, e.g. 'dumpsys activity activities | head -50'
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_shell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Device serial (e.g. emulator-5554). Optional when exactly one device is connected. | |
| command | Yes | Command line executed by the device shell |