ACC Logo
ADBPermissionsSafe

adb shell pm grant <package> <permission>

Grant runtime permission to an application

What It Does

Grants a declared runtime permission (e.g. WRITE_SECURE_SETTINGS, ACCESS_FINE_LOCATION) to an app without user prompt.

Command Syntax
Terminal
$adb shell pm grant <package_name> <permission_name>
Parameters & Placeholders Breakdown

This command syntax includes specific placeholder tokens. Below is an explanation of what each word represents and concrete real-world values to replace it with:

<package_name>Application Package ID

The unique reverse-domain bundle identifier of the Android application defined in its AndroidManifest.xml.

Real-world value:com.whatsapp or com.android.chrome
Command syntax: adb uninstall com.whatsapp (or: adb shell pm clear com.android.chrome)
To list all installed packages on your phone, execute "adb shell pm list packages".
<permission_name>PERMISSION NAME Parameter

Replace this placeholder with your specific permission name value.

Real-world value:your-permission_name
Command syntax: adb shell pm grant <package_name> your-permission_name
<package>Application Package ID

The unique reverse-domain bundle identifier of the Android application defined in its AndroidManifest.xml.

Real-world value:com.whatsapp or com.android.chrome
Command syntax: adb uninstall com.whatsapp (or: adb shell pm clear com.android.chrome)
To list all installed packages on your phone, execute "adb shell pm list packages".
<permission>PERMISSION Parameter

Replace this placeholder with your specific permission value.

Real-world value:your-permission
Command syntax: adb shell pm grant <package_name> <permission_name>
Usage Examples
$adb shell pm grant com.example.app android.permission.WRITE_SECURE_SETTINGS
$adb shell pm grant com.example.app android.permission.ACCESS_FINE_LOCATION
Prerequisites & Requirements
  • App must declare the permission in its AndroidManifest.xml
Related Commands
Found an error or missing flag for adb shell pm grant <package> <permission>?

Submit a correction or request additional examples on GitHub.

Having issue? Contact @mkr_infinity

Direct technical assistance & ROM flashing troubleshooting by Mohammad Kaif Raja.

Contact @mkr_infinity