• XDA Forums have been migrated to XenForo. We are aware of several issues including missing threads, logins not working, and more. To discuss, use this thread.
  • If you are experiencing issues logging in, we moved to a new and more secure software and older account passwords were not able to be migrated. We recommend trying to reset your password, then contacting us if there are issues.

[MOD]Lower Auto-Brightness levels to save battery

ianoob

New member
Jan 29, 2011
1,426
259
0
Cincinnati
Quick question... Do I need root to apply this mod?
Depends on your phone. I have a Sensation and yes I need root and S-off to overwrite the framework apk on a ROM already installed and/or flash a new ROM with the mod in place.
But this works great for me and I'm assuming any phone with RW capability.
 

alexkno

New member
Apr 12, 2011
1,103
287
0
Hi,

when trying to recompile the framework-re from a jkay 13.2 theme I get following errors.
Has anyone an idea how to solve it?

ERROR: Failure processing PNG image D:\Alex\galaxy\apk tool multi\Apk_Multi-Tool\other\..\projects\framework-res.apk\res\drawable-hdpi\status_bar_header_background.9.png
libpng error: Read Error
ERROR: Failure processing PNG image D:\Alex\galaxy\apk tool multi\Apk_Multi-Tool\other\..\projects\framework-res.apk\res\drawable-hdpi\status_bar_item_background_focus.9.png
libpng error: Read Error
ERROR: Failure processing PNG image D:\Alex\galaxy\apk tool multi\Apk_Multi-Tool\other\..\projects\framework-res.apk\res\drawable-hdpi\status_bar_item_background_pressed.9.png

and then hundreds of times this:
..\projects\framework-res.apk\res\values\public.xml:4095: error: Public symbol drawable/unlock_left declared here is not defined.
 

_JKay_

Retired Recognized Developer
Aug 12, 2010
5,495
14,689
0
That works on my Galaxy Note,but:

I tried these values...
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
...and the screen is still too bright. Any way to decrease brightness even more?
In stock kernel these values will all become 20 in the display driver. Try a different kernel that supports lower brightness values.
 

neotekz

New member
Oct 7, 2007
1,415
170
0
Ottawa
digging up a old thread here but this is a great mod that im trying to get to work on my atrix. ive decompile, change array.xml and then compiled and adb pushed it to system\frameworks in recovery. everything works but once i boot up i get a bunch google force closes. reboot again and i get a bootloop. i also clear all cache and fix permissions before and after the push. anyone know what im doing wrong?
 

ohcie_evo

New member
Jul 16, 2010
66
3
0
just found another reason why I live miui, after following this guide to change the values I discovered that that miui settings allows me to change them under setting, as well as add more steps

Sent from my GT-I9100 using xda premium
 

dee163

New member
Nov 5, 2010
186
23
0
Unsigned framework-res.apk

Tried it, noticed the new framework-res.apk is smaller in size.

Is this normal?

I pushed the new file and it messed up my screen.
 

tomurbanowicz

Senior Member
Jan 14, 2009
1,557
143
63
Staszów
www.urbanowicz.net.pl
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
In my version APK Manager, 22 is "Select compression level for apk's". What can I input now?
In my ICS, I use unsigned framework and it is working :) But I'd like to know about that "input 22".
 
Last edited:

alexkno

New member
Apr 12, 2011
1,103
287
0
Tried it, noticed the new framework-res.apk is smaller in size.

Is this normal?

I pushed the new file and it messed up my screen.
the size depends on what compression level you have chosen.
Take care that no errors occur in apktool log

---------- Post added at 10:04 AM ---------- Previous post was at 10:01 AM ----------

Same here. Gets into a bootloop. So i put the original framework back.
I'm running stock ICS. rooted ofcourse
did you use the latest (back-)smali (to be compliant to ICS)?
And did you check that there were no errors in log? Bootloop mainly comes when during repacking the apk errors occur (e.g if you flashed a theme with different png9 files etc...
 

Christiaan91

New member
Mar 15, 2010
993
291
0
Everywhere
the size depends on what compression level you have chosen.
Take care that no errors occur in apktool log

---------- Post added at 10:04 AM ---------- Previous post was at 10:01 AM ----------



did you use the latest (back-)smali (to be compliant to ICS)?
And did you check that there were no errors in log? Bootloop mainly comes when during repacking the apk errors occur (e.g if you flashed a theme with different png9 files etc...
I did have some errors:S I'm trying to fix it and it worked.

I changed the aapt en apktool for modified ones for ICS.
Solution

Is it possible to set the minimum brightness (30) lower? (so not the auto-brightness)
 
Last edited:

toaom2

New member
Jun 21, 2006
28
1
0
Utrecht
I tried this, but I'm getting a lot of errors with the ICS 4.0.3 rom (rooted) and the latest Android SDK.

Code:
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rUS\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rUS\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-pt\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-pt\plurals.xml:79: error: Found tag </item> where </plurals> is expected
aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'policylab_allow_htmlemail' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_GB es pt
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\JESSE~1.HOU\AppData\Local\Temp\APKTOOL2814716196848511991.tmp, -x, -S, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res, -M, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
	at brut.androlib.Androlib.buildResources(Androlib.java:248)
	at brut.androlib.Androlib.build(Androlib.java:171)
	at brut.androlib.Androlib.build(Androlib.java:154)
	at brut.apktool.Main.cmdBuild(Main.java:182)
	at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\JESSE~1.HOU\AppData\Local\Temp\APKTOOL2814716196848511991.tmp, -x, -S, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res, -M, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:83)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
	... 6 more
Not sure how to proceed...
 

Christiaan91

New member
Mar 15, 2010
993
291
0
Everywhere
I tried this, but I'm getting a lot of errors with the ICS 4.0.3 rom (rooted) and the latest Android SDK.

Code:
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rUS\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-en-rUS\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-pt\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res\values-pt\plurals.xml:79: error: Found tag </item> where </plurals> is expected
aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'policylab_allow_htmlemail' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no default translation in C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res; found: en_GB es pt
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\JESSE~1.HOU\AppData\Local\Temp\APKTOOL2814716196848511991.tmp, -x, -S, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res, -M, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
	at brut.androlib.Androlib.buildResources(Androlib.java:248)
	at brut.androlib.Androlib.build(Androlib.java:171)
	at brut.androlib.Androlib.build(Androlib.java:154)
	at brut.apktool.Main.cmdBuild(Main.java:182)
	at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\JESSE~1.HOU\AppData\Local\Temp\APKTOOL2814716196848511991.tmp, -x, -S, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\res, -M, C:\Program Files (x86)\APK Multi Tool\projects\framework-res.apk\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:83)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
	... 6 more
Not sure how to proceed...
Same here 10char
The Multitool wasn't working for me neither. I removed it and installed the older APK Manager 5.0.2
And i downloaded the modified aapt and apktool and replaced the ones from the apk manager from my post above.
 

dee163

New member
Nov 5, 2010
186
23
0
Will do.
Thanks for the help.

---------- Post added at 12:31 PM ---------- Previous post was at 12:16 PM ----------

I did the first step --- decompile.

This is the log

--------------------------------------------------------------------------
|Thu 03/22/2012 -- 7:24:37.28|
--------------------------------------------------------------------------
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Could Not Find C:\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

Is this ok?

---------- Post added at 12:35 PM ---------- Previous post was at 12:31 PM ----------

REcompiled

|Thu 03/22/2012 -- 7:33:24.80|
--------------------------------------------------------------------------
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in C:\Apk_Manager_5.0.2\other\..\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'policylab_allow_htmlemail' has no default translation in C:\Apk_Manager_5.0.2\other\..\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no default translation in C:\Apk_Manager_5.0.2\other\..\projects\framework-res.apk\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation in C:\Apk_Manager_5.0.2\other\..\projects\framework-res.apk\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no default translation in C:\Apk_Manager_5.0.2\other\..\projects\framework-res.apk\res; found: en_GB es pt
I: Building apk file...
The system cannot find the file specified.
 
Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone