Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ivnj

macrumors 68000
Original poster
Dec 8, 2006
1,512
100
My LG VELVET 5G T-Mobile battery not lasting very long. Health is ok. It must be the **** load of apps I have installed (750 , don't ask). So I downloaded BetterBatteryStats for 1 dollar (I had a credit normally 2 bucks). But it asks me for these commands so I need to grant access before it works.

adb -d shell pm grant com.asksven.betterbatterystatsandroid.permission.BATTERY_STATS

adb -d shell pm grant com.asksven.betterbatterystatsandroid.permission.DUMP

adb -d shell pm grant com.asksven.betterbatterystatsandroid.permission.PACKAGE_USAGE_STATSc

adb -d shell settings put global hidden_api_policy 1

I tried a windows 11 HP laptop (originally came with 10) and it does not work. No devices found eventhough it is in device manager and on my computer. So I tried mac and no luck either. What am I doing wrong. I downloaded the files from here.


I did terminal and typed in echo $PATH. I could not figure out edit the path. So I just did command and shift and period and went to usr/local and made a bin folder. I copied the stuff there. Now it no longer says adb command not found.

So I tried this again.

adb -d shell pm grant com.asksven.betterbatterystatsandroid.permission.BATTERY_STATS

But this time it says:

Error: no permission specified

What am I doing wrong?
 

ivnj

macrumors 68000
Original poster
Dec 8, 2006
1,512
100
I found this. I went back to the HP laptop


I changed in dubugging settings to midi device and allowed debugging said ok. Then

adb -d shell settings put global hidden_api_policy 1

Then it gave me no error. Sweet success. Or so I thought. Then I treide this again.

adb -d shell pm grant com.asksven.betterbatterystatsandroid.permission.BATTERY_STATS

and it said

Error: no permission specified

So not doing something right. What could it be?
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,239
13,311
(sigh)
For some reason, when I see "ADB", I'm still thinking, "Apple Desktop Bus".
I'll bet most forum members don't even know what that was...!
 
  • Like
Reactions: x_man_

ivnj

macrumors 68000
Original poster
Dec 8, 2006
1,512
100
I fixed it in case anyone is wondering.

 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.