How to Revoke and Grant Android Permissions using ADB

Android apps need certain permissions for functioning properly. While most Android apps require basic permissions, some of them might request higher-level permissions. It is important that you understand how Android permissions work, how they impact your device, and more to ensure security and privacy.

When you install an app from the Play Store or sideload it using ADB, you need to grant it certain permissions before you can start using the app. Granting the wrong permissions can end up putting your device at risk. For instance, if the game app asks for access to contacts and messages, it might lead to data theft or message spamming from unknown sources.

By managing the app permissions wisely, you’ll be able to protect your handset from unauthorized access and prevent any third-party apps from accessing sensitive information. With that said, you’ll want to know the right way to grant and revoke Android permissions. In this guide, you will get to know how to grant and revoke Android Permissions using ADB.

How to grant Android permissions using ADB

Android permissions

Here are the steps you need to follow to grant Android permissions using ADB –

Android SDK Platform Tools
Android SDK Platform Tools
  • Start by heading over to the platform-tools folder and then launch a PowerShell window with its path.
Open powershell
Open powershell
  • After that, go to Settings -> Display on the smartphone, extend the screen timeout to five minutes, and then connect it to your PC using a USB cable.
  • Then, you should type the following command in PowerShell and then press “Enter” for executing it. Allow USB Debugging when requested.
Allow usb debugging android
Allow usb debugging android
  • You will be able to get the Device ID or Serial Number in the command window and you need to give the following command –
adb devices
ADB devices
ADB devices
  • After that, execute this command and you will see the codename of your device followed by a “$” sign –
adb shell
  • You will have to execute the following command after the “$” sign to grant Android permission to an app –
pm grant [package-name] [android-permission-name]
  • Now, you should find the Android app package name that you wish to grant permission to
  • Execute the following command to grant Android permission. For instance, if you wish to let the Chrome browser permission to access the precise location, give the following command –
pm grant com.android.chrome android-permission.ACCESS_FINE_LOCATION
  • That’s it, you’ve granted Android permissions using the ADB command!

How to revoke the permissions

Here are the steps to follow to revoke Android permissions using ADB –

  • You should start by opening the PowerShell window on your PC
  • Connect your Android smartphone using a compatible USB cable. Make sure that you extend the screen timeout on your device such that the screen isn’t locked while executing ADB commands.
  • Verify that ADB is able to detect your device using the following command –
adb devices
  • Execute the following command –
adb shell
  • Type this command after the “$” command and then press enter –
pm revoke [package-name] [android-permission-name]
  • For instance, if you wish to revoke the camera permission from the Facebook app, you need to use the command like this –
pm revoke com.facebook.katana android.permission.CAMERA
  • The permission will get revoked from that particular Android app

We hope this guide helped you grant and revoke Android permissions using ADB. If you have any questions or suggestions, feel free to mention them in the comments section.

Aviral Sharma
Aviral Sharma
Android Expert
Aviral Sharma is a talented and passionate writer who has been using words to express his thoughts ever since he learnt how to hold a pen. He is passionate about outer space, history, sports and most importantly technology. Aviral is a regular writer for rootmygalaxy.net and has been getting better by the day. He currently own Samsung Galaxy S24 Ultra, iPhone 13 and a HP Pavilion laptop

Leave a Comment