FORUMS

[GUIDE] Changing min width/DPI of MIUI 9 without rooting

6,079 posts
Thanks Meter: 13,930
 
By nicholaschum, Substratum Development Leader / Inactive Recognized Themer on 17th January 2018, 09:36 AM
Post Reply Email Thread
Hi all, this may have its own dedicated thread but I was not able to find it during my time with my Mi 6 and Mix 2.

When I moved over to MIUI I was shocked that they removed Min Width in Developer Options, because opening apps such as Telegram gave it such a horrid text size I could not adjust.

This will require you to have 5 minutes of your lunch break, a PC, and also depending on where you are accessing your Mi device, a VPN.

ATTENTION: To those who have used this command before on other devices, the device WILL RETAIN the density after a reboot. Don't worry about doing this every reboot, because you DO NOT HAVE TO.

NOTE: This will NOT cause any reboots of any kind, and you can still use themes from MIUI or wherever. The only apps I have noticed have a weird design will be the Themes app, where the app will look off tilted. Other than that, Xiaomi should have just left this in instead of neglecting their own app's density adaptation.


I am located in Hong Kong, or a China based region!
  1. Turn off wifi, and ensure your device is linked to a Mi Account
  2. Go to Settings -> About Phone -> Tap MIUI Version 7 times
  3. Go back, and go to Additional Settings -> Developer Options -> USB Debugging
  4. Then click on USB Debugging (Security settings)
  5. Go through the three prompted Apply dialogs with countdown, and ensure the toggle is enabled.
  6. If it isn't, ensure your wifi is disabled, mobile data is enabled and Mi account is linked
  7. Go to a PC with adb set up: https://forum.xda-developers.com/sho....php?t=2588979 (Windows)
  8. Open a Command prompt and type:
    Code:
    adb shell
    wm density 380
    exit
  9. I picked 380, but you can make it smaller
  10. To reset the density, type:
    Code:
    adb shell
    wm density reset
    exit


I am not living in a China based region!
  1. Turn off wifi, and ensure your device is linked to a Mi Account
  2. Install a VPN, such as Tunnelbear, and VPN back to an HK or China server (REQUIRED): https://play.google.com/store/apps/d....android&hl=en
  3. Go to Settings -> About Phone -> Tap MIUI Version 7 times
  4. Go back, and go to Additional Settings -> Developer Options -> USB Debugging
  5. Then click on USB Debugging (Security settings)
  6. Go through the three prompted Apply dialogs with countdown, and ensure the toggle is enabled.
  7. If it isn't, ensure your wifi is disabled, mobile data is enabled and Mi account is linked
  8. Go to a PC with adb set up: https://forum.xda-developers.com/sho....php?t=2588979 (Windows)
  9. Open a Command prompt and type:
    Code:
    adb shell
    wm density 380
    exit
  10. I picked 380, but you can make it smaller
  11. To reset the density, type:
    Code:
    adb shell
    wm density reset
    exit


Screenshots:



The Following 12 Users Say Thank You to nicholaschum For This Useful Post: [ View ]
17th January 2018, 01:16 PM |#2  
bleached45's Avatar
Senior Member
Flag Michigan
Thanks Meter: 481
 
More
I assume the vpn is for turning on ADB debugging? Does the global ROM require this as well? I'm 99% that I've used it without a vpn (though, my device is unlocked). I can't confirm now though as I'm no longer on MIUI.
17th January 2018, 04:02 PM |#3  
nicholaschum's Avatar
OP Substratum Development Leader / Inactive Recognized Themer
Flag University of Toronto
Thanks Meter: 13,930
 
Donate to Me
More
Quote:
Originally Posted by bleached45

I assume the vpn is for turning on ADB debugging? Does the global ROM require this as well? I'm 99% that I've used it without a vpn (though, my device is unlocked). I can't confirm now though as I'm no longer on MIUI.

USB Debugging (Security settings) only.

I am on global ROM.

Having your device BL unlocked means most, if not all restrictions have been lifted.
The Following User Says Thank You to nicholaschum For This Useful Post: [ View ]
17th January 2018, 06:36 PM |#4  
Senior Member
Thanks Meter: 375
 
More
Rogers is Canadian?
18th January 2018, 02:28 AM |#5  
nicholaschum's Avatar
OP Substratum Development Leader / Inactive Recognized Themer
Flag University of Toronto
Thanks Meter: 13,930
 
Donate to Me
More
Quote:
Originally Posted by allrockedout

Rogers is candian?

Yes
The Following User Says Thank You to nicholaschum For This Useful Post: [ View ]
18th January 2018, 06:05 PM |#6  
Senior Member
Flag Bandung
Thanks Meter: 123
 
More
I've tried the adb shell method a few times before on MIUI 9 on my Mi4 (from 480 to 400), but it wrecks the notification shade, especially on the quick tiles (it enlarge by themselves) and some notification row icons (somehow the icons ended up having small black-ish frame overlaid on the top-left). Possibly only on MM MIUI 9, since that's all Mi4 gets at best.

Is it because of how MIUI theming heavily uses bitmaps (with flawed asset scaling on their own default theme) rather than vector drawables for their glyphs?
18th January 2018, 08:56 PM |#7  
Member
Thanks Meter: 17
 
More
Great work around buddy, but in the end you'll have to change the rows and columns size too as those look horrid then.
Though I used EasyDPI and Xposed to rearrange these BASIC settings, one can always use the Default Theme Layouts.
20th January 2018, 12:15 PM |#8  
nicholaschum's Avatar
OP Substratum Development Leader / Inactive Recognized Themer
Flag University of Toronto
Thanks Meter: 13,930
 
Donate to Me
More
Quote:
Originally Posted by rxl.noir

I've tried the adb shell method a few times before on MIUI 9 on my Mi4 (from 480 to 400), but it wrecks the notification shade, especially on the quick tiles (it enlarge by themselves) and some notification row icons (somehow the icons ended up having small black-ish frame overlaid on the top-left). Possibly only on MM MIUI 9, since that's all Mi4 gets at best.

Is it because of how MIUI theming heavily uses bitmaps (with flawed asset scaling on their own default theme) rather than vector drawables for their glyphs?

Hmm that's weird, I never had issues with my notification shade.

That is a possibility if they don't use vector drawables, but I believe it's just like how Samsung once upon a time made all their apps at a fixed DPI so scaling just looks really bad.

I've been using default theme and another theme called Flam[DD] and changing DPI works flawlessly.



Sent from my Xiaomi Mi MIX 2 using XDA Labs
20th January 2018, 12:16 PM |#9  
nicholaschum's Avatar
OP Substratum Development Leader / Inactive Recognized Themer
Flag University of Toronto
Thanks Meter: 13,930
 
Donate to Me
More
Quote:
Originally Posted by OverLord2901

Great work around buddy, but in the end you'll have to change the rows and columns size too as those look horrid then.
Though I used EasyDPI and Xposed to rearrange these BASIC settings, one can always use the Default Theme Layouts.

Do you mean for the notification toggles? Yeah, it's pretty bad, but I usually don't root so it's better than seeing huge texts in apps haha.

Sent from my Xiaomi Mi MIX 2 using XDA Labs
20th January 2018, 12:38 PM |#10  
Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by nicholaschum

Do you mean for the notification toggles? Yeah, it's pretty bad, but I usually don't root so it's better than seeing huge texts in apps haha.

Yeah the toggles and even the rows and colums in a folder. These are actually basic things. Have to do these after every Weekly Updates too. Sucks.
22nd January 2018, 07:42 PM |#11  
Junior Member
Thanks Meter: 0
 
More
Thanks for the nice Guide!! Works awesome on my Mi Max 2.

Cheers!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes