Unable to grant permissions using adb

Search This thread

ticatc3

Member
Sep 21, 2012
7
0
xiaomi mi max 2
I get an error:

adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS

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

Messenia

New member
Aug 14, 2018
1
0
Permissions not allowed

I'm not able to get permission either

./adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS

Operation not allowed: java.lang.SecurityException: Permission android.permission.BATTERY_STATS is not a changeable permission type
 

tschesny

New member
Jan 4, 2020
1
1
In the developers menu, you will find usb debugging and a bit more down the other one. I had to select both to get it working (mi 9t pro on miui 11 android 10)

Hi,

i am struggling with this right now. I got a Note 8 Pro with MIUI Global 11.0.3. I am trying to get BetterBatteryStats to show me what wakes up my phone. When using ADB i get the same error message ticatc3 got.

What exact setting do i need to activate? Most of them want me to "sign in to my Mi Account first" (what the heck for?).

If i knew how to attach a screenshot i would do so.

The Settings i got are:

USB debugging
Install via USB
USB Debugging (Security Settings)
Select debug app

Greetings
 
  • Like
Reactions: Math_Apolo

dadri

Member
Dec 26, 2019
15
24
Realme X2 Pro - Color OS6 - USB debugging

Hey,

I just had the same problem with my Realme X2 Pro. USB debugging was not enough. It worked after I activated the bottom most option in the developer options:
"Disable Permission Monitoring" (English) / "Erlaubnisüberwachung deaktivieren" (German)

Just for completeness.
 

sirnono

Member
Nov 21, 2007
35
16
Hey,

I just had the same problem with my Realme X2 Pro. USB debugging was not enough. It worked after I activated the bottom most option in the developer options:
"Disable Permission Monitoring" (English) / "Erlaubnisüberwachung deaktivieren" (German)

Just for completeness.

thanks !

I was exactly looking for this :)
 
  • Like
Reactions: xdaluka1

gorrinho.jr

Member
Dec 8, 2019
8
0
Hi,

i am struggling with this right now. I got a Note 8 Pro with MIUI Global 11.0.3. I am trying to get BetterBatteryStats to show me what wakes up my phone. When using ADB i get the same error message ticatc3 got.

What exact setting do i need to activate? Most of them want me to "sign in to my Mi Account first" (what the heck for?).

If i knew how to attach a screenshot i would do so.

The Settings i got are:

USB debugging
Install via USB
USB Debugging (Security Settings)
Select debug app

Greetings

You have to enable all of them so that you can grant permissions
 

bintoito

Member
Nov 2, 2010
24
1
thanks a lot dadri, I was having the exact same problem on my x2 pro with realme ui and with yoyur input I finally got betterbatterystats working has it should ;)
 

jumpman95

New member
Mar 24, 2019
4
0
Not sure if this is the same issue or not but I am trying to run an adb command for the first time, the command is this

adb shell pm grant com.maxmpz.equalizer
android.permission.dump

These commands are listed under two different lines. When I try to run them separately I get an error saying no permissions specified. When I run them under one line I get an error that says,

Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown permission: android.permission.dump

on my LG G7 the developer options are a bit different, under USB debugging, this is what i see..


What should I do to get this to work?
 

SmawtPho20

Member
Jun 6, 2020
16
1
I'm having this problem on my LG V20 with Oreo. It let me enable 2 of 3 permissions, but not PACKAGE.USAGE.STATS.

The error:
Operation not allowed: java.lang.SecurityException: Package com.asksven.betterbatterystats_xdaedition has not requested permission android.permission.PACKAGE_USAGE_STATS
 
Last edited:

ashwinzagr8

New member
Aug 15, 2021
1
0
Realme X2 Pro - Color OS6 - USB debugging

Hey,

I just had the same problem with my Realme X2 Pro. USB debugging was not enough. It worked after I activated the bottom most option in the developer options:
"Disable Permission Monitoring" (English) / "Erlaubnisüberwachung deaktivieren" (German)

Just for completeness.
THANK YOU!!!!! Man i thought i was screwed as a use taser a lot and needs a LOT of ADB functions like monitoring Clipboard. this should be the 1st google search entry when searching for this problem. I literally made an account just to post this .
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Realme X2 Pro - Color OS6 - USB debugging

    Hey,

    I just had the same problem with my Realme X2 Pro. USB debugging was not enough. It worked after I activated the bottom most option in the developer options:
    "Disable Permission Monitoring" (English) / "Erlaubnisüberwachung deaktivieren" (German)

    Just for completeness.
    12
    The option is enabled and still nothing!
    You have to turn all 3 usb debugging options on for miui.
    6
    also you need to force stop the app that you are granting this permissions for
    4
    For COLOR OS you have to disable permission monitoring, is at the botton of developer options. USB Debugging and disable permissions, you have to select both options.
    2
    I have your exact same device you do with USB debugging enabled and Disable Permission Monitoring enabled but still get the same error. I'm going to reboot my phone and try again.

    I'm trying to run - "pmg rant com.jpwolfso.privdnsqt android.permission.WRITE_SECURE_SETTINGS"
    Okay you have to toggle "USB debugging" off and back on after the "disabled permissions monitoring" is enabled. I think the problem is if "USB debugging" is on when you enable "disabled permissions monitoring" it doesn't see the change.