android_prepare
Prepare an Android app for testing by granting usage-stats and overlay permissions, POST_NOTIFICATIONS, and optionally enabling an accessibility service. Safe to call repeatedly.
Instructions
Grant the special permissions that pm grant cannot, so an app is actually testable.
Sets usage-stats and overlay appops, grants POST_NOTIFICATIONS, and optionally enables an accessibility service. Safe to call repeatedly.
Args: package: App package id, e.g. com.example.app device: Device serial; defaults to the first physical device. accessibility_service: Fully-qualified service, e.g. com.x/.service.MyService
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": {
"package": "<package>"
},
"name": "android_prepare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | ||
| package | Yes | ||
| accessibility_service | No |