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