Exception occurred while executing grant: How to Fix
In this guide, we will show you the steps to fix the “Exception occurred while executing grant” error. Many OnePlus, Oppo, and Vivo users have voiced their concern that whenever they try to execute a specific ADB or rather the ADB shell command, then they are greeted with the aforementioned error message and the command fails to execute.
In most cases, this usually happens when they are trying to grant system-level API access to a third-party app. So if you are also getting bugged by this “Exception occurred while executing grant” error message, then this guide will make you aware of a method to rectify this issue once and for all/ So without further ado, let’s get started.
- Fix Exception occurred while executing grant OnePlus Xiaomi
Fix Exception occurred while executing grant

In order to fix this issue, all that you need to do is turn off Permission Monitoring, or in more confusing terms, enable “Disable Permission Monitoring” in OnePlus or Disable MIUI Optimization in Xiaomi [Poco/Redmi/Mi]. Here’s how it could be done:
OnePlus
- Head over to Settings > About Phone > Tap on Build Number 7 times.
- Then go to Settings > System > Developer Options.
- Now enable the toggle next to “Disable Permission Monitoring”.
- Finally, force stop the app to whom you are granting the WRITE SECURE SETTINGS permissions and then re-execute the ADB command.
Xiaomi
- Head over to Settings > About Phone > Tap on MIUI version 7 times.
- Then go to Settings > Additional Settings > Developer Options.
- Now tap on Reset to Default Values 5 times.
- This will bring the “Turn off MIUI Optimization” option. Disable its toggle, wait for 5 seconds, and tap on Accept.
- If you have the USB Debugging (Security Settings) option [under Developer Options], then “enable” it as well.
- Now force stop the app to whom you are granting the WRITE SECURE SETTINGS permissions and then re-execute the ADB command.
- ADB Sideload Status 1: Update package is older Error [Fixed]
- ADB Unable to Allocate Bytes Error: How to Fix
- How to Fix ADB Device Offline Error: Detailed Guide
- Fix Waiting for Device Error in ADB or Fastboot Commands
- Tommaso 2 years ago Reply mi continua a dare errore
- Kishan Rathod 3 years ago Reply Thank you so Much
- Toni 3 years ago Reply Is it the same procedure for Xiaomi phones like Redmi?
(Cancel Reply)
Δ