Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD]Lower Auto-Brightness levels to save battery

OP LockeOn

26th August 2011, 02:14 AM   |  #1  
OP Senior Member
Flag Lublin
Thanks Meter: 150
 
230 posts
Join Date:Joined: Sep 2010
More
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 by LockeOn; 27th August 2011 at 09:43 AM.
The Following 58 Users Say Thank You to LockeOn For This Useful Post: [ View ]
26th August 2011, 02:41 AM   |  #2  
_Opiate_'s Avatar
Senior Member
Thanks Meter: 12
 
471 posts
Join Date:Joined: Jun 2010
Thanks! 10char
26th August 2011, 02:44 AM   |  #3  
GadgetCheck's Avatar
Retired Forum Moderator / Recognized Developer
Flag India,Kerala,Trivandrum (God's own Country)
Thanks Meter: 5,264
 
3,193 posts
Join Date:Joined: Sep 2010
More
Quote:
Originally Posted by LockeOn

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
26th August 2011, 04:23 AM   |  #4  
zoule HCo's Avatar
Senior Member
Victoria
Thanks Meter: 439
 
910 posts
Join Date:Joined: Jun 2011
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.. ?
26th August 2011, 04:26 AM   |  #5  
Recognized Contributor
Flag Delhi
Thanks Meter: 1,494
 
3,779 posts
Join Date:Joined: May 2010
More
Quote:
Originally Posted by zoule HCo

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: [ View ]
26th August 2011, 04:26 AM   |  #6  
xinfinityoO's Avatar
Senior Member
Flag Wellington
Thanks Meter: 466
 
1,787 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by zoule HCo

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..
26th August 2011, 04:41 AM   |  #7  
zoule HCo's Avatar
Senior Member
Victoria
Thanks Meter: 439
 
910 posts
Join Date:Joined: Jun 2011
Donate to Me
Quote:
Originally Posted by kalpik

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..
26th August 2011, 08:23 AM   |  #8  
Senior Member
Thanks Meter: 57
 
177 posts
Join Date:Joined: 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.
Last edited by a9402169; 26th August 2011 at 08:59 AM.
26th August 2011, 08:35 AM   |  #9  
bgx's Avatar
Senior Member
Thanks Meter: 106
 
455 posts
Join Date:Joined: Dec 2010
Donate to Me
More
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, 206 views)
Last edited by bgx; 26th August 2011 at 02:13 PM.
The Following User Says Thank You to bgx For This Useful Post: [ View ]
26th August 2011, 03:41 PM   |  #10  
prosumerhacks's Avatar
Senior Member
Thanks Meter: 66
 
719 posts
Join Date:Joined: 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

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes