clear_app_data
Clear all app data to reset an Android application to its fresh install state using package name and optional device serial.
Instructions
Clear all data for an app (like fresh install)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:613-617 (handler)The handler function for the 'clear_app_data' tool, registered via the @mcp.tool() decorator. It clears all application data (equivalent to a fresh install) using the ADB 'pm clear' command on the specified package name and optional device.@mcp.tool() def clear_app_data(package_name: str, device_serial: str | None = None) -> str: """Clear all data for an app (like fresh install)""" return run_adb(["shell", "pm", "clear", package_name], device_serial)