Android Granting & revoking API 23+ permissions


Example

A one-liner that helps granting or revoking vulnerable permissions.

  • granting

    adb shell pm grant <sample.package.id> android.permission.<PERMISSION_NAME>
    
  • revoking

    adb shell pm revoke <sample.package.id> android.permission.<PERMISSION_NAME>
    
  • Granting all run-time permissions at a time on installation (-g)

    adb install -g /path/to/sample_package.apk