Android’s runtime permission model asks you for access to sensitive resources (camera, location, contacts, etc.) the first time an app needs them. Over time you may have granted, denied, or revoked many permissions. Situations that call for a clean‑slate reset include:
Manually toggling each permission in Settings ▶ Apps ▶ [App] ▶ Permissions is tedious, especially if you have many apps. The Android Debug Bridge (ADB) provides a single command that restores the default “ask‑again” state for all runtime permissions, and it works on devices that are not rooted.
Prerequisites
All steps assume the device is running Android 6.0 (Marshmallow) or newer, because that is when runtime permissions were introduced. The pm reset-permissions command is available on Android 6.0+ but may be restricted on heavily customised OEM skins; the tutorial notes those cases.
Why this matters: USB debugging opens a secure channel for ADB to issue commands. Without it, the computer cannot communicate with the device.
platform-tools zip from the official Android developer site.C:\adb on Windows or ~/adb on macOS/Linux.cd path/to/platform-tools
adb version to confirm the binary is accessible.
adb version
Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
If the command is not found, add the folder to your system PATH or always invoke it with the full path.
adb devices
0123456789ABCDEF device
If the status reads unauthorized, check the device screen for the RSA fingerprint prompt and tap Allow.adb shell getprop ro.build.version.release
This should output the Android version number (e.g., 11).Why this matters: A successful adb devices listing proves the computer can send commands to the phone.
adb shell pm reset-permissions
What the command does: It clears the runtime permission grant database for all apps, returning each permission to the system‑defined default. For most permissions the default is “denied until the app asks”. System apps that require certain permissions for core functionality are automatically re‑granted by the OS.
Sometimes you only need to clean one misbehaving app. While pm reset-permissions works globally, you can achieve a per‑app reset by revoking all runtime permissions manually via ADB. The following script loops through the permissions a particular package holds and revokes them:
PACKAGE="com.example.app"
PERMS=$(adb shell dumpsys package $PACKAGE | grep granted=true | awk -F= '{print $2}')
for PERM in $PERMS; do
adb shell pm revoke $PACKAGE $PERM
done
After revoking, the next time the app needs a permission Android will prompt the user again, effectively achieving a “reset” for that app only.
Note: System‑level permissions (e.g., android.permission.ACCESS_NETWORK_STATE) are not exposed in the UI and remain granted because they are required for basic operation.
Not all devices behave identically. Below are common variations and how to handle them:
pm reset-permissions command behind a permission‑policy layer. If you receive java.lang.SecurityException: Permission denial, try running the command as the “shell” user:
adb shell su 0 pm reset-permissions
This requires the device to be rooted; otherwise you must fall back to the per‑app revocation script.
adb shell pm clear <package>) which also removes stored permissions.
adb connect 192.168.1.42:5555
The rest of the procedure is identical.
Make sure you are using the adb shell prefix. The pm tool lives inside the device’s shell, not on the host computer. The correct syntax is adb shell pm reset-permissions.
This occurs on devices that restrict the pm command to privileged users. Options:
su 0 as shown above.Re‑connect the USB cable, unlock the phone, and accept the RSA fingerprint dialog. If the dialog never appears, toggle USB debugging off and on again, then retry.
Some apps cache the permission state internally. Force‑stop the app (Settings ▶ Apps ▶ [App] ▶ Force stop) or clear its data (adb shell pm clear <package>) to force a fresh permission request.
pm tool. Attempting to bypass these restrictions without proper knowledge can brick the device.A full factory reset wipes user data, accounts, and apps – a heavy‑handed approach. Resetting permissions via ADB is a lightweight alternative when you only need to clean the permission state while preserving user data. It is especially handy before handing a device to a new user who may want to start with a fresh permission set without losing photos, messages, or installed apps.
adb devices.adb shell pm reset-permissions to clear all runtime permission grants.Following these steps gives you a clean permission slate without the hassle of a factory reset, preserving your data while restoring the privacy‑first behaviour Android was designed for.









