5,597,397 Members 31,284 Now Online
XDA Developers Android and Mobile Development Forum

[MOD]Lower Auto-Brightness levels to save battery

Tip us?
 
LockeOn
Old
(Last edited by LockeOn; 27th August 2011 at 08:43 AM.)
#1  
Senior Member - OP
Thanks Meter 150
Posts: 230
Join Date: Sep 2010
Location: Lublin
Default [MOD]Lower Auto-Brightness levels to save battery

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
AOSP Gingerbread Theme for i9000
Lower Your Auto-Brightness Levels

If you'd like to support me, please register to dropbox.com with my referral link: http://db.tt/9cXG8p4
The Following 58 Users Say Thank You to LockeOn For This Useful Post: [ Click to Expand ]
 
_Opiate_
Old
#2  
_Opiate_'s Avatar
Senior Member
Thanks Meter 12
Posts: 471
Join Date: Jun 2010
Thanks! 10char
Nexus One (AT&T 3G)
HTC Aria AT&T
Samsung Captivate AT&T
Samsung Vibrant - SIM Unlocked on AT&T
Samsung GalaxyTab (AT&T)
HTC Inspire 4G
Samsung Galaxy S II Int. - Factory Unlocked (AT&T)
Galaxy Nexus GSM
 
GadgetCheck
Old
#3  
GadgetCheck's Avatar
Retired Forum Moderator / Recognized Developer
Thanks Meter 5245
Posts: 3,158
Join Date: Sep 2010
Location: India,Kerala,Trivandrum (God's own Country)
Quote:
Originally Posted by LockeOn View Post
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

www.checkrom.com
Where support gets refined as social networking
Founder and Developer of CheckROMô for Samsung Phone's
 
zoule HCo
Old
#4  
zoule HCo's Avatar
Senior Member
Thanks Meter 439
Posts: 910
Join Date: Jun 2011
Location: Victoria

 
DONATE TO ME
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.. ?
 
kalpik
Old
#5  
Recognized Contributor
Thanks Meter 1330
Posts: 3,474
Join Date: May 2010
Location: Delhi
Quote:
Originally Posted by zoule HCo View Post
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.. ?
You have to decompile the apk first!
The Following User Says Thank You to kalpik For This Useful Post: [ Click to Expand ]
 
xinfinityoO
Old
#6  
Senior Member
Thanks Meter 358
Posts: 1,405
Join Date: May 2011
Location: Wellington
Quote:
Originally Posted by zoule HCo View Post
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.. ?
u need to decompile it /..smali..
ROM: RomMIX_byRush v5.5
Kernel: DreamKernel 2.7.2




______________________________
Please click on the "Thanks" button if I have helped you in any way.
 
zoule HCo
Old
#7  
zoule HCo's Avatar
Senior Member
Thanks Meter 439
Posts: 910
Join Date: Jun 2011
Location: Victoria

 
DONATE TO ME
Quote:
Originally Posted by kalpik View Post
You have to decompile the apk first!
yup i already decompile the apk..
batista framework-res.apk i think fully modified..
will download the link above..
 
a9402169
Old
(Last edited by a9402169; 26th August 2011 at 07:59 AM.)
#8  
Senior Member
Thanks Meter 53
Posts: 168
Join Date: Apr 2009
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.
Nokia n95/n97
HTC touch pro
LG OPTIMUS P500 CM10 JB 4.1
Samsung Galaxy S - CM10.1
Samsung Galaxy S 2 - CM11
Samsung Galaxy S 3 - CM11
Samsung Galaxy S 4 I9500 - 4.4.2 NC1/CM11
Samsung Galaxy S 5 G900F - XXU1ANCE
 
bgx
Old
(Last edited by bgx; 26th August 2011 at 01:13 PM.)
#9  
bgx's Avatar
Senior Member
Thanks Meter 74
Posts: 386
Join Date: Dec 2010

 
DONATE TO ME
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>
Attached Files
File Type: apk unsignedframework-res.apk - [Click for QR Code] (6.78 MB, 176 views)
Siemens S6 -> Nokia 6110 -> HTC SDA -> Nokia E61 -> Nokia E71 -> HTC Wildfire -> Samsung Galaxy SII -> LG G2 @ Mahdi-Rom 2.5 [03/18] | kernel: AOSP 4.4.2 [v6]
---------------
If I helped you, hit the thanx button!
Tasker BLN for every SMS App
Volume Boosting for SGS2 with the help of Tasker
The Following User Says Thank You to bgx For This Useful Post: [ Click to Expand ]
 
prosumerhacks
Old
#10  
prosumerhacks's Avatar
Senior Member
Thanks Meter 66
Posts: 719
Join Date: Mar 2010
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
Phone: Galaxy Nexus
ROM: MIUI_JB + Trinity


Tweet Me!


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes