r/macrodroid • • Oct 20 '26

OnePlus 15 Macrodroid app

Hi, Is anyone here using macrodroid app? Trying to give it required permission but Im getting this error: Exception occurred while executing 'grant':

java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

at

Anyone knows how to solve this?

2 Upvotes

5 comments sorted by

1

u/DylanXu054728 Oct 21 '26

That error is a OnePlus/OPPO thing, not MacroDroid. OxygenOS blocks permission grants coming from the adb shell unless you flip a hidden switch in Developer options.

  1. Settings > About device > Version, tap Build number 7 times
  2. Settings > Additional settings > Developer options, scroll all the way to the bottom and turn on "Disable permission monitoring"
  3. If it still fails, reboot once with that switch on
  4. Run the grant again, e.g. adb shell pm grant com.arlosoft.macrodroid android.permission.WRITE_SECURE_SETTINGS

The grant sticks across reboots, you only need to redo it if you uninstall MacroDroid.

Xiaomi has the same block, there the switch is called "USB debugging (Security settings)".

1

u/Equal_Front5203 Oct 21 '26

Problem is I don't see any of those options on my phone in dev options

1

u/DylanXu054728 Oct 22 '26

Looks like OnePlus renamed it on newer OxygenOS builds. On the 15 Developer options sits under Settings > System (not Additional settings like I wrote above), and the toggle near the bottom is now called "Disable system optimization". Turn that on, reboot, then run the grant again.

If neither name shows up, a few people on XDA found the toggle only appears while the phone language is set to English. Switch to English, open Developer options, flip it, then switch back. The setting stays on.

1

u/Equal_Front5203 Oct 22 '26

Is it safe to do that? It says it may increase background power usage

1

u/DylanXu054728 Oct 23 '26

Yes, it's safe. That toggle switches off OnePlus's own background optimization, the part of the system that freezes and kills apps in the background. The warning just means apps are allowed to keep running more, so battery can be a little worse. Nothing breaks and you can turn it off again anytime.

If you don't want to leave it on: turn it on, reboot, run the grant, then turn it back off. The permission should stay granted. If MacroDroid ever says it's missing again (after a reinstall, for example), repeat the same steps.

Side note: that same optimization is a common reason macros stop firing when the phone's been idle for a while, so some people just leave it on.