Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,814 Members 43,846 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Lower Captive Button Brightness levels to Stop Bleeding

Tip us?
 
jul644
Old
(Last edited by jul644; 9th February 2012 at 10:00 PM.)
#1  
jul644's Avatar
Senior Member - OP
Thanks Meter 208
Posts: 954
Join Date: Jul 2009
Location: London Ontario
Default [MOD] Lower Captive Button Brightness levels to Stop Bleeding

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/
HTC Touch Pro-->HTC Touch Pro 2-->HTC Desire-->HTC Legend-->Acer Luiquid E-->Nexus One-->SE X10-->HTC HD2-->Nexus One-->HTC Hero-->LG Optimus 7-->HTC Incredible S-->HTC Sensation 4G-->Motorola Razor V3-->Nokia 2610-->SE X10-->HTC Wildfire S-->HTC Desire Z-->HTC Incredible S-->HTC Sensation 4G-->HTC Raider-->HTC EVO 3D-->HTC Incredible S-->Xperia Arc-->HTC Amaze-->HTC Evo 3D-->IPhone 4-->HTC Evo 3D-->Xperia Play-->HTC Raider-->Nokia 920-Matte Black
Drop Box Referral, give 500 MB to me and get 500 MB for you ---> http://db.tt/o00MBOW
The Following 6 Users Say Thank You to jul644 For This Useful Post: [ Click to Expand ]
 
Bdix
Old
#2  
Senior Member
Thanks Meter 13
Posts: 178
Join Date: 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
 
Chance Ill
Old
#3  
Chance Ill's Avatar
Senior Member
Thanks Meter 103
Posts: 483
Join Date: Dec 2007
Location: Planet Android

 
DONATE TO ME
Quote:
Originally Posted by jul644 View Post
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, 79 views)
G2- RayGlobe
HTC One- ViperOne


Common sense is not common.....

IF SOMEONE HELPS YOU......THANK THEM!!!
 
Double0EK
Old
#4  
Double0EK's Avatar
Senior Member
Thanks Meter 839
Posts: 2,057
Join Date: 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
 
-FuRBz-
Old
#5  
-FuRBz-'s Avatar
Senior Member
Thanks Meter 64
Posts: 585
Join Date: Jun 2010
Location: Boston
why not create a script?
Phone: HTC One M8

[Former]
Device: T-Mobile S4
Device: T-Mobile S3
Device: HTC Amaze 4G
Device: HTC Vision (T-Mobile G2)
Device: BlackBerry (9700, 8900,8320,8120,8100)
 
Chance Ill
Old
#6  
Chance Ill's Avatar
Senior Member
Thanks Meter 103
Posts: 483
Join Date: Dec 2007
Location: Planet Android

 
DONATE TO ME
Quote:
Originally Posted by -FuRBz- View Post
why not create a script?
Tried that. Will not work on a custom ROM because of init-d.
G2- RayGlobe
HTC One- ViperOne


Common sense is not common.....

IF SOMEONE HELPS YOU......THANK THEM!!!
 
jul644
Old
#7  
jul644's Avatar
Senior Member - OP
Thanks Meter 208
Posts: 954
Join Date: Jul 2009
Location: London Ontario
Quote:
Originally Posted by Double0EK View Post
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
HTC Touch Pro-->HTC Touch Pro 2-->HTC Desire-->HTC Legend-->Acer Luiquid E-->Nexus One-->SE X10-->HTC HD2-->Nexus One-->HTC Hero-->LG Optimus 7-->HTC Incredible S-->HTC Sensation 4G-->Motorola Razor V3-->Nokia 2610-->SE X10-->HTC Wildfire S-->HTC Desire Z-->HTC Incredible S-->HTC Sensation 4G-->HTC Raider-->HTC EVO 3D-->HTC Incredible S-->Xperia Arc-->HTC Amaze-->HTC Evo 3D-->IPhone 4-->HTC Evo 3D-->Xperia Play-->HTC Raider-->Nokia 920-Matte Black
Drop Box Referral, give 500 MB to me and get 500 MB for you ---> http://db.tt/o00MBOW
The Following User Says Thank You to jul644 For This Useful Post: [ Click to Expand ]
 
silvscorp
Old
#8  
Senior Member
Thanks Meter 30
Posts: 399
Join Date: Jan 2007
Quote:
Originally Posted by jul644 View Post
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..

Current Devices:
Sony Xperia ZR, Google Nexus 7

Previous:
HTC (Amaze 4G, Sensation 4G, Desire HD, HD2, Diamond 2, P3600), Oppo Find 5


Claim your free cloud storage @ Dropbox so we both get free storage
 
jul644
Old
#9  
jul644's Avatar
Senior Member - OP
Thanks Meter 208
Posts: 954
Join Date: Jul 2009
Location: London Ontario
Quote:
Originally Posted by silvscorp View Post
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.
HTC Touch Pro-->HTC Touch Pro 2-->HTC Desire-->HTC Legend-->Acer Luiquid E-->Nexus One-->SE X10-->HTC HD2-->Nexus One-->HTC Hero-->LG Optimus 7-->HTC Incredible S-->HTC Sensation 4G-->Motorola Razor V3-->Nokia 2610-->SE X10-->HTC Wildfire S-->HTC Desire Z-->HTC Incredible S-->HTC Sensation 4G-->HTC Raider-->HTC EVO 3D-->HTC Incredible S-->Xperia Arc-->HTC Amaze-->HTC Evo 3D-->IPhone 4-->HTC Evo 3D-->Xperia Play-->HTC Raider-->Nokia 920-Matte Black
Drop Box Referral, give 500 MB to me and get 500 MB for you ---> http://db.tt/o00MBOW
 
rubyman94
Old
#10  
rubyman94's Avatar
Senior Member
Thanks Meter 38
Posts: 245
Join Date: Nov 2010
You are a beast! Thank you!

Sent from my HTC_Amaze_4G using xda premium

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes