[MOD]Lower Auto-Brightness levels to save battery

Search This thread

LockeOn

Senior Member
Sep 5, 2010
239
158
Lublin
Hi,

I wanted to share a little mod that could help in extending battery life - lowering default auto-brightness levels. As all of You know our big, bright SuperAMOLED Plus is an excelent display but for that it uses most of our battery:/ I like the idea of auto-brightness but I find it too bright for most of the time. Setting brightness manualy to one level makes it either too dim or it uses too much battery and switching it all the time that You go outside or turn on the light is a little bit inconvenient. In order to lower auto-brightness levels You have to change values in framework-res.apk/res/values/arrays.xml

These are stock Samsung values:

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>32</item>
        <item>69</item>
        <item>118</item>
        <item>177</item>
        <item>255</item>
    </integer-array>

These are values that I use (It is just an example):

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>5</item>
        <item>30</item>
        <item>70</item>
        <item>130</item>
        <item>255</item>
    </integer-array>

These brightness levels are corresponding to the amount of light that light sensor is getting - the lowest value is while in the low light the highest when for example your phone is in direct sunlight. Brightness values are defined by numbers 1 is the lowest possible setting and 255 is the maximum brightness that can be set.

As You can see I was pretty aggressive with lowering these values and yet the screen is still bright in every situation. You can set them a little bit higher or lower in order to suit your preferences.


Here is a guide on how to perform this mod on any framework-res.apk using apk manager (thanks for the guide goes to desean):

1. Download APK manager and unpack somewhere
2. Grab framework-res.apk from your phone under \system\framework\ (e.g. adb pull) and place it in the "place-apk-here-for-modding" folder
3. Run Script.bat and select option 9
4. Once done, go to projects\framework-res.apk\res\values\arrays.xml and edit your values as per first post.
5. Once edited, compile the apk using option 11
6. Qn: Is this a system apk. Ans: y
7. Qn: Aside from the signatures, would .... least. Ans: y
8. Prompt: In the apk manager folder u'll find a keep folder..... done then press enter on this script. Press any key to continue . . . You have to go to "keep" folder and delete resources.arsc because arrays.xml have been changed. After this You can press any key in apk manager window.
9. Once done, input 22 in apk manager and select "unsignedframework-res.apk" by entering the number that stands for it. After selecting it You should see in apk main window in the top right corner "Current-App: unsignedframework-res.apk". Now press 5 to zipalign apk. You will find your completed, zipaligned apk under place-apk-here-for-modding\unsignedframework-res.apk. Rename it back to framework-res.apk and adb push the file back to your phone

And here is a link for already modified framework-res.apk (originaly made by Kahvitahra with his modifications - APM + CRT + OS + JKays Green Battery I just added lower auto-brightness levels). It will work only with VillainRom 2.4.2:
http://www.multiupload.com/5TE5GY2J32

I hope that You'll like it:)
 
Last edited:

GadgetCheck

Inactive Recognized Developer
Sep 18, 2010
3,258
5,190
31
Bangalore
checkrom.com
Hi,

I wanted to share a little mod that could help in extending battery life - lowering default auto-brightness levels. As all of You know our big, bright SuperAMOLED Plus is an excelent display but for that it uses most of our battery:/ I like the idea of auto-brightness but I find it too bright for most of the time. Setting brightness manualy to one level makes it either too dim or it uses too much battery and switching it all the time that You go outside or turn on the light is a little bit inconvenient. In order to lower auto-brightness levels You have to change values in framework-res.apk/res/values/arrays.xml

These are stock Samsung values:

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>32</item>
        <item>69</item>
        <item>118</item>
        <item>177</item>
        <item>255</item>
    </integer-array>

These are values that I use (It is just an example):

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>5</item>
        <item>30</item>
        <item>70</item>
        <item>130</item>
        <item>255</item>
    </integer-array>

As You can see I was pretty aggressive with lowering these values and yet the screen is still bright in every situation. You can set them a little bit higher or lower in order to suit your preferences.

Here is a link for already modified framework-res.apk (originaly made by Kahvitahra with his modifications - APM + CRT + OS + JKays Green Battery I just added lower auto-brightness levels). It will work only with VillainRom 2.4.2:
http://www.multiupload.com/5TE5GY2J32

I hope that You'll like it:)

Thanks again ;)
 

zoule HCo

Senior Member
Jun 23, 2011
910
415
Victoria
I'm on Batista 3.7.2..
open the framework-res.apk.. but couldn't find the arrays.xml

can i copy n paste the file.. ?
 

a9402169

Senior Member
Apr 4, 2009
193
67
compiled, changed the values, can't notice any difference... but I'll keep watching.

Edit:

Ok, lower values - can notice the difference, it works!
My values - 255, 140, 90, 40, 10.
 
Last edited:

bgx

Senior Member
Dec 23, 2010
580
127
Yeah! Will try to compile later! Thx this was the mod I waiting for!

Sent from my GT-I9100 using XDA App

EDIT: Tryed to compile for cog 1.5 but stuck into bootloop...

EDIT2: Have made it work! Here the file for Cognition 1.5 with Lucid/Hyperdroid Theme with these params:

Code:
        <item>3</item>
        <item>30</item>
        <item>70</item>
        <item>140</item>
        <item>255</item>
 

Attachments

  • unsignedframework-res.apk
    6.8 MB · Views: 479
Last edited:
  • Like
Reactions: galinha

prosumerhacks

Senior Member
Mar 28, 2010
730
61
Can you outline the procedure and tools used..just simple steps would do.. Btw is the hack working as expected? :)

Sent from my GT-I9100 using Tapatalk
 

ebliss

Senior Member
Oct 18, 2005
494
52
look for APK Manager links and how to
you need to decompil framework-res.apk
then compil back

Do you have to change anything in the apk manager setting? such as compression rate?

Also, during compiling, it will prompt whether this is a system apk, do I answer "y"?
 

DanRyb

Senior Member
Jun 6, 2010
521
126
Los Angeles
I really wanted to try this out, using MoDaCo but there is no framework-res.apk/res/values/arrays.xml in the framework-res.apk. Am I pulling it from the right place? I pulled it from /system/framework/
 

LockeOn

Senior Member
Sep 5, 2010
239
158
Lublin
Can you outline the procedure and tools used..just simple steps would do.. Btw is the hack working as expected? :)

Sent from my GT-I9100 using Tapatalk

Excuse my ignorance, but how do I install this?

Sent from my GT-I9100

Do you have to change anything in the apk manager setting? such as compression rate?

Also, during compiling, it will prompt whether this is a system apk, do I answer "y"?

I will post a simple guide how to modify any framework-res.apk using apkmanager but it has to wait till midnight or so. Another thing is that I think that 70, 130 and 255 values can be lowered a little bit more - I have been using my phone all day while I was outside and the screen was really bright. If anyone will find some kind of perfect ultra low levels please share them, for now everybody can test their configuration. Last thing - i was using my phone a lot today and battery usage for display went down from usual 68-72% to 55-56%.
 

desean

Senior Member
Oct 29, 2008
364
214
Do you have to change anything in the apk manager setting? such as compression rate?

Also, during compiling, it will prompt whether this is a system apk, do I answer "y"?
yes

I really wanted to try this out, using MoDaCo but there is no framework-res.apk/res/values/arrays.xml in the framework-res.apk. Am I pulling it from the right place? I pulled it from /system/framework/
on post 5, it is already mentioned that you need to decompile the apk first!
 

sicopat

Senior Member
Oct 21, 2007
811
957
Samsung Galaxy S20
Do you have to change anything in the apk manager setting? such as compression rate?

Also, during compiling, it will prompt whether this is a system apk, do I answer "y"?

don't change compression rate
every apks located in /system folders are system apk so Yes.
you press Yes then Yes again. a keep folder is created delete ressources.acrs in it, then press any kay in apk manager windows
in place here apk to mod you have now unsignedframework-res.apk, just rename it in framework-res.apk and if you want you can zipallign it (it will work without last step)
 
  • Like
Reactions: ebliss

desean

Senior Member
Oct 29, 2008
364
214
Thanks LockeOn for sharing.

Just a quick how-to for everyone else before more people post on how to apply the MOD, using APK manager (I think this is the easiest method)

Steps
  1. Download APK manager and unpack somewhere
  2. Grab framework-res.apk from your phone under \system\framework\ (e.g. adb pull) and place it in the "place-apk-here-for-modding" folder
  3. Run Script.bat and select option 9
  4. Once done, go to projects\framework-res.apk\res\values\arrays.xml and edit your values as per first post.
  5. Once edited, compile the apk using option 11
  6. Qn: Is this a system apk. Ans: y
  7. Qn: Aside from the signatures, would .... least. Ans: y
  8. Prompt: In the apk manager folder u'll find a keep folder..... done then press enter on this script. Press any key to continue . . . You have to go to "keep" folder and delete resources.arsc because arrays.xml have been changed. After this You can press any key in apk manager window.
  9. Once done, input 22 in apk manager and select "unsignedframework-res.apk" by entering the number that stands for it. After selecting it You should see in apk main window in the top right corner "Current-App: unsignedframework-res.apk". Now press 5 to zipalign apk. You will find your completed, zipaligned apk under place-apk-here-for-modding\unsignedframework-res.apk
  10. rename back to framework-res.apk and adb push the file back to your phone.

And here are the values I use, taking some values from my Hero days :p
Code:
    <integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>5</item>
        <item>25</item>
        <item>60</item>
        <item>125</item>
        <item>255</item>
    </integer-array>

Since some MOD (like APM for example) make changes to the framework-res.apk, it is better for you to do your own instead of begging others to do and post here.

Edit1: Updated steps as recommended by LockeOn

Edit2: using more aggressive values now after few days testing
Code:
    <integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>2</item>
        <item>15</item>
        <item>32</item>
        <item>100</item>
        <item>200</item>
    </integer-array>
before this, i was always using minimum brightness instead of auto brightness thus decided to set 32 and below for majority of the values. it works for me when i am indoor and outdoor under low light. when outdoors under brightness, the increase is bright enough for me so I believe i have found my sweet spot :D

note that my environment and preference may diff from everyone so what works for me may not work for you :p
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 60
    Hi,

    I wanted to share a little mod that could help in extending battery life - lowering default auto-brightness levels. As all of You know our big, bright SuperAMOLED Plus is an excelent display but for that it uses most of our battery:/ I like the idea of auto-brightness but I find it too bright for most of the time. Setting brightness manualy to one level makes it either too dim or it uses too much battery and switching it all the time that You go outside or turn on the light is a little bit inconvenient. In order to lower auto-brightness levels You have to change values in framework-res.apk/res/values/arrays.xml

    These are stock Samsung values:

    Code:
    <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>32</item>
            <item>69</item>
            <item>118</item>
            <item>177</item>
            <item>255</item>
        </integer-array>

    These are values that I use (It is just an example):

    Code:
    <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>5</item>
            <item>30</item>
            <item>70</item>
            <item>130</item>
            <item>255</item>
        </integer-array>

    These brightness levels are corresponding to the amount of light that light sensor is getting - the lowest value is while in the low light the highest when for example your phone is in direct sunlight. Brightness values are defined by numbers 1 is the lowest possible setting and 255 is the maximum brightness that can be set.

    As You can see I was pretty aggressive with lowering these values and yet the screen is still bright in every situation. You can set them a little bit higher or lower in order to suit your preferences.


    Here is a guide on how to perform this mod on any framework-res.apk using apk manager (thanks for the guide goes to desean):

    1. Download APK manager and unpack somewhere
    2. Grab framework-res.apk from your phone under \system\framework\ (e.g. adb pull) and place it in the "place-apk-here-for-modding" folder
    3. Run Script.bat and select option 9
    4. Once done, go to projects\framework-res.apk\res\values\arrays.xml and edit your values as per first post.
    5. Once edited, compile the apk using option 11
    6. Qn: Is this a system apk. Ans: y
    7. Qn: Aside from the signatures, would .... least. Ans: y
    8. Prompt: In the apk manager folder u'll find a keep folder..... done then press enter on this script. Press any key to continue . . . You have to go to "keep" folder and delete resources.arsc because arrays.xml have been changed. After this You can press any key in apk manager window.
    9. Once done, input 22 in apk manager and select "unsignedframework-res.apk" by entering the number that stands for it. After selecting it You should see in apk main window in the top right corner "Current-App: unsignedframework-res.apk". Now press 5 to zipalign apk. You will find your completed, zipaligned apk under place-apk-here-for-modding\unsignedframework-res.apk. Rename it back to framework-res.apk and adb push the file back to your phone

    And here is a link for already modified framework-res.apk (originaly made by Kahvitahra with his modifications - APM + CRT + OS + JKays Green Battery I just added lower auto-brightness levels). It will work only with VillainRom 2.4.2:
    http://www.multiupload.com/5TE5GY2J32

    I hope that You'll like it:)
    5
    Thanks LockeOn for sharing.

    Just a quick how-to for everyone else before more people post on how to apply the MOD, using APK manager (I think this is the easiest method)

    Steps
    1. Download APK manager and unpack somewhere
    2. Grab framework-res.apk from your phone under \system\framework\ (e.g. adb pull) and place it in the "place-apk-here-for-modding" folder
    3. Run Script.bat and select option 9
    4. Once done, go to projects\framework-res.apk\res\values\arrays.xml and edit your values as per first post.
    5. Once edited, compile the apk using option 11
    6. Qn: Is this a system apk. Ans: y
    7. Qn: Aside from the signatures, would .... least. Ans: y
    8. Prompt: In the apk manager folder u'll find a keep folder..... done then press enter on this script. Press any key to continue . . . You have to go to "keep" folder and delete resources.arsc because arrays.xml have been changed. After this You can press any key in apk manager window.
    9. Once done, input 22 in apk manager and select "unsignedframework-res.apk" by entering the number that stands for it. After selecting it You should see in apk main window in the top right corner "Current-App: unsignedframework-res.apk". Now press 5 to zipalign apk. You will find your completed, zipaligned apk under place-apk-here-for-modding\unsignedframework-res.apk
    10. rename back to framework-res.apk and adb push the file back to your phone.

    And here are the values I use, taking some values from my Hero days :p
    Code:
        <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>5</item>
            <item>25</item>
            <item>60</item>
            <item>125</item>
            <item>255</item>
        </integer-array>

    Since some MOD (like APM for example) make changes to the framework-res.apk, it is better for you to do your own instead of begging others to do and post here.

    Edit1: Updated steps as recommended by LockeOn

    Edit2: using more aggressive values now after few days testing
    Code:
        <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>2</item>
            <item>15</item>
            <item>32</item>
            <item>100</item>
            <item>200</item>
        </integer-array>
    before this, i was always using minimum brightness instead of auto brightness thus decided to set 32 and below for majority of the values. it works for me when i am indoor and outdoor under low light. when outdoors under brightness, the increase is bright enough for me so I believe i have found my sweet spot :D

    note that my environment and preference may diff from everyone so what works for me may not work for you :p
    3
    Here we go:

    Code:
        <integer-array name="config_autoBrightnessLevels">
            <item>15</item>
            <item>150</item>
            <item>1500</item>
            <item>8500</item>
            <item>11000</item>
            <item>15000</item>
        </integer-array>
        <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>2</item>
            <item>32</item>
            <item>55</item>
            <item>80</item>
            <item>120</item>
            <item>160</item>
            <item>255</item>
        </integer-array>
        <integer-array name="config_autoBrightnessButtonBacklightValues">
            <item>255</item>
            <item>255</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
        </integer-array>
    2
    Working nicely on the framework-res.apk file of my HTC GreenCircle JKay theme (Kitchen deodexed). Thanks LockeOn ! great tutorial.
    2
    Thanks...i read.... but can you help me with ADB ? You reply will say google it ?
    Its easy to help even with stupid questions....
    seriously, don't expect to be spoon-fed here. you can start reading from http://xdaforums.com/showthread.php?t=532719