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
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:
- 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” and go to STEP 6.
- In the case of Xiaomi, go to Developer Options > and 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.
- Now force stop the app to whom you are granting the WRITE SECURE SETTINGS permissions and then re-execute the ADB command.
That’s it. These were the steps to fix the “Exception occurred while executing grant” error. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.
- 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
Is it the same procedure for Xiaomi phones like Redmi?
Thank you so Much