Grant a runtime permission
grant_permissionGrant a runtime permission to an Android app via ADB so it can access protected resources such as camera, location, or microphone.
Instructions
Grant a runtime permission to an app (pm grant <package> <permission>). Destructive: it changes the permissions the app holds; revoke_permission reverses it. Only changeable runtime permissions work; on stock Android these can be granted to non-debuggable apps too, though some restricted permissions still reject the shell.
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 |
|---|---|---|---|
| device | No | Device serial from list_devices; optional when exactly one device is connected. | |
| package | Yes | Package name, e.g. "com.example.app". | |
| permission | Yes | Permission name, e.g. "android.permission.CAMERA". |