Marshmallow – Grant and Revoke permissions with adb

With Marshmallow waltzing into our phones soon, it comes with a new permission model.

To test your application permissions programmatically, you can use adb to grant and revoke the permissions.

Grant Permissions :

adb shell pm grant app-namespace android.permission.CAMERA

Example :

adb shell pm grant com.tout android.permission.CAMERA

Revoke Permissions :

adb shell pm revoke app-namespace android.permission.CAMERA

Example :

adb shell pm revoke com.tout android.permission.CAMERA
db shell pm revoke com.tout android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm revoke com.tout android.permission.READ_EXTERNAL_STORAGE
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s