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

[MOD] Lower auto brightness to save battery

Tip us?
 
newcastle9
Old
(Last edited by newcastle9; 24th December 2012 at 11:26 AM.)
#1  
newcastle9's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 162
Join Date: Nov 2010
Default [MOD] Lower auto brightness to save battery

hi guys i modded the stock framework apk to give lower brightness at lower light here are the values i set

Quote:
10
15
20
30
40
50
55
70
80
100
200
255
here are the stock values

Quote:
14
28
37
51
71
80
96
108
144
181
254
255
to install copy the file to your system/framework folder and overwrite the old one

DOWNLOAD
http://www65.zippyshare.com/v/73724600/file.html
The Following 3 Users Say Thank You to newcastle9 For This Useful Post: [ Click to Expand ]
 
joshnichols189
Old
#2  
joshnichols189's Avatar
Senior Member
Thanks Meter 1,389
Posts: 6,931
Join Date: Jun 2010
Location: Chicago
Will this work on something like Xylon?

Sent from my Nexus 4 using Tapatalk 2
Iphone 4S Nokia N9
LG Voyager OG Sidekick
Blackberry Tour 9630 Blackberry Storm 9530
Motorola Droid Droid Bionic; Droid X
HTC Droid Incredible HTC Thunderbolt
HTC Droid Incredible 2 HTC Trophy
HTC Rezound; HTC One S HTC One X HTC G2
Asus Transformer Nook Tablet
Samsung Fascinate Galaxy Nexus Galaxy Note
Galaxy SII i9100 White Galaxy Nexus
Galaxy SIII i9300 Galaxy Tab 2 7.0
 
jhericurls
Old
#3  
Senior Member
Thanks Meter 296
Posts: 1,221
Join Date: Aug 2009
Quote:
Originally Posted by joshnichols189 View Post
Will this work on something like Xylon?
No, Xylon uses a modded framework. You flash this and you'll get system UI force close.
Smoking weed is illegal, but so are most of the apps on my phone.
 
neotekz
Old
#4  
Senior Member
Thanks Meter 156
Posts: 1,330
Join Date: Oct 2007
Location: Ottawa
if you have some experience with apk manager you can do this yourself it's fairly easy. Here's a write up i did for the galaxy nexus a while ago. It should be similar for the nexus 4 just different values for the brightness.

Basically what you have to do is decompile the framework-res.apk and change the values is arrays.xml and recompile and push it back using adb.

1. Download APK manager
2. Grab framework-res.apk from your phone under \system\framework\ (you can use root explorer or adb push) and place it in the "place-apk-here-for-modding" folder
3. Run Script.bat and select option 9
4. go to projects\framework-res.apk\res\values\arrays.xml and edit your values with the ones roger posted in my link above
5. Once edited, compile the apk using option 11
6. Is this a system apk. Ans: y
7. Qn: Aside from the signatures...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 . . . go to "keep" folder and delete resources.arsc and then press any key
9. Choose option 22 to set project to unsignedframework-res.apk
10. Choose option 5 to zipalign the new apk.
11. rename the unsignedframework-res.apk to framework-res.apk and push it to system/framework with these commands in adb.

Code:
Mount System in recovery

adb push framework-res.apk /system/framework/framework-res.apk
reboot

here are the values in arrays.xml to be changed. (the values and number of items will probably be different for the Nexus 4 but you can add or delete items if you want more or less brightness settings)

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues"> 
<item>16</item> 
<item>40</item> 
<item>60</item> 
<item>70</item> 
<item>70</item> 
<item>250</item> 
</integer-array>
here's what i had the new values at.(The lower value of 5 might be too dim or bright for the nexus 4 so you might have to see what you prefer)

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues"> 
<item>5</item> 
<item>20</item> 
<item>50</item> 
<item>70</item> 
<item>150</item> 
<item>250</item> 
</integer-array>
You can play around with the numbers to see what suits you. Just make sure you do a nandroid backup before attempting this mod.
The Following 6 Users Say Thank You to neotekz For This Useful Post: [ Click to Expand ]
 
evostevo1
Old
#5  
evostevo1's Avatar
Senior Member
Thanks Meter 35
Posts: 275
Join Date: Dec 2010
Will this work even on odexed ?

Sent from my Nexus 4 using xda app-developers app
 
newcastle9
Old
#6  
newcastle9's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 162
Join Date: Nov 2010
Quote:
Originally Posted by evostevo1 View Post
Will this work even on odexed ?

Sent from my Nexus 4 using xda app-developers app
Yep I'm using it on stock odexed

Sent from my Nexus 4 using Tapatalk 2
The Following User Says Thank You to newcastle9 For This Useful Post: [ Click to Expand ]
 
SIGUEL
Old
#7  
SIGUEL's Avatar
Senior Member
Thanks Meter 30
Posts: 329
Join Date: Mar 2009
Location: San Juan
Quote:
Originally Posted by neotekz View Post
if you have some experience with apk manager you can do this yourself it's fairly easy. Here's a write up i did for the galaxy nexus a while ago. It should be similar for the nexus 4 just different values for the brightness.

Basically what you have to do is decompile the framework-res.apk and change the values is arrays.xml and recompile and push it back using adb.

1. Download APK manager
2. Grab framework-res.apk from your phone under \system\framework\ (you can use root explorer or adb push) and place it in the "place-apk-here-for-modding" folder
3. Run Script.bat and select option 9
4. go to projects\framework-res.apk\res\values\arrays.xml and edit your values with the ones roger posted in my link above
5. Once edited, compile the apk using option 11
6. Is this a system apk. Ans: y
7. Qn: Aside from the signatures...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 . . . go to "keep" folder and delete resources.arsc and then press any key
9. Choose option 22 to set project to unsignedframework-res.apk
10. Choose option 5 to zipalign the new apk.
11. rename the unsignedframework-res.apk to framework-res.apk and push it to system/framework with these commands in adb.

Code:
Mount System in recovery

adb push framework-res.apk /system/framework/framework-res.apk
reboot

here are the values in arrays.xml to be changed. (the values and number of items will probably be different for the Nexus 4 but you can add or delete items if you want more or less brightness settings)

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues"> 
<item>16</item> 
<item>40</item> 
<item>60</item> 
<item>70</item> 
<item>70</item> 
<item>250</item> 
</integer-array>
here's what i had the new values at.(The lower value of 5 might be too dim or bright for the nexus 4 so you might have to see what you prefer)

Code:
<integer-array name="config_autoBrightnessLcdBacklightValues"> 
<item>5</item> 
<item>20</item> 
<item>50</item> 
<item>70</item> 
<item>150</item> 
<item>250</item> 
</integer-array>
You can play around with the numbers to see what suits you. Just make sure you do a nandroid backup before attempting this mod.
For some reasons APK managers dont work with JB 4.2, The steps in Xylon for Nexus4 are too bright compared to stock, but thanks anyway I will keep looking for a fix.

Sent from my Nexus 4
 
TheLawIX
Old
#8  
Member
Thanks Meter 12
Posts: 63
Join Date: Oct 2011
Will this work with this ROM?

http://forum.xda-developers.com/show....php?t=2009561

I am assuming yes, but I just want to make sure.
 
newcastle9
Old
#9  
newcastle9's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 162
Join Date: Nov 2010
Quote:
Originally Posted by SIGUEL View Post
For some reasons APK managers dont work with JB 4.2, The steps in Xylon for Nexus4 are too bright compared to stock, but thanks anyway I will keep looking for a fix.

Sent from my Nexus 4
I posted a apk manager that works with android 4.2.1

http://forum.xda-developers.com/show....php?t=2063477

Sent from my Nexus 4 using Tapatalk 2
The Following 2 Users Say Thank You to newcastle9 For This Useful Post: [ Click to Expand ]
 
newcastle9
Old
#10  
newcastle9's Avatar
Senior Member - OP
Thanks Meter 40
Posts: 162
Join Date: Nov 2010
Quote:
Originally Posted by TheLawIX View Post
Will this work with this ROM?

http://forum.xda-developers.com/show....php?t=2009561

I am assuming yes, but I just want to make sure.
I'm not sure I think that ROM has a custom framework

Sent from my Nexus 4 using Tapatalk 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes