grant
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Grant an app's permissions up front, so a first-launch permission dialog never appears to block the flow. These call app_grant.
grant
public void grant(String app, String... permissions)
Grants permissions up front, so no dialog blocks the flow.
Names are cross-platform ("camera", "location",
"contacts", …); "all" grants everything the app
declares, and a platform name such as "android.permission.NFC"
also works. On Android the result is verified by reading the state
back, because pm grant reports success for permissions the app
never declared.
@param app the package name (Android) or bundle id (iOS)
@param permissions cross-platform names such as "camera", "all", or platform names
Examples
Grant two permissions before a flow
device.grant("com.example.shop", "camera", "location");