Forrest logo
back to the adb tool

adb-shell:tldr:82218

adb-shell: Revoke a dangerous permission for an application.
$ adb shell pm revoke ${package} ${permission}
try on your machine

The command "adb shell pm revoke ${package} ${permission}" is used to revoke a specific permission from a package/application on an Android device using the Android Debug Bridge (ADB) tool.

Here's a breakdown of the command:

  • "adb shell" is used to enter the shell or command-line interface of the Android device connected via ADB.
  • "pm" refers to the "package manager" command-line utility in Android, which allows you to perform various package-related operations.
  • "revoke" is the command used with "pm" to revoke a permission from a package.
  • "${package}" is a placeholder for the package name of the application from which you want to revoke the permission. You need to replace "${package}" with the actual package name.
  • "${permission}" is a placeholder for the specific permission you want to revoke from the package. Again, you need to replace "${permission}" with the actual permission.

By executing this command with the specific package name and permission, ADB will revoke that particular permission from the given package/application on the Android device.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the adb tool