launch_activity
Start a specific Android activity by providing package and activity names to launch app components for testing or development workflows.
Instructions
Launch a specific activity
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes | ||
| activity_name | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:596-604 (handler)The handler function decorated with @mcp.tool(), which registers it as an MCP tool. Launches a specific Android activity using ADB by constructing the component name and executing the 'am start' command.@mcp.tool() def launch_activity( package_name: str, activity_name: str, device_serial: str | None = None ) -> str: """Launch a specific activity""" component = f"{package_name}/{activity_name}" return run_adb(["shell", "am", "start", "-n", component], device_serial)