mobile_launch_app
Launch Android applications using their package names to automate app management and testing workflows on mobile devices.
Instructions
Launch an application by its package name.
Args: package_name: The package name of the app to launch (e.g., 'com.android.chrome')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes |
Implementation Reference
- main.py:252-268 (handler)The main handler function for the 'mobile_launch_app' tool. It is decorated with @mcp.tool(), which likely handles both registration and schema inference from the signature and docstring. The function launches an Android application by package name after verifying device initialization and app installation.def mobile_launch_app(package_name: str) -> str: """Launch an application by its package name. Args: package_name: The package name of the app to launch (e.g., 'com.android.chrome') """ if device is None: return "Error: Device not initialized. Please call mobile_init() first to establish connection with Android device." try: apps = device.app_list() if package_name not in apps: return f"App {package_name} is not in the list of installed apps. Please use mobile_list_apps to get the current app list." device.app_start(package_name) return f"Successfully launched app: {package_name}" except Exception as e: return f"Error launching app {package_name}: {str(e)}"