FORUMS
Remove All Ads from XDA

[Magisk] MIUI Auto Brightness Fix for Mi 9

160 posts
Thanks Meter: 124
 
By arddy1, Senior Member on 23rd April 2019, 03:29 PM
Post Reply Email Thread
The idea originally comes from my MIUI Auto Brightness Fix thread in Mi Mix 2s forum. Because i switched device to Mi 9, now i want to make mods for this device brightness too.

My experience with Miui roms, i think everything is fine and acceptable, except for the Auto Brightness! The screen goes very dark in low lights, and ridiculously bright in not-so-bright lights that makes my eyes sore. I never used the auto brightness before. But after I found this mod, then I can using this great feature in miui again. If you experience the same thing, then try this magisk module!

So what this module do? It adds framework-res to the /system/media/theme/default. With a magisk module you can do it systemlessly! To install it, just download the module then browse it in Magisk Manager.

If you dont like my setting values, just unzip my module, find framework-res file, unzip it, then edit the theme_values.xml to any values you want under "config_autoBrightnessLcdBacklightValues", then zip all back

To test if this module works, tap the Kernel Version in About Phone 5 times, then you will enter CIT. Go to num 21 light sensor. Cover your upper phone with your hands till the light sensor DAC reach 0. If the backlight is not going under 100 (or 80), then this module works! My module limits the minimal auto brightness, which the original can reach to 20 which is ridiculously very dark.

Remember, this mod only works on MIUI-based roms with android pie! Tested working on official MIUI, Xiaomi.eu, Revolution OS.

The download links in attachment.
Guide:
1. Legacy method, using framework-res file. Less compatibilty but safer to update rom and easier to costumize.
V1 : Initial release.
V2: Lower brightness in medium light.
V2.1: A bit adjustment to lower brightness in low light.
V3: Lower brightness in bright light. Brightness steps added to make it smoother.
V3.1: A bit adjustment to lower brightness in very low light. Lowest backlight value is now 80.
V4: More responsive to light changes. Lower brightness in low light to compensate new lowest 80 value.

2. Alternative method, using modified system overlay apk file. Use this if legacy method doesn't work. Still in testing wheter can survive after rom update.
V3b: take values from v3
V3.1b: take values from v3.1
V4b: take values from v4


Notes:
- DON'T activate DC anti flickering mode, it ruins the light sensor to become unresponsive
- All version have the same lowest backlight value (100), except v3.1 and v4 (80).
- Less bright = better battery life plus reducing risk of amoled burn-in.
- Editing the values can cause a mess. Add .disable_magisk file in cache partition if your phone cant boot then uninstall the module in manager.
The Following 15 Users Say Thank You to arddy1 For This Useful Post: [ View ] Gift arddy1 Ad-Free
 
 
23rd April 2019, 03:50 PM |#2  
*justintime*'s Avatar
Senior Member
Thanks Meter: 454
 
More
This was the missing piece with the MI9 experience.
I hate the auto brightness on the MI9

Definitely going to try out.... But I can't download the file?
23rd April 2019, 03:54 PM |#3  
Member
Thanks Meter: 3
 
More
Me too
23rd April 2019, 03:56 PM |#4  
arddy1's Avatar
OP Senior Member
Flag Jakarta
Thanks Meter: 124
 
More
Quote:
Originally Posted by *justintime*

This was the missing piece with the MI9 experience.
I hate the auto brightness on the MI9

Definitely going to try out.... But I can't download the file?

Quote:
Originally Posted by oski_58

Me too

Yeah dunno why it cant be downloaded. I have added the mirror link
The Following User Says Thank You to arddy1 For This Useful Post: [ View ] Gift arddy1 Ad-Free
23rd April 2019, 04:01 PM |#5  
*justintime*'s Avatar
Senior Member
Thanks Meter: 454
 
More
I have installed but it goes down to 19.

I have played around with some third party apps which control auto brightness.

I found that the value max brightness 255 in the app. Is half way in the brightness slider on the MI9
23rd April 2019, 04:10 PM |#6  
arddy1's Avatar
OP Senior Member
Flag Jakarta
Thanks Meter: 124
 
More
Quote:
Originally Posted by *justintime*

I have installed but it goes down to 19.

I have played around with some third party apps which control auto brightness.

I found that the value max brightness 255 in the app. Is half way in the brightness slider on the MI9

Which rom are you using?
Mine in rom 9.4.18 global beta is working. See my video capture: https://youtu.be/7-6oRz6YA9E
23rd April 2019, 04:13 PM |#7  
Junior Member
Thanks Meter: 1
 
More
On xiaomi.eu not work
23rd April 2019, 04:16 PM |#8  
arddy1's Avatar
OP Senior Member
Flag Jakarta
Thanks Meter: 124
 
More
Quote:
Originally Posted by Juawma

On xiaomi.eu not work

Sorry this is only for official Miui roms.
23rd April 2019, 06:08 PM |#9  
*justintime*'s Avatar
Senior Member
Thanks Meter: 454
 
More
Quote:
Originally Posted by arddy1

Which rom are you using?

Mine in rom 9.4.18 global beta is working. See my video capture: https://youtu.be/7-6oRz6YA9E

Ahhhh that's why. I am on Revolution OS 9.5.1

It's MIUI based from global dev.

Could you make it work for other builds?
24th April 2019, 12:06 AM |#10  
arddy1's Avatar
OP Senior Member
Flag Jakarta
Thanks Meter: 124
 
More
Quote:
Originally Posted by *justintime*

Ahhhh that's why. I am on Revolution OS 9.5.1

It's MIUI based from global dev.

Could you make it work for other builds?

Unfortunately no.
24th April 2019, 06:34 AM |#11  
*justintime*'s Avatar
Senior Member
Thanks Meter: 454
 
More
Quote:
Originally Posted by arddy1

Unfortunately no.

OK? Sounds a bit strange to me? A rom specific mod, while all Roms have the auto brightness with same flaw.

But i am not a developer.....

Hope that there will be another solution then.
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