Android adb shell Granting & revoking API 23+ permissions

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

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
    


Got any Android Question?