[Galaxy S II Themes and Apps] 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:

<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):

<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:)