How to Manage Android App Permissions with Root Access
Use root shell commands to review, revoke and restore Android camera and microphone permissions, verify the result, and know what to do without root.
Root access lets you inspect and change app permissions from a shell on the device, which is useful when you want tighter control over which apps can reach your camera or microphone. This guide covers runtime permissions and app operations with the standard Android shell tools. It also covers what to do when the device is not rooted.
Before you start
- A rooted device where the su command grants a root shell, either through a terminal app on the phone or through adb shell from a computer.
- The package name of the app you want to change. You can list installed packages with: pm list packages
- A note of the app's current permission state, so you can restore it later. The dumpsys command in the steps below shows it.
- An understanding that revoking a permission usually stops the app's running process, so save any work in that app first.
The pm, appops and dumpsys commands run locally on the device and do not need an online service. If you use a third-party root permission manager instead, check its documentation and privacy policy to see whether it sends data anywhere and how long it keeps logs. Do not assume local processing or limited data retention unless the developer states it.
Step-by-step instructions
- 1. Open a root shell. In a terminal app, type su and approve the root prompt. From a computer, run adb shell, then su.
- 2. Check the current permission scope of the app: dumpsys package <package>. In the runtime permissions section, each entry shows whether it is granted (granted=true or granted=false).
- 3. Revoke a runtime permission: pm revoke <package> <permission>. Copy the full permission name exactly as it appears in the dumpsys output, such as the CAMERA or RECORD_AUDIO entry.
- 4. To restore it later, run: pm grant <package> <permission>
- 5. For finer control, view the app's operation modes: appops get <package>
- 6. Change an operation mode, for example: appops set <package> CAMERA ignore or appops set <package> RECORD_AUDIO ignore. The ignore mode typically gives the app empty or blocked data rather than an error, while deny returns an error to the app.
- 7. To undo an appops change, run: appops set <package> CAMERA default
The pm commands only work on runtime permissions, the kind Android shows in a prompt. Install-time permissions are rejected with an error saying the permission cannot be changed. On Android 11 and later, camera and microphone permissions can be limited to while the app is in use. The system settings screen handles that option more clearly than shell commands. Menu names and locations vary by manufacturer and Android version.
Check the output
- Run dumpsys package <package> again and confirm the permission now shows granted=false, or granted=true after a restore.
- Run appops get <package> and confirm the mode you set is listed for the operation.
- Open the app and try the feature that uses the camera or microphone. A blocked app may show a black preview, record silence, ask for the permission again or show an error.
- On Android 12 and later, many devices show a status bar indicator while the camera or microphone is active. Use it to see whether access still happens.
These checks confirm the system setting, not how a specific app behaves. Some apps fall back to other features or fail without a clear message when device access is blocked.
Common problems and next steps
No root: you can still manage most camera and microphone permissions in the system settings, often in a permission manager under privacy settings. For shell-level control without rooting, connect the device to a computer with USB debugging enabled. The adb shell pm grant, pm revoke and appops commands work for most third-party apps without root, because the adb shell has enough privileges for these changes.
Error that the permission is not changeable: the permission is install-time or fixed by the system, so pm cannot change it. Check whether a related operation is listed by appops get, and change that instead.
App crashes or misbehaves after the change: restore the permission with pm grant or reset the operation with appops set <package> <operation> default, then restart the app.
Permissions change back on their own: on Android 11 and later, the system can reset permissions for apps you have not used for a while. Some manufacturer security tools also manage permissions. Recheck with dumpsys after an update or a long period of inactivity, and turn off automatic permission removal for that app in its settings if you want to keep the grant.