• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

MIUI Auto Brightness Fix (Magisk Mod)

Search This thread


Nov 7, 2018
HTC 10
Xiaomi Mi 6
Hi Is there any chance you could create this file for use with other ROMS like Lineage OS. This sensor issue seems to be across a number of ROM's that people are using. ideally something for Android 10, 11 would be nice. I'm currently using an app from the playstore called Velis Auto Brightness (Jure Ernoznik) which seems to help somewhat however a core app (flashed) would be better if possible.

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    Do you have problems with auto brightness in MIUI roms? Your screen brightness gets extremely dark in low light conditions, or the brightness spikes just with a few increase of light?
    For low brightness problem, actually you can adjust the minimum autobrightness in slider bar, but sometimes it will reset back to default minimum brightness. For example if you turn off auto brightness in game, when you turn it on again, it won't resume your settings. As a result the screen will get darker than your adjustment.

    I created magisk module to fix that. This will increase the minimum brightness in low light, and also reduce the over brightness in medium and high ambient light. The result will be smoother auto brightness step, and be more convenient for your eyes! :cool:

    There are two modules, one for Miui 10 running Android Pie, and the other ones for Miui 10 running Android Oreo. Dont install wrong module, because there are much more brightness values in Android P than O.
    The Oreo version may be not as good as Pie version, because i tested it in Redmi Note 5. My Mi Mix 2s currently running Miui 10 P beta 8.8.16 for Pie version testing. But it should give the same result. Oreo version works in Miui 9 too, but may results different.

    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.

    Download links in attachment.
    V1 for lowest brightness (best battery)
    V2 for a bit brighter in low light
    V3 for brighter brightness (best for full edge cover tempered glass user)
    V4 for more responsive and smoother auto brightness. Values are about similar to v3.

    To check if this module works;
    Tap the Kernel Version in About Phone 5 times, then you will enter CIT. Go to Light Sensor. Cover your phone light sensor on upper bezel (lower for Mi Mix 2s) with your palm till the light sensor value reach 0. If the backlight is not going under 100/130 (pie) or 7 (oreo), then this module works! My module limits the minimal auto brightness, which the original can reach to 20 which is ridiculously very dark.
    This module may work on any MIUI-based rom phones with IPS display, not just Mi Mix 2s.

    I also created this module for Mi 9 (amoled display). Visit my thread HERE

    - Only V4 has responsitivity adjustment. More responsive means it needs less light increments to trigger auto brightness adjustment.
    - 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.
    v5 = v4 values + updated installer. works on mix2s (eu stable v11.0.3.0) with miui11 and android10. I think it will works on latest eudev weekly miui12 too. enjoy.
    I have uploaded the V4 version, with code and values ported from Mi 9. It has features:
    - more responsive auto brightness
    - reworked sensor value and more brightness step, to increase accuracy and smoothness

    For test and experiment i use my redmi note 5 android p because i have already sold my Mi mix2s. These phones have quite similar brightness so I hope it will be good too in mix2s. But if it dont, its still editable with diferent template values from previous. The brightness level is about similar to v3 with lowest value 130.

    The download link in OP, and for MIUI 10 android P only (maybe upwards)
    It's still a bit dark, can you upload files with higher brightness

    Here i uploaded the brighter version. Brighter in low light. Check my attachment.

    Hi and congratulations for your great work!! I just tried on mi 8 with global version and its better from stock but need more adjust for me. Could you tell me how can i change the brightness values ? The framework.res file before installing haven't values just ...... Chinese!! Thanks!!

    Unzip that with 7z, right click, open archive. Or rename it to .zip.
    After editing, zip it back. Rename the zipped files to framework-res
    Mi Max3 xiaomi.eu 9.5.30 MIUI v10-9 - working again.
    P.S. lower brightness value not editable.