shell_command
Execute ADB shell commands on Android devices for debugging, testing, and device management through the Enhanced ADB MCP Server.
Instructions
Execute an arbitrary ADB shell command. Use with caution - this gives full shell access.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:987-993 (handler)Handler and registration for the 'shell_command' tool via @mcp.tool() decorator. Executes arbitrary ADB shell commands using the run_adb helper.@mcp.tool() def shell_command(command: str, device_serial: str | None = None) -> str: """ Execute an arbitrary ADB shell command. Use with caution - this gives full shell access. """ return run_adb(["shell", command], device_serial)
- src/adb_mcp_server/server.py:987-987 (registration)Decorator that registers the shell_command function as an MCP tool.@mcp.tool()