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 to save battery

OP newcastle9

24th December 2012, 11:01 AM   |  #1  
newcastle9's Avatar
OP Senior Member
Thanks Meter: 41
 
162 posts
Join Date:Joined: Nov 2010
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
Last edited by newcastle9; 24th December 2012 at 12:26 PM.
The Following 3 Users Say Thank You to newcastle9 For This Useful Post: [ View ]
24th December 2012, 03:39 PM   |  #2  
joshnichols189's Avatar
Senior Member
Chicago
Thanks Meter: 1,393
 
6,940 posts
Join Date:Joined: Jun 2010
More
Will this work on something like Xylon?

Sent from my Nexus 4 using Tapatalk 2
24th December 2012, 05:18 PM   |  #3  
Senior Member
Thanks Meter: 299
 
1,237 posts
Join Date:Joined: Aug 2009
Quote:
Originally Posted by joshnichols189

Will this work on something like Xylon?

No, Xylon uses a modded framework. You flash this and you'll get system UI force close.
27th December 2012, 07:16 AM   |  #4  
Senior Member
Ottawa
Thanks Meter: 156
 
1,330 posts
Join Date:Joined: Oct 2007
More
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: [ View ]
27th December 2012, 03:51 PM   |  #5  
evostevo1's Avatar
Senior Member
Thanks Meter: 35
 
275 posts
Join Date:Joined: Dec 2010
Will this work even on odexed ?

Sent from my Nexus 4 using xda app-developers app
27th December 2012, 06:57 PM   |  #6  
newcastle9's Avatar
OP Senior Member
Thanks Meter: 41
 
162 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by evostevo1

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: [ View ]
28th December 2012, 05:09 AM   |  #7  
SIGUEL's Avatar
Senior Member
Flag San Juan
Thanks Meter: 30
 
331 posts
Join Date:Joined: Mar 2009
More
Quote:
Originally Posted by neotekz

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
28th December 2012, 08:29 AM   |  #8  
Member
Thanks Meter: 12
 
63 posts
Join Date:Joined: 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.
28th December 2012, 10:14 AM   |  #9  
newcastle9's Avatar
OP Senior Member
Thanks Meter: 41
 
162 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by SIGUEL

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: [ View ]
28th December 2012, 10:15 AM   |  #10  
newcastle9's Avatar
OP Senior Member
Thanks Meter: 41
 
162 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by TheLawIX

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

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

Advanced Search
Display Modes