Changing the DPI/"display size" on the stock global rom without root - Xiaomi Mi Max 2 Themes, Apps, and Mods

tldr; the stock global MIUI rom lacks a display size setting, but an awesome free option by zacharee1 lets you set it anyway, even without root, and with no need to reboot or anything:
https://labs.xda-developers.com/store/app/com.zacharee1.dpichanger
----
I love the Max 2 -- way more than I thought I would! I bought it as a replacement for my old, sadly dead Nexus 7 tablet, but if it had LTE bands for US T-Mobile, this might have been my next phone. But for all that, MIUI made some "customization" decisions to android that I just don't understand... like two finger drag for expanding a notification... and removing the "Display Size" setting.
On other Android N roms, you can easily adjust the zoom/DPI/display size, making things smaller or larger. The stock global MIUI version on the Max 2, however, is missing the setting (and the "Smallest width" setting in developer options.) I thought I was out of luck after trying an option from the play store that failed, but found an app in XDA Labs from zacharee1 that worked!
It did require enabling adb, and developer options; in addition steps, I had to go to developer options and enable "USB debugging (security settings)" with a sim card inserted. Normally I used the Max 2 without one, but if you don't have a sim card inserted it will tell you to insert one, then fail.
Anyway, if anyone else would like to fit a bit more content on the screen, I'm really happy with this app so far! Some of Xiaomi's own apps don't quite scale well, which is probably why they disabled it, but they just have extra padding around the content. They still work just fine.

Awesome!

Sorry, noob here. When I run the command it tells me "error : no devices/emulators found"
I have turned on both USB debugging options in developer options and am using Minimal ADB and Fastboot. No Root.
Any help would be greatly appreciated!

Worked well!
Just chiming in and letting you guys know that the app package is zacharee1 (one), not zachareel (L). Gave me some problems for a bit!

user4001 said:
I have turned on both USB debugging options in developer options and am using Minimal ADB and Fastboot. No Root.
Any help would be greatly appreciated!
Click to expand...
Click to collapse
Oh, sorry. I've never used minimal adb before -- have you tried running the adb command as an administrator? (You might have to run "adb kill-server" first, it will used an existing adb server with fewer privileges if it exists.)
whd5015 said:
Worked well!
Just chiming in and letting you guys know that the app package is zacharee1 (one), not zachareel (L). Gave me some problems for a bit!
Click to expand...
Click to collapse
Nice! That's a good tip, too, thanks. (I've wasted hours before figuring out a capital O wasn't a 0 before...)

ldrn said:
Oh, sorry. I've never used minimal adb before -- have you tried running the adb command as an administrator? (You might have to run "adb kill-server" first, it will used an existing adb server with fewer privileges if it exists.)
Nice! That's a good tip, too, thanks. (I've wasted hours before figuring out a capital O wasn't a 0 before...)
Click to expand...
Click to collapse
I'll try the administrator thing, thanks. I have no idea what
what ADB kill server is but will Google when I get home.

I tried it without root. I using adb in administrator mode, but it gives me an error:
C:\adb>adb shell pm grant com.zacharee1.dpichanger android.permission.WRITE_SECURE_SETTINGS
Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
Any suggestions?

ruairi said:
Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
Click to expand...
Click to collapse
Actually, yep! In developer options, there is a "USB debugging" toggle, then three lines down a "USB Debugging (Security settings)" toggle, that's the error you get when you have the first one toggled but not the second. You need both turned on.
(I'm speaking from personal experience, I made that same mistake at first; it's a bit confusing that the names are almost the same!)

thanks @ldrn, I'll give it a shot.

Works like Charm. I have set the DPI to 410 Thanks!

adb shell wm density XXX
i use "adb shell wm density 420"
display will refresh every time i change dpi. no sestart require

Is this safe for MIUI rom?

w4h1d said:
Is this safe for MIUI rom?
Click to expand...
Click to collapse
Yes it is safe tested in MIUI Global 8.5 | Stable
make sure USB debugging (Security settings) is enabled in developer options

The link is dead. Where can I download the app?

inunt said:
i use "adb shell wm density 420"
display will refresh every time i change dpi. no sestart require
Click to expand...
Click to collapse
So do I have to write this command on my computer? No app needed? If app from first post is needed, where can i find it?

Link is not working. Please new link? Thank you.

Link dont work

Can some one tell me what is the stock value of DPI

reversegear said:
Can some one tell me what is the stock value of DPI
Click to expand...
Click to collapse
stock value of dpi is 440

Link does not exist
The link to above app says that the file does not exist on the server. Can anyone please give me the valid link for it?

Related

[mod] wind - Canada csc and gps fix for vibrant and tab

Enable USB Debugging and Run the batch file from the attached and follow onscreen Instructions.
75 downloads - no confirmation - files removed.
Doesn't seem to want to temp root my phone. Tried with and without restart numerous times. The phone is rooted, and adb is installed correctly (or at the very least it's always done what I've wanted it to) but the batch times out when checking for temporary root every time. Oh well it was worth a shot.
I think "usb debugging" is not enabled on your phone.
Go to settings, applications, developement and enable usb debugging.
i'm with Canadian Mobilicity ... i am using Bionix V (official Froyo) and its giving me almost instantaneous GPS fix...
Axura worked as well... but this one is damn fast....
What are the commands from the terminal?
This sound good.
Do I install via cwm?
Sent from my SGH-T959 using XDA App
a1jatt said:
I think "usb debugging" is not enabled on your phone.
Go to settings, applications, developement and enable usb debugging.
Click to expand...
Click to collapse
No, USB debugging definitely was on. I always make sure it is. Otherwise straight ADB wouldn't work properly like I mentioned it always has for me
Besides, it tells you in the notifications bar if it's on whenever you plug in, and it's definitely on.
Maybe later I'll open up the batch and try the commands by hand from ADB.
hussarfilms said:
This sound good.
Do I install via cwm?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
No, just double click on the install file.
Deathsnapper said:
No, USB debugging definitely was on. I always make sure it is. Otherwise straight ADB wouldn't work properly like I mentioned it always has for me
Besides, it tells you in the notifications bar if it's on whenever you plug in, and it's definitely on.
Maybe later I'll open up the batch and try the commands by hand from ADB.
Click to expand...
Click to collapse
Maybe,
it gave me same error only when i had it disabled.
a1jatt said:
Maybe,
it gave me same error only when i had it disabled.
Click to expand...
Click to collapse
Going through and doing it by hand. Pushing the files now. The line:
"%adb% -d push %gps% /system/etc"
makes total sense, in that it's pushing the gps.conf file to the folder /system/etc
but the lines following it:
"%adb% -d push %f1% /system/csc/WND/system/CSCFiles.txt"
and so on, they seem to be trying to push the txt file to a txt file already on the device. The shell tells me that "/system/csc/WND/system/CSCFiles.txt" isn't a valid file or directory.
There don't seem to be any lines that make directories /system/csc/WND/system/{files}
Should I assume that's still the intended destination and not an error? Go ahead and put some mkdir lines into busy box?
EDIT: DONE. It rebooted, installed packages, etc. Formatted data and cache when it did, so booting was like first boot (took a while, showed the general 'new rom' screens, etc.) Checking GPS now/soon.
Does it work on Mobilicity?
good work!
It should fix gps on mobilicity, i will add apn settings for mobilicity later.
On mobili u dont have to do *#06# or *#272 , just run the file and reboot.
giving me an error too
Just wanna be clear
I run the prog
Let it do its thing- exit
Then reboot?
Sent from my SGH-T959 using XDA App
How do you get it to work for tmobile in usa?
Sent from my SGH-T959 using Tapatalk
sorry but what does this do? I'm on wind mobile
I'm also using a T-Mobile Galaxy Vibrant on the Wind Mobile network.. in Vancouver.
Does this simply change the settings to use something other than supl.google.com?
it doesnt work gives me an error
I'm going to hold off on this until the errors have been addressed.. seems like there is a bug in the script (maybe).

4X extremely slow after rooting/reboot

So, I followed the guide we all did here:
http://forum.xda-developers.com/showthread.php?t=1818502
And before someone asks: I have deleted the Backup app (IS11LG_SystemBackupTest.signed.apk) we had to install during rooting after the phone was rooted.
The phone then happily ran, rooted. SUpersu was installed/updated, the phones root check said it's all perfect, I was a happy camper. But today I had to reboot it. I can't say if it was the first reboot after rooting, sadly. The phone boots up, arrives at the lockscreen (some colorful defaultthing, before I get to see my GO Locker screen after login), and then stops being responsive, it basically at first feels like it's not reacting at all. Some things are responsive, strngely ... I get accurate sounds when touching the screen for instance. If I then wait, I eventually get to the SIM Unlock ... which is also totally unresponsive, it will maybe show two digits, then freezes up. Strangely, I could type the remaining digits and hit OK and the SIM would unlock ... but the screen no longer showed what I typed. I then arrive at GO locker, can unlock it (sluggish and slow again) and finally am properly logged in, but still totally sluggish and slow. Needles to say it's a pseudobrick that way, unusable.
What's going on and what could I check?
Please try the following:
alexp999 said:
REALLY SLOW AFTER ROOT?
Remove the "SystemBackupTest" app, if you haven't already.
On your phone, go to "Settings -> Developer options" and make sure "USB debugging" is TICKED
Connect your phone via USB to your computer.
Open a command prompt (may need admin privelages, right click, run as administrator)
Type without quotes "cd C:\o4xr" and press enter.
Type without quotes "adb shell rm /data/local.prop" and press enter.
Type without quotes "adb reboot" and press enter.
Click to expand...
Click to collapse
alexp999 said:
Please try the following:
Click to expand...
Click to collapse
Thanks, that fixed it! It's not easy to do, as the scrolling lists do not work, either, and you can't seem to get to the developer options, it won't scroll. Strangely enough "internally" it seems to do things ... if you re-enter the options, they're down to the end of the list, it looks like it doesn't update the screen properly (much like when I had to enter the SIM code).
Anyway, it's fast again, whew ... I was scared. What is the local.prop thing, if I may ask?
voon said:
Thanks, that fixed it! It's not easy to do, as the scrolling lists do not work, either, and you can't seem to get to the developer options, it won't scroll. Strangely enough "internally" it seems to do things ... if you re-enter the options, they're down to the end of the list, it looks like it doesn't update the screen properly (much like when I had to enter the SIM code).
Anyway, it's fast again, whew ... I was scared. What is the local.prop thing, if I may ask?
Click to expand...
Click to collapse
I'm not entirely sure, I just know it gives us temp root for the rest of the root script to run.
Hm, so its' not a systemwide ini file or so, that existed before ... it was created during the above rooting process and was an undesired leftover from it? I'm always a bit worried if I delete something with such an unspecific name in the OS
voon said:
Hm, so its' not a systemwide ini file or so, that existed before ... it was created during the above rooting process and was an undesired leftover from it? I'm always a bit worried if I delete something with such an unspecific name in the OS
Click to expand...
Click to collapse
Its actually created by the SystemBackupTest app.
The script then removes it just before issuing a reboot.
The only way it can come back, is if you accidently open that app again before uninstalling it.
alexp999 said:
Its actually created by the SystemBackupTest app.
The script then removes it just before issuing a reboot.
The only way it can come back, is if you accidently open that app again before uninstalling it.
Click to expand...
Click to collapse
I see, I might have done that ... good to know. Anyway, great that it works again, thanks again
laggy phone
My lg 4x hd is very slow after root...
I just tried to make this few steps above, but I got this message.
Any idea what to do?
Pls help me!
THX
66aaa
66aaaa said:
My lg 4x hd is very slow after root...
I just tried to make this few steps above, but I got this message.
Any idea what to do?
Pls help me!
THX
66aaa
Click to expand...
Click to collapse
It looks like you have either plugged in more than one android device, or you have an android emulator (from the SDK I guess) running. Unplug all USB devices (except keyboard and mouse) and then try again. Good luck!
If you have an emulator running try "adb -d shell rm /data/local.prop"
Edit: To see all adb-devices type "adb devices". This will return a list of all adb-devices connected (emulators + usb devices)
Dexxon said:
If you have an emulator running try "adb -d shell rm /data/local.prop"
Edit: To see all adb-devices type "adb devices". This will return a list of all adb-devices connected (emulators + usb devices)
Click to expand...
Click to collapse
I still don't understand and hope you do it...
THX for your help!
As you can see the same device is listed two times. Restarting the adb server may help. Just type "adb kill-server" and than launch the second command from your screenshot. Maybe this works.
Dexxon said:
As you can see the same device is listed two times. Restarting the adb server may help. Just type "adb kill-server" and than launch the second command from your screenshot. Maybe this works.
Click to expand...
Click to collapse
This is the result...what to do know?
THX
The devices is detected and the command is executed, but the file does not exist. Make sure that there is a file "prop.local" at /data. If not, you may have a different problem.
Maybe you have an emulator running or Bluestacks installed... Uninstall Bluestacks...
I don't think that this is the case as the device shows up with a serial number in the "adb devices" list.
To be sure it is the correct phone you could compare the serial number shown in the list with the serial number of your phone (you might find this information in settings -> about phone).
Dexxon said:
The devices is detected and the command is executed, but the file does not exist. Make sure that there is a file "prop.local" at /data. If not, you may have a different problem.
Click to expand...
Click to collapse
I don't have in the system/data "prop.local" file...sure....
What is emulator and Bluestacks?
I really don't understand this problem I have...
Could you help me pls?
THX
66aaaa said:
I don't have in the system/data "prop.local" file...sure....
What is emulator and Bluestacks?
I really don't understand this problem I have...
Could you help me pls?
THX
Click to expand...
Click to collapse
An emulator is a program which emulates Android so you can execute Android-Apps on your PC. BlueStacks is an emulator. It may show up as an adb devices, but this is not the case here.
Back to your problem: Are you sure the rooting process worked?
Did you reboot your phone after rooting?
I didn't root my phone under ICS so I don't have any experience with this
no one raised this question to confirm or did this info was provided anywhere
What version of ROM? ICS V10x? JB V20x? User could had used the wrong guide.
Best way out is to do a reflash and retry rooting if all fails.
Dexxon said:
An emulator is a program which emulates Android so you can execute Android-Apps on your PC. BlueStacks is an emulator. It may show up as an adb devices, but this is not the case here.
Back to your problem: Are you sure the rooting process worked?
Did you reboot your phone after rooting?
I didn't root my phone under ICS so I don't have any experience with this
Click to expand...
Click to collapse
I dont't have this Bluestacks emulatur, sure...
I have Superuser working properly on JB V20 stock ROM. The only thing it is very slow sometimes, Thats why I tried to make the process above...
I made the root few month ago...and rebooted many times since than...
Any idea what to do now?
THX

Help!!! my note 8 stuck in "system ui has stopped

Hi, just now I upgrade to the the last Samsung update and now I got the error.
The AOD is work and I got notification tone but can not enter to the phone.
I enter to safemode and still the same.
I hope there is a way to solved it without erase the phone.
I can't enter to download mode because I can't close the phone
What should I do?
SAME TO MEE... OMG!!! ****ing samsung send me this update|
i even cannot call any one with this phone right now ..
I did a factory reset and now i need to spend hours to download and customized all over again!!
I think it's because the tweaks and system modes of Substratum.
I think that on the next time we should delete all of the system modes.
Hope some one can approve it because I really don't want to get through this again.
What make it to a sad joke is that the update is not what i thought it was, still I don't have the new Samsung VPN.
All for nothing!!!
soilentgreen said:
I did a factory reset and now i need to spend hours to download and customized all over again!!
I think it's because the tweaks and system modes of Substratum.
I think that on the next time we should delete all of the system modes.
Hope some one can approve it because I really don't want to get through this again.
What make it to a sad joke is that the update is not what i thought it was, still I don't have the new Samsung VPN.
All for nothing!!!
Click to expand...
Click to collapse
Correct, you have to uninstall all your layers and substratrum mods before accepting the OTA. I just saw this but you can boot into safe mode while system ui is fc and uninstall all the mods there and you should be good when you boot out of safe mode. No factory data reset needed.
soilentgreen said:
Hi, just now I upgrade to the the last Samsung update and now I got the error.
The AOD is work and I got notification tone but can not enter to the phone.
I enter to safemode and still the same.
I hope there is a way to solved it without erase the phone.
Click to expand...
Click to collapse
I posted this before in another thread...
I was able to fix it without factory resetting my phone. To do it, connect your phone to a pc (pc that you previously connected your phone to and always allowed access), in cmd with adb, run "adb shell pm list packages > whateveryouwanttonameit.txt" and look through the text file for apps you installed that changed your status bar. Then in cmd run "adb uninstall com.appyouwanttouninstall". I did 4 among many, checked my phone, and didn't get the system ui has stopped messages
houboy said:
I posted this before in another thread...
I was able to fix it without factory resetting my phone. To do it, connect your phone to a pc (pc that you previously connected your phone to and always allowed access), in cmd with adb, run "adb shell pm list packages > whateveryouwanttonameit.txt" and look through the text file for apps you installed that changed your status bar. Then in cmd run "adb uninstall com.appyouwanttouninstall". I did 4 among many, checked my phone, and didn't get the system ui has stopped messages
Click to expand...
Click to collapse
Thanks for the tip! Rather than saving to text I just used one window to output the packages to stdout, while I used another to do the uninstalls. Removing these two packages fixed the issue:
com.android.settings.SwiftDark.Android8defaultgrey.SamsungS8
com.android.systemui.SwiftDark.SamsungS8
how can u access to cmd with adb ?
houboy said:
I posted this before in another thread...
I was able to fix it without factory resetting my phone. To do it, connect your phone to a pc (pc that you previously connected your phone to and always allowed access), in cmd with adb, run "adb shell pm list packages > whateveryouwanttonameit.txt" and look through the text file for apps you installed that changed your status bar. Then in cmd run "adb uninstall com.appyouwanttouninstall". I did 4 among many, checked my phone, and didn't get the system ui has stopped messages
Click to expand...
Click to collapse
Hello, give me tutorial, how can i uninstall apk from pc ?
i can access cmd but how can i uninstalled apk ?
please help,,,
Thanks,
Thank you for all the answers.
ggrant3876 said:
Correct, you have to uninstall all your layers and substratrum mods before accepting the OTA. I just saw this but you can boot into safe mode while system ui is fc and uninstall all the mods there and you should be good when you boot out of safe mode. No factory data reset needed.
Click to expand...
Click to collapse
But I did boot into safe mode and the phone continued to stuck on "system ui has stopped"
houboy said:
I posted this before in another thread...
I was able to fix it without factory resetting my phone. To do it, connect your phone to a pc (pc that you previously connected your phone to and always allowed access), in cmd with adb, run "adb shell pm list packages > whateveryouwanttonameit.txt" and look through the text file for apps you installed that changed your status bar. Then in cmd run "adb uninstall com.appyouwanttouninstall". I did 4 among many, checked my phone, and didn't get the system ui has stopped messages
Click to expand...
Click to collapse
enrico.fm08 said:
Hello, give me tutorial, how can i uninstall apk from pc ?
i can access cmd but how can i uninstalled apk ?
please help,,,
Thanks,
Click to expand...
Click to collapse
I never knew how to use adb,
There is any tutorial about it?
soilentgreen said:
Hi, just now I upgrade to the the last Samsung update and now I got the error.
The AOD is work and I got notification tone but can not enter to the phone.
I enter to safemode and still the same.
I hope there is a way to solved it without erase the phone.
Click to expand...
Click to collapse
Edwanzhuang said:
SAME TO MEE... OMG!!! ****ing samsung send me this update|
i even cannot call any one with this phone right now ..
Click to expand...
Click to collapse
Did any of you have substratum installed?
EDIT: i just read up higher.
This also happened to me with substratum. One thing I did before however is I already had adb debugging enabled and trusted with my pc via adb.
I used these instructions found here for adb
https://www.reddit.com/r/GalaxyS8/comments/737y3j/helpfix_substratum_system_ui_has_stopped_issue/
What is the latest version of samsung update?
Mine is N950FXXU2BQKG/N950FOXM2BQKG/N950FXXU2BQKG.
My phone updat 6 days ago, and I don't have the new samsung VPN.
And just to be clear, in the next update after uninstall all the layers and substratrum mods and accepting the OTA, it is safe to install all the layers again after the update?
Thanks again
soilentgreen said:
What is the latest version of samsung update?
Mine is N950FXXU2BQKG/N950FOXM2BQKG/N950FXXU2BQKG.
My phone updat 6 days ago, and I don't have the new samsung VPN.
And just to be clear, in the next update after uninstall all the layers and substratrum mods and accepting the OTA, it is safe to install all the layers again after the update?
Thanks again
Click to expand...
Click to collapse
You should have the VPN under wifi advance settings.
Yes it's safe to install all your layers and substratrum mods I using it on 2BQKG.
Merry Christmas to all!
BluePhnx said:
You should have the VPN under wifi advance settings.
Yes it's safe to install all your layers and substratrum mods I using it on 2BQKG.
Merry Christmas to all!
Click to expand...
Click to collapse
I don't have the VPN, and we on the same version. It's weired.
I need to "open" it somehow?
How do you color your notifaction clock and icons?
hello i just uptdated my software and im stuck with the same thing can somebody walk me thru how to fix this?
houboy said:
I posted this before in another thread...
I was able to fix it without factory resetting my phone. To do it, connect your phone to a pc (pc that you previously connected your phone to and always allowed access), in cmd with adb, run "adb shell pm list packages > whateveryouwanttonameit.txt" and look through the text file for apps you installed that changed your status bar. Then in cmd run "adb uninstall com.appyouwanttouninstall". I did 4 among many, checked my phone, and didn't get the system ui has stopped messages
Click to expand...
Click to collapse
Thanks houboy, you're a lifesaver.
Tried to center the status bar clock and the phone crashed.
Your method worked like a charm
I was reading through the reddit thread posted earlier and found an alternative solution which worked for me.
Log into Samsungs Find My Phone website, unlock your device and then switch on Power Saving Mode, then reboot. Once in Power Saver you will regain control of your phone. Now, switch off power saver and go disable all substratum mods and reboot again.
Happened twice to me while setting up my new Note 8. Resolved to finally wipe through hard reset menu, and setup as new phone. Some Substratum addon was lingering when I did a restore which was likely causing the UI crash.
this happened 3 times to my note 8, the culprit seems to be android pay, once you add a credit card to be specific . To fix the phone you need to put the phone in powersaving mode via Samsung dive then reboot.
once the phone rebooted in power saving mode just put it back to normal , after this procedure all cards are removed from google pay.
davnav899 said:
Did any of you have substratum installed?
EDIT: i just read up higher.
This also happened to me with substratum. One thing I did before however is I already had adb debugging enabled and trusted with my pc via adb.
I used these instructions found here for adb
https://www.reddit.com/r/GalaxyS8/comments/737y3j/helpfix_substratum_system_ui_has_stopped_issue/
Click to expand...
Click to collapse
What's strange is that I have substratum installed but never ran it but I'm still getting the system UI error, thank good it hasn't totally blocked need but still doesn't make sense why this is all happening. I forgot I even installed it honestly.
I just uninstalled it so I'll see if that changes anything.
@squick You could try booting into safe mode to see if its a program causing it, but for me, i updated my phone software(update) with the substratum ui apk installed which caused me to get the force close error where only the screen showed system ui has stopped. I used adb to get a list of packages and remove the substratum system ui apk. A sure way to fix would be to reset the phone, but if you're able to use it, try removing apps you dont need from your applications in the settings. It's possible there could be another app interfering with the system ui

GSam battery monitor/BBS on MIUI devices

Hello guys.
I can't get the two apps in the title to work. GSam doesn't even load once opened (all set to 0:00:00 and on "loading"), and both of them reject the command from adb for advanced stats, telling me "operation not allowed [...] neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS."
Do you know what's going on?
Answer on your question. Give all permissions to bbs from security app.
xdamami said:
Answer on your question. Give all permissions to bbs from security app.
Click to expand...
Click to collapse
Still no luck, I went to security app, manage application, BBS and activated all it needs, so permissions to phone, storage, start in background, lockscreen and home screen.
What am I still missing? From my PC I can't use the adb command..
Up
Anyone?
"operation not allowed [...] neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS."
Be sure you enabled TWO settings in Developer Options :
USB Debugging
USB Debugging (Security Settings)
Good luck!
virgil31 said:
"operation not allowed [...] neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS."
Be sure you enabled TWO settings in Developer Options :
USB Debugging
USB Debugging (Security Settings)
Good luck!
Click to expand...
Click to collapse
Thanks, found that two days ago! Now it's fine
virgil31 said:
"operation not allowed [...] neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS."
Be sure you enabled TWO settings in Developer Options :
USB Debugging
USB Debugging (Security Settings)
Good luck!
Click to expand...
Click to collapse
Thanks man. It was giving me issues on Android Pie

ADB commands not working

Has anyone gotten the ADB commands to work? I'm trying to see if I can get by without root, so I want to enable the enhanced battery stats in GSam battery. It doesn't work for me. I'm using the latest platform tools, and I have the USB file transfer checked.
Does anyone have any suggestions that I can try?
Thanks.
Have you enabled "USB debugging" in developer options? Cause ADB definitely works here, and i haven't done anything special to get it working. Steps i'd personally take if it wouldn't work are:
Make sure USB debugging is enabled and USB is physically plugged in.
Make sure everything is ok with the ADB drivers, double-check the device manager.
Check if the device appears in "adb devices", make sure its authorized on the device.
Try actual adb shell and other relevant adb stuff.
BTW, if you seem to have troubles with ADB drivers, you can try wireless ADB instead. It is only available without root on Android 11 and does require the absolute latest SDK platform tools, but hey, i've tested it, it works, and it doesn't require any special USB drivers. Follow the "Connect to a device over Wi-Fi" steps from https://developer.android.com/studio/command-line/adb to try that.
InfX said:
Have you enabled "USB debugging" in developer options? Cause ADB definitely works here, and i haven't done anything special to get it working. Steps i'd personally take if it wouldn't work are:
Make sure USB debugging is enabled and USB is physically plugged in.
Make sure everything is ok with the ADB drivers, double-check the device manager.
Check if the device appears in "adb devices", make sure its authorized on the device.
Try actual adb shell and other relevant adb stuff.
BTW, if you seem to have troubles with ADB drivers, you can try wireless ADB instead. It is only available without root on Android 11 and does require the absolute latest SDK platform tools, but hey, i've tested it, it works, and it doesn't require any special USB drivers. Follow the "Connect to a device over Wi-Fi" steps from https://developer.android.com/studio/command-line/adb to try that.
Click to expand...
Click to collapse
Thanks!
I had already done everything you suggested, but can't get the battery stats to work. I even tried it using wireless ADB, but had the same results. I get no indication that my command was accepted . I've never enabled permissions like this before, just used root, so I don't know if anything is even supposed to come up.
What command are you trying to use exactly?
InfX said:
What command are you trying to use exactly?
Click to expand...
Click to collapse
I used :
adb shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
and
adb shell settings put global hidden_api_policy 1
According to GSam labs website, I need to enable both of these.
I am going to try to contact the developer and see if I can get an answer as to why it's not working.
EMcTx said:
I used :
adb shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
and
adb shell settings put global hidden_api_policy 1
According to GSam labs website, I need to enable both of these.
I am going to try to contact the developer and see if I can get an answer as to why it's not working.
Click to expand...
Click to collapse
These work for me.
Sent from my Pixel 5 using XDA Labs
EMcTx said:
I used :
adb shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
and
adb shell settings put global hidden_api_policy 1
According to GSam labs website, I need to enable both of these.
I am going to try to contact the developer and see if I can get an answer as to why it's not working.
Click to expand...
Click to collapse
The first command supposed to grant a specific permission (BATTERY_STATS) to a specific app, i am unfamiliar with the second one (it turns a system setting named 'hidden_api_policy' on, but i have no idea what this setting is). I have no idea if those work as expected on Android 11, and Google loves changing stuff like that.
In any case, first, make sure you don't just run those commands from start->run or equivalent, but from a command line window, so if there are any errors you have a chance to read them. And finally, don't forget to force close and restart the app in question.
---------- Post added at 01:44 AM ---------- Previous post was at 01:40 AM ----------
ridobe said:
These work for me.
Click to expand...
Click to collapse
Then the OP just doing something trivial wrong, which is a good thing, since it can be fixed
ridobe said:
These work for me.
Sent from my Pixel 5 using XDA Labs
Click to expand...
Click to collapse
Did you get any text after you entered the commands that indicated you were successful? I've tried it multiple times without success. I may try to clear the data on the app and try again.
InfX said:
The first command supposed to grant a specific permission (BATTERY_STATS) to a specific app, i am unfamiliar with the second one (it turns a system setting named 'hidden_api_policy' on, but i have no idea what this setting is). I have no idea if those work as expected on Android 11, and Google loves changing stuff like that.
In any case, first, make sure you don't just run those commands from start->run or equivalent, but from a command line window, so if there are any errors you have a chance to read them. And finally, don't forget to force close and restart the app in question.
---------- Post added at 01:44 AM ---------- Previous post was at 01:40 AM ----------
Then the OP just doing something trivial wrong, which is a good thing, since it can be fixed
Click to expand...
Click to collapse
I am using the ADB shell in the platform tools folder. Yes, I'm sure I am making some stupid mistake . I had no problem rooting my Pixel 2Xl, so I'm hoping I can figure this out. I'll just keep trying.
EMcTx said:
I am using the ADB shell in the platform tools folder. Yes, I'm sure I am making some stupid mistake . I had no problem rooting my Pixel 2Xl, so I'm hoping I can figure this out. I'll just keep trying.
Click to expand...
Click to collapse
When you do a "adb devices" do you see your phone and are you getting any prompts on your phone?
Tel864 said:
When you do a "adb devices" do you see your phone and are you getting any prompts on your phone?
Click to expand...
Click to collapse
Yes, I do see my device, and I got a prompt on my phone the first time I connected.
I have managed to adjust my AOD brightness with ADB, so it must be something I'm doing wrong with the battery stats. I'm still waiting to see if the developer can give me any pointers. If I can't figure it out, I'll find another battery app.
I finally got it to work. The developer emailed me and told me that since I had the pro version, I needed to add pro after bbm.
Thanks for all the input!
I clearly remember you mentioning getting the package name wrong... the forum migration didn't exactly go smooth for xda, i guess :-/
Edit: WTF, now i see that last post, AFTER posting this one.
I'm having a similar problem.
Typing "adb reboot bootloader" using Windows Powershell, put my USB connected tablet into bootloader mode.
However when then typing "fastboot flash twrp.img" the command line returns "waiting for device" and appears to hang.
I definitely have Debugging ON, and "twrp.img" is in the adb folder.
AussieNordo said:
I'm having a similar problem.
Typing "adb reboot bootloader" using Windows Powershell, put my USB connected tablet into bootloader mode.
However when then typing "fastboot flash twrp.img" the command line returns "waiting for device" and appears to hang.
I definitely have Debugging ON, and "twrp.img" is in the adb folder.
Click to expand...
Click to collapse
fastboot flash boot twrp.img to install twrp, fastboot boot twrp.img to boot twrp
Got it eventually.

Categories

Resources