• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[GUIDE] Enhanced Brightness - Save Battery!

Search This thread

TopDroid

Senior Member
Jul 4, 2012
513
1,320
New Delhi
1VUdM


Enhanced Brightness

Features:


Auto Brightness decreased to 2 (Better Battery Life)
Auto Brightness increased to 255 (Brighter Screen For Outdoors)
Brightness decreased to 1 (Better Battery Life)
Better Auto Brightness Levels (Better Battery Life)
Dim Brightness decreased to 1


Knowledge:


I am using CM10.1 for the example.
Before using this guide, you must understand few things:

Whats is Lux?
Lux is the SI unit of illuminance, equal to one lumen per square meter. For more info, see this

How does Lux affect your phone's brightness?
Your phone's light sensor's measure the lux and change brightness accordingly (if you're using auto-brightness). For more info, watch this

Understanding Lux Values:

Lighting condition
From (lux)​
To (lux)


Pitch Black
0​
10


Very Dark
11​
50


Dark Indoors
51​
200


Dim Indoors
201​
400


Normal Indoors
401​
1,000


Bright Indoors
1,001​
5,000


Dim Outdoors
5,001​
10,000


Cloudy Outdoors
10,001​
30,000


Direct Sunlight
30,001​
100,000



 
Last edited:

TopDroid

Senior Member
Jul 4, 2012
513
1,320
New Delhi
Files Edited:


framework-res\res\values\arrays.xml
framework-res\res\values\integers.xml



Steps:


Changing Auto-Brightness Levels



Decompile framework-res.apk

Navigate to res\values\arrays.xml

Find:
Code:
<integer-array name="config_autoBrightnessLevels">

These contain the lux values

Find:
Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">

These are the levels of Auto Brightness which adjust according to the lux values defined above

<integer-array name="config_autoBrightnessLcdBacklightValues"> should contain 1 more item than <integer-array name="config_autoBrightnessLevels">

Suppose <integer-array name="config_autoBrightnessLevels"> contains 5 items/values, then <integer-array name="config_autoBrightnessLcdBacklightValues"> will contain 6 items/values.

Now in <integer-array name="config_autoBrightnessLevels">, add, modify the values according to your need.
For reference, here is mine with the best values I could think of:

Code:
    <integer-array name="config_autoBrightnessLevels">
        <item>2</item>
        <item>10</item>
        <item>50</item>
        <item>175</item>
        <item>380</item>
        <item>780</item>
        <item>1150</item>
        <item>1890</item>
        <item>2465</item>
    </integer-array>

Now in <integer-array name="config_autoBrightnessLcdBacklightValues">, add, modify the values according to your need. Remember it should have 1 more value than previous one.
For reference, here is mine:

Code:
    <integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>2</item>
        <item>8</item>
        <item>20</item>
        <item>40</item>
        <item>75</item>
        <item>135</item>
        <item>180</item>
        <item>210</item>
        <item>230</item>
        <item>255</item>
    </integer-array>

How the lux values change Auto-Brightness level?

Taking the values from above:

When lux < 2, brightness = 2
When 2 < lux < 10, brightness = 8
When 10 < lux < 50, brightness = 20
When 50 < lux < 175, brightness = 40
When 175 < lux < 380, brightness = 75
When 380 < lux < 780, brightness = 135
When 780 < lux < 1150, brightness = 180
When 1150 < lux < 1890, brightness = 210
When 1890 < lux < 2465, brightness = 230
When lux > 2465, brightness = 255
 
Last edited:

TopDroid

Senior Member
Jul 4, 2012
513
1,320
New Delhi
Changing Minimum, Maximum, Dim Brightness



Navigate to res\values\integers.xml

Find:
Code:
<integer name="config_screenBrightnessSettingMinimum">

Change the value to set the minimum brightness achievable when not using Auto-Brightness. Value must be ≥ 1


Find:
Code:
<integer name="config_screenBrightnessSettingMaximum">

Change the value to set the maximum brightness achievable when not using Auto-Brightness. As far as I know, Value must be ≤ 255


Find:
Code:
<integer name="config_screenBrightnessDim">

Change the value to set the dim brightnesss. Value must be ≥ 1
 
Last edited:

webmaven

Member
Dec 12, 2012
16
17
Changing Minimum, Maximum, Dim Brightness



Navigate to res\values\integers.xml

Find:
Code:
<integer name="config_screenBrightnessSettingMinimum">

Change the value to set the minimum brightness achievable when not using Auto-Brightness. Value must be ≥ 1


Find:
Code:
<integer name="config_screenBrightnessSettingMaximum">

Change the value to set the maximum brightness achievable when not using Auto-Brightness. As far as I know, Value must be ≤ 255


Find:
Code:
<integer name="config_screenBrightnessDim">

Change the value to set the dim brightnesss. Value must be ≥ 1


Maybe you can help me? I am trying to set my default Dim level to 50% I was able to decompile my Framework-res.apk file and edit the array.xml but I can't seem to recompile the file.

I am using APKtool it will not recompile the framework-res.apk.

Thank you;
Raymond
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Changing Minimum, Maximum, Dim Brightness



    Navigate to res\values\integers.xml

    Find:
    Code:
    <integer name="config_screenBrightnessSettingMinimum">

    Change the value to set the minimum brightness achievable when not using Auto-Brightness. Value must be ≥ 1


    Find:
    Code:
    <integer name="config_screenBrightnessSettingMaximum">

    Change the value to set the maximum brightness achievable when not using Auto-Brightness. As far as I know, Value must be ≤ 255


    Find:
    Code:
    <integer name="config_screenBrightnessDim">

    Change the value to set the dim brightnesss. Value must be ≥ 1
    7
    Files Edited:


    framework-res\res\values\arrays.xml
    framework-res\res\values\integers.xml



    Steps:


    Changing Auto-Brightness Levels



    Decompile framework-res.apk

    Navigate to res\values\arrays.xml

    Find:
    Code:
    <integer-array name="config_autoBrightnessLevels">

    These contain the lux values

    Find:
    Code:
    <integer-array name="config_autoBrightnessLcdBacklightValues">

    These are the levels of Auto Brightness which adjust according to the lux values defined above

    <integer-array name="config_autoBrightnessLcdBacklightValues"> should contain 1 more item than <integer-array name="config_autoBrightnessLevels">

    Suppose <integer-array name="config_autoBrightnessLevels"> contains 5 items/values, then <integer-array name="config_autoBrightnessLcdBacklightValues"> will contain 6 items/values.

    Now in <integer-array name="config_autoBrightnessLevels">, add, modify the values according to your need.
    For reference, here is mine with the best values I could think of:

    Code:
        <integer-array name="config_autoBrightnessLevels">
            <item>2</item>
            <item>10</item>
            <item>50</item>
            <item>175</item>
            <item>380</item>
            <item>780</item>
            <item>1150</item>
            <item>1890</item>
            <item>2465</item>
        </integer-array>

    Now in <integer-array name="config_autoBrightnessLcdBacklightValues">, add, modify the values according to your need. Remember it should have 1 more value than previous one.
    For reference, here is mine:

    Code:
        <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>2</item>
            <item>8</item>
            <item>20</item>
            <item>40</item>
            <item>75</item>
            <item>135</item>
            <item>180</item>
            <item>210</item>
            <item>230</item>
            <item>255</item>
        </integer-array>

    How the lux values change Auto-Brightness level?

    Taking the values from above:

    When lux < 2, brightness = 2
    When 2 < lux < 10, brightness = 8
    When 10 < lux < 50, brightness = 20
    When 50 < lux < 175, brightness = 40
    When 175 < lux < 380, brightness = 75
    When 380 < lux < 780, brightness = 135
    When 780 < lux < 1150, brightness = 180
    When 1150 < lux < 1890, brightness = 210
    When 1890 < lux < 2465, brightness = 230
    When lux > 2465, brightness = 255
    5
    1VUdM


    Enhanced Brightness

    Features:


    Auto Brightness decreased to 2 (Better Battery Life)
    Auto Brightness increased to 255 (Brighter Screen For Outdoors)
    Brightness decreased to 1 (Better Battery Life)
    Better Auto Brightness Levels (Better Battery Life)
    Dim Brightness decreased to 1


    Knowledge:


    I am using CM10.1 for the example.
    Before using this guide, you must understand few things:

    Whats is Lux?
    Lux is the SI unit of illuminance, equal to one lumen per square meter. For more info, see this

    How does Lux affect your phone's brightness?
    Your phone's light sensor's measure the lux and change brightness accordingly (if you're using auto-brightness). For more info, watch this

    Understanding Lux Values:

    Lighting condition
    From (lux)​
    To (lux)


    Pitch Black
    0​
    10


    Very Dark
    11​
    50


    Dark Indoors
    51​
    200


    Dim Indoors
    201​
    400


    Normal Indoors
    401​
    1,000


    Bright Indoors
    1,001​
    5,000


    Dim Outdoors
    5,001​
    10,000


    Cloudy Outdoors
    10,001​
    30,000


    Direct Sunlight
    30,001​
    100,000