Grant permission
grant_permissionGrant a runtime permission to an Android app via adb to skip the in-app permission dialog and let automated tests drive straight to the feature.
Instructions
Grant a runtime permission to an app (pm grant), e.g. android.permission.CAMERA — skips the in-app permission dialog so you can drive straight to the feature.
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>",
"permission": "<permission>"
},
"name": "grant_permission"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| package | Yes | Application package name. | |
| permission | Yes | Full permission name, e.g. android.permission.CAMERA. |