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 Captive Button Brightness levels to Stop Bleeding

OP jul644

9th February 2012, 05:35 PM   |  #1  
jul644's Avatar
OP Senior Member
Flag London Ontario
Thanks Meter: 208
 
954 posts
Join Date:Joined: Jul 2009
More
This is best done after you flash a ROM as you might lose some settings.
(I noticed my wall paper changed and i had to sign back into Google account)
---This framework-res.apk file is different for every ROM---

Quote:

In order to lower button brightness levels You have to change values in framework-res.apk/res/values/arrays.xml and here is how (read whole post first )

These are stock HTC AMAZE values:

Code:
<integer-array name="config_autoBrightnessButtonBacklightValues">
        <item>255</item>
        <item>255</item>
        <item>255</item>
        <item>255</item>
        <item>-1</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
    </integer-array>
These are values should reduce the problem significantly

Code:
<integer-array name="config_autoBrightnessButtonBacklightValues">
        <item>190</item>
        <item>190</item>
        <item>190</item>
        <item>190</item>
        <item>-1</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
    </integer-array>
Quote:

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 buttons are 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".

10. Now press 5 to zipalign apk. You will find your completed, zipaligned apk under place-apk-here-for-modding\unsignedframework-res.apk.

11.Rename it back to framework-res.apk and adb push the file back to your phone

To send it back to your phone

Quote:

Prerequisites have...

The file you are pushing must be placed in the platform-tools folder of adb so if you are pushing file "framework-res.apk" this needs to be downloaded/copy and pasted in C:\android-sdk-windows\platform-tools

1: go to run and type cmd (or just open your command prompt)

2: cd C:\android-sdk-windows\platform-tools

3: adb remount

4: adb devices *if everything is set up right this should output a serial number*

5: adb push FFFFFFF.FFF /#####/###### *i hope my notes help here you need to put the file name in for the F(s) and in the pound signs you put the destination on the devices:

Code:
adb push framework-res.apk /system/framework
7. adb reboot this is how you finish

You have to copy the file to your phone with ADB or you will get a boot loop and have to re install your ROM.

Link for APK Manager HERE

If you have problems with apk manager showing java error (like it did) this post helped me fix that

Sources:
http://forum.xda-developers.com/show....php?t=1235212
http://forum.xda-developers.com/showthread.php?t=695701
http://forum.xda-developers.com/showthread.php?t=642437

APK Manager 4.9 download link (currently original thread link down for me)
http://www.zshare.net/download/99034654c32618ba/
Last edited by jul644; 9th February 2012 at 11:00 PM.
The Following 6 Users Say Thank You to jul644 For This Useful Post: [ View ]
9th February 2012, 05:51 PM   |  #2  
Senior Member
Thanks Meter: 13
 
178 posts
Join Date:Joined: Dec 2010
you know there is a free app on the market that fixes this problem right?

Sent from my HTC_Amaze_4G using XDA App
9th February 2012, 06:27 PM   |  #3  
Chance Ill's Avatar
Senior Member
Flag Planet Android
Thanks Meter: 112
 
505 posts
Join Date:Joined: Dec 2007
Donate to Me
More
Quote:
Originally Posted by jul644

okay so you can all see when your watching a movie and your captive back light buttons are one and they bleed into the screen, i will post a quick tutorial how to fix this issue or any rom, but i need some one to exract their framework-res.apk from /system/framework directory

if some one can send me their i can make a quick tutorial

You've caught my interest. Here you go......
Attached Files
File Type: apk framework-res.apk - [Click for QR Code] (7.64 MB, 83 views)
9th February 2012, 06:34 PM   |  #4  
Double0EK's Avatar
Senior Member
Thanks Meter: 904
 
2,120 posts
Join Date:Joined: May 2010
Cool...will gladly test when fixed. Also do you mind telling us what is changed in the framework-res.apk ?


Sent by accident from my Amaze using Tapatalk
9th February 2012, 07:57 PM   |  #5  
-FuRBz-'s Avatar
Senior Member
Boston
Thanks Meter: 64
 
585 posts
Join Date:Joined: Jun 2010
More
why not create a script?
9th February 2012, 09:46 PM   |  #6  
Chance Ill's Avatar
Senior Member
Flag Planet Android
Thanks Meter: 112
 
505 posts
Join Date:Joined: Dec 2007
Donate to Me
More
Quote:
Originally Posted by -FuRBz-

why not create a script?

Tried that. Will not work on a custom ROM because of init-d.
9th February 2012, 10:52 PM   |  #7  
jul644's Avatar
OP Senior Member
Flag London Ontario
Thanks Meter: 208
 
954 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by Double0EK

Cool...will gladly test when fixed. Also do you mind telling us what is changed in the framework-res.apk ?


Sent by accident from my Amaze using Tapatalk

updated the original post, i dont have my amaze any more but these values should be low enough to fix the bleed but still see them!

Post back on your experience guys and if different levels work better

also if some one can do a before and after shot that would be wicked
The Following User Says Thank You to jul644 For This Useful Post: [ View ]
9th February 2012, 11:07 PM   |  #8  
Senior Member
Thanks Meter: 30
 
399 posts
Join Date:Joined: Jan 2007
More
Quote:
Originally Posted by jul644

updated the original post, i dont have my amaze any more but these values should be low enough to fix the bleed but still see them!

Post back on your experience guys and if different levels work better

also if some one can do a before and after shot that would be wicked

Very NICE!!! hope all devs can implement this in their future releases..
9th February 2012, 11:58 PM   |  #9  
jul644's Avatar
OP Senior Member
Flag London Ontario
Thanks Meter: 208
 
954 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by silvscorp

Very NICE!!! hope all devs can implement this in their future releases..

im surprised not many have, i know leedroid has this under tweeks.
this is also great as you can edit the auto brightness levels, by lowering them you hardly notice a difference but you wont destroy your battery.
10th February 2012, 12:18 AM   |  #10  
rubyman94's Avatar
Senior Member
Thanks Meter: 38
 
247 posts
Join Date:Joined: Nov 2010
You are a beast! Thank you!

Sent from my HTC_Amaze_4G using xda premium

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

Advanced Search
Display Modes