Thanks To Peetr_ for his Hybrid Rom
Thanks to LockeOn for His detailed guide
If you think the brightness of LCD is high during low light or night, if you think the button back light is not necessary during day time then this mod is for you.
This is a modified framework-res.apk of peetr_'s Hybrid rom. Modified LCD auto brightness
levels and button back light for better battery life.Button back light only illuminate at low brightness level.
I am using this mode for past few days without any issue. Use it at your own risk.
BUILT IN AUTOBRIGHTNESS LEVELS
<item>30</item>
<item>100</item>
<item>200</item>
<item>300</item>
<item>800</item>
<item>1500</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>60</item>
<item>100</item>
<item>140</item>
<item>200</item>
<item>225</item>
<item>250</item
MODIFIED AUTOBRIGHTNESS LEVELS
<integer-array name="config_autoBrightnessLevels">
<item>3</item>
<item>10</item>
<item>20</item>
<item>30</item>
<item>60</item>
<item>90</item>
<item>120</item>
<item>180</item>
<item>250</item>
<item>500</item>
<item>800</item>
<item>1200</item>
<item>1800</item>
<item>2500</item>
<item>5000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>13</item>
<item>18</item>
<item>25</item>
<item>30</item>
<item>40</item>
<item>50</item>
<item>60</item>
<item>70</item>
<item>80</item>
<item>90</item>
<item>100</item>
<item>120</item>
<item>150</item>
<item>180</item>
<item>210</item>
<item>240</item>
</integer-array>
Installation
1. Copy your framework-res.apk from system/framework/ to sd card as a backup using Es file explorer or root explorer
2. Copy attached framework-res.apk to System/framework and overwrite it.
3. After overwriting Phone will reboot.
4. After reboot Change the permission of framework-res.apk to rw-r-r
Tested in my Electrify that running Peetr_'s Hybrid locked rom. It may not work with other roms.
Sorry for my English
pradeeppk said:
Thanks To Peetr_ for his Hybrid Rom
Thanks to LockeOn for His detailed guide
If you think the brightness of LCD is high during low light or night, if you think the button back light is not necessary during day time then this mod is for you.
This is a modified framework-res.apk of peetr_'s Hybrid rom. Modified LCD auto brightness
levels and button back light for better battery life.Button back light only illuminate at low brightness level.
I am using this mode for past few days without any issue. Use it at your own risk.
BUILT IN AUTOBRIGHTNESS LEVELS
<item>30</item>
<item>100</item>
<item>200</item>
<item>300</item>
<item>800</item>
<item>1500</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>60</item>
<item>100</item>
<item>140</item>
<item>200</item>
<item>225</item>
<item>250</item
MODIFIED AUTOBRIGHTNESS LEVELS
<integer-array name="config_autoBrightnessLevels">
<item>3</item>
<item>10</item>
<item>20</item>
<item>30</item>
<item>60</item>
<item>90</item>
<item>120</item>
<item>180</item>
<item>250</item>
<item>500</item>
<item>800</item>
<item>1200</item>
<item>1800</item>
<item>2500</item>
<item>5000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>13</item>
<item>18</item>
<item>25</item>
<item>30</item>
<item>40</item>
<item>50</item>
<item>60</item>
<item>70</item>
<item>80</item>
<item>90</item>
<item>100</item>
<item>120</item>
<item>150</item>
<item>180</item>
<item>210</item>
<item>240</item>
</integer-array>
Installation
1. Copy your framework-res.apk from system/framework/ to sd card as a backup using Es file explorer or root explorer
2. Copy attached framework-res.apk to System/framework and overwrite it.
3. After overwriting Phone will reboot.
4. After reboot Change the permission of framework-res.apk to rw-r-r
Tested in my Electrify that running Peetr_'s Hybrid locked rom. It may not work with other roms.
Sorry for my English
Click to expand...
Click to collapse
Thanks
MarcquisDale said:
Thanks
Click to expand...
Click to collapse
Please share your experience if you tried it. I am noticed a good improvement in battery life and less strain for my eyes. Actually it will Not harm anything. If you don't like the mod just replace it with the backup framework-res.apk. Or if you need more or less brightness in any levels please report. I will modify and upload another framework-res.apk. You can check the variation of lcd brightness using android sensorbox application.
Sent from my Motorola Electrify using Tapatalk 2
pradeeppk said:
Please share your experience if you tried it. I am noticed a good improvement in battery life and less strain for my eyes. Actually it will Not harm anything. If you don't like the mod just replace it with the backup framework-res.apk. Or if you need more or less brightness in any levels please report. I will modify and upload another framework-res.apk. You can check the variation of lcd brightness using android sensorbox application.
Sent from my Motorola Electrify using Tapatalk 2
Click to expand...
Click to collapse
Its running great so far
pradeeppk said:
Thanks To Peetr_ for his Hybrid Rom
Thanks to LockeOn for His detailed guide
If you think the brightness of LCD is high during low light or night, if you think the button back light is not necessary during day time then this mod is for you.
This is a modified framework-res.apk of peetr_'s Hybrid rom. Modified LCD auto brightness
levels and button back light for better battery life.Button back light only illuminate at low brightness level.
I am using this mode for past few days without any issue. Use it at your own risk.
BUILT IN AUTOBRIGHTNESS LEVELS
<item>30</item>
<item>100</item>
<item>200</item>
<item>300</item>
<item>800</item>
<item>1500</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>60</item>
<item>100</item>
<item>140</item>
<item>200</item>
<item>225</item>
<item>250</item
MODIFIED AUTOBRIGHTNESS LEVELS
<integer-array name="config_autoBrightnessLevels">
<item>3</item>
<item>10</item>
<item>20</item>
<item>30</item>
<item>60</item>
<item>90</item>
<item>120</item>
<item>180</item>
<item>250</item>
<item>500</item>
<item>800</item>
<item>1200</item>
<item>1800</item>
<item>2500</item>
<item>5000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>13</item>
<item>18</item>
<item>25</item>
<item>30</item>
<item>40</item>
<item>50</item>
<item>60</item>
<item>70</item>
<item>80</item>
<item>90</item>
<item>100</item>
<item>120</item>
<item>150</item>
<item>180</item>
<item>210</item>
<item>240</item>
</integer-array>
Installation
1. Copy your framework-res.apk from system/framework/ to sd card as a backup using Es file explorer or root explorer
2. Copy attached framework-res.apk to System/framework and overwrite it.
3. After overwriting Phone will reboot.
4. After reboot Change the permission of framework-res.apk to rw-r-r
Tested in my Electrify that running Peetr_'s Hybrid locked rom. It may not work with other roms.
Sorry for my English
Click to expand...
Click to collapse
thanx
did the first 3 steps on my stock, locked, rooted 2.3.4 photon
Installation
1. Copy your framework-res.apk from system/framework/ to sd card as a backup using Es file explorer or root explorer
2. Copy attached framework-res.apk to System/framework and overwrite it.
3. After overwriting Phone will reboot.
Click to expand...
Click to collapse
my phone will hang at the sprint "now" screen at bootup, and then vibrate. It will restart and hang at the sprint "now" screen again, and then shut off. Sometimes it will get past the "now" screen and get into a "starting services" screen, but hang there. How can I fix this? I did make a copy of my original, and it is on my microSD.
Edit: got my phone working again after SBF to stock.
This mode is only for peetr_s hybrid rom
Sent from my Electrify using Tapatalk
Thanks
Sent from my MB855 using XDA Free mobile app
Related
As more and more people are interested to port roms from other phones to our x10, these 2 features are usually missing and need some modifications to work properly.
Here is a simple guide to enable these 2 features on our x10
Pre-Requisite
1. You need to know how to use apktool or any tool that can decompile/compile apks.
2. You need to know how to use smali/baksmali tool
This is not a tutorial of how to use apktool or smali tool. Please google for the above for downloads and tutorials
Credits to Z&J for their great FreeX10 rom that provides a base for reference.
Enable Hardware LED
You need to modify framework-res.apk (in /system/framework folder)
1. backup the original framework-res.apk
2. use apktool to decode framework-res.apk to a folder
syntax:
Code:
apktool d framework-res.apk
This should create a folder "framework-res" in the current folder
3. use a text editor (eg notepad++) to open the file <foldername>/res/values/array.xml
look for something similar to below:
Code:
<integer-array name="config_autoBrightnessLevels">
<item>200</item>
<item>400</item>
<item>1000</item>
<item>3000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>25</item>
<item>55</item>
<item>70</item>
<item>70</item>
<item>250</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
and replace it with:
Code:
<array name="config_autoBrightnessLevels" />
<array name="config_autoBrightnessLcdBacklightValues" />
<array name="config_autoBrightnessButtonBacklightValues" />
<array name="config_autoBrightnessKeyboardBacklightValues" />
4. open the file <foldername>/res/values/bools.xml
looks for the line:
Code:
<bool name="config_automatic_brightness_available">true</bool>
and change the word "true" to "false"
5. compile the apk
syntax:
Code:
apktool b <foldername>
6. replace the resources.arsc in original framework-res.apk with the one in <foldername>/build/apk folder
Note: I use TotalCommander as it has 2 pane windows and can open apk file as folder but there should be many guides in the App & Theme section
that teach you how to replace resources file in framework-res.apk
7. replace the framework-res.apk in /system/framework folder
8. reboot
Enable Camera Flash Light
You need to modify services.jar (in /system/framework folder)
1. backup the original services.jar
2. use winrar to extract classes.dex from services.jar
3. use smali/baksmali tool to decode classes.dex to a folder
syntax:
Code:
java -jar baksmali.jar -o <foldername>/ classes.dex
4. use a text editor (eg notepad++) to open the file <foldername>/com/android/server/LightsService.smali
5. look for lines that contain this (there should be 5 of them):
Code:
"/sys/class/leds/spotlight/brightness"
or
"/sys/class/leds/flashlight/brightness"
and replace it with:
Code:
"/sys/class/leds/lv5219lg:fled/spotlight_enable"
6. use smali/baksmali tool to compile classes.dex
syntax:
Code:
java -Xmx512M -jar smali.jar <foldername>/ -o classes.dex
7. replace classes.dex in services.jar with the new classes.dex using winrar
8. replace the services.jar in /system/framework folder
9. reboot
10. test it with switchpro or LED Light (from market) or vignette (provided camera works)
Notes:
1. If booting fails that'd mean something wrong in compiling / packing the apk. please replace the original file
2. The method may not apply to every rom. Do it at your own risk.
Pls hit "Thanks" if it helps you
This guide was so badly needed,
awesome job bro.... Thumbs up to this awesome guide
@cobrato
thank you for this!!!
it will help many ppl who r porting ROMs
@all
u can find the above mentioned tools in most android kitchens [email protected]
some useful links:
one of the best kitchens available: dsixda's HTC Android Kitchen
for smali/baksmali tool http://code.google.com/p/smali/
EASYapkTOOLcompilerDECOMPILER
can this be used to turn of the keyboard lights?
can someone make a xrec zip for this?
Would a flashable zip be possible?
sent from my gingerbread powered c64 with NO wlod
chiefy009 said:
Would a flashable zip be possible?
sent from my gingerbread powered c64 with NO wlod
Click to expand...
Click to collapse
Of course it will be possible. But it will be rom secific.
Sent from my X10project using XDA Premium App
Ask for patch in TripNreaver Miui 1.0.6
Hi,
Im dumb in commandline, so i ask for someone please to help me in make this patch.
Im ataching the framework_res.apk and services.jar from tripmiui 1.0.6.
http://www.megaupload.com/?d=GK7UQZF0
thanks in advance.
Has anybody checked if this works?
Cobrato appreciate that someone took out a patch for 1.0.63 tripmiui?
Hello, i keep breaking my device...:-( stuck in step 6...
Thanks cobrato , can you make this work in a flashable zip format so we can install it directly to the phone with the no hassle of typing.
flashable zip will be really greatfull...
For flashable zip you'll need to do it for each rom and that's not the purpose of this thread
For those who are interested. Applied to Trip's MIUI 1.07 using this tutorial. (Great COBS! Easy to follow!)
framework - http://dl.dropbox.com/u/11996466/framework-res.apk
Services.jar - http://dl.dropbox.com/u/11996466/services.jar
It works for me!
armic said:
For those who are interested. Applied to Trip's MIUI 1.07 using this tutorial. (Great COBS! Easy to follow!)
framework - http://dl.dropbox.com/u/11996466/framework-res.apk
Services.jar - http://dl.dropbox.com/u/11996466/services.jar
It works for me!
Click to expand...
Click to collapse
Are those the files needed for trips 1.07?
Sent from my X10i TripNMiUI using XDA App
kylec said:
Are those the files needed for trips 1.07?
Sent from my X10i TripNMiUI using XDA App
Click to expand...
Click to collapse
try Trips' without this and observe if there are hardware led and flash using vig.
armic said:
For those who are interested. Applied to Trip's MIUI 1.07 using this tutorial. (Great COBS! Easy to follow!)
framework - http://dl.dropbox.com/u/11996466/framework-res.apk
Services.jar - http://dl.dropbox.com/u/11996466/services.jar
It works for me!
Click to expand...
Click to collapse
hey, great job.
which permissions need to be set for framework-res.apk to work?
can it use for enable flash light for video recording in cm 6.1.3 ?
pedrocel85 said:
hey, great job.
which permissions need to be set for framework-res.apk to work?
Click to expand...
Click to collapse
Both
X X -
X - -
X - -
Sent from my X10i TripNMiUI using XDA Premium App
farzin_silver said:
can it use for enable flash light for video recording in cm 6.1.3 ?
Click to expand...
Click to collapse
As COB said, we need to do it on every ROM separately.
Sent from my X10i TripNMiUI using XDA Premium App
Found it here:
http://forum.xda-developers.com/showthread.php?t=1034743
Sucessfully made it working an my Evo3D.
Should save a lot of battery..
I've used apktool instead of apk manager, doesnt work for me with apk manager.
How to deal with apktool?:
http://forum.xda-developers.com/showthread.php?t=1225558
- Take the steps 1 - 5 (pull the framework-res instead of SystemUI.apk)
- go to the decompiled folder->res->values: array.xml
and edit the valus as described here:
steps 13-15:
http://forum.xda-developers.com/showthread.php?t=1034743
you could just take values of the attached array.xml file.
...on GSM Leedroid I got bootloops when I was using values under 20...
Then take the steps 7 to the end from here:
http://forum.xda-developers.com/showthread.php?t=1225558
use framework-res instead of SystemUI
AND drag&drop the ressources.arsc from new compiled to original framework-res.apk with 7zip.
Turge said:
That worked perfectly. Here's what I did:
Pulled the framework: adb pull /system/framework/framework-res.apk
Pulled the resources: adb pull /system/framework/com.htc.resources.apk
Decompiled the framework-res APK: apktool d framework-res.apk
Edited arrays.xml with the new values
Recompiled the APK: apktool b framework-res framework-res-new.apk
Dragged and dropped resource.arsc from framework-res-new.apk to framework-res.apk
Pushed the modified APK: adb push framework-res.apk /system/framework/
Set the permissions - omitted this step since it has enough permission
Rebooted
I'll need to tweak the settings since it's a little low atm..
Click to expand...
Click to collapse
gl
Awesome sauce!
I used this to mod - http://forum.xda-developers.com/showthread.php?t=1193149
I'm a tiny bit surprised this hasn't gotten more responses with how much people ***** about the auto-brightness. lol
I just did this, waiting for phone to reboot. should it be smoking?....
kidding. anyways, I dropped the 1st half of the values, added more steps to make transitions a little smoother. *cross fingers and wafts smoke away from face*
Or you could skip all that bull**** and just use root explorer and goto
/sys/devices/platform/leds-pm8050/leds/button-backlight/currents. Open currents in text editor and change value 20 to value 2. It will lower them by more than half. Don't forget to save before you exit.
mattfmartin said:
Or you could skip all that bull**** and just use root explorer and goto
/sys/devices/platform/leds-pm8050/leds/button-backlight/currents. Open currents in text editor and change value 20 to value 2. It will lower them by more than half. Don't forget to save before you exit.
Click to expand...
Click to collapse
OK.... I see several references to LED and buttons and such.. you sure this has to do.with the autobrightness of the screen?..
Sent from my PG86100 using Tapatalk
felacio said:
OK.... I see several references to LED and buttons and such.. you sure this has to do.with the autobrightness of the screen?..
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
Nope it doesn't. Read to fåst. Thought it was another bright capacitive led thread.
Did you managed to get it working felacio? Which rm you are using? If you want I can do it for you..
Sent from my HTC EVO 3D X515m using XDA Premium App
j4n87 said:
Did you managed to get it working felacio? Which rm you are using? If you want I can do it for you..
Click to expand...
Click to collapse
Oh yeah. The sensor is very crude. The other values I added are ignored. It was set for 11 and 41 lux values. I changed the 41 to 31. The phone ignores the 31 value and changes the brightness at 41 still. So. With that in mind. I need to find a brighter brightness for the lowest value because it won't trigger in soft lit conditions. But its just a tad too dark for those soft lit situations. So.....
Anyways. Yeah! It worked. Just gotta work with my values. Lol.
Sent from my PG86100 using Tapatalk
oh, okay..yeah also noticed that the sensivity is a bit slow.
But still better than the standard configuration
felacio said:
Oh yeah. The sensor is very crude. The other values I added are ignored. It was set for 11 and 41 lux values. I changed the 41 to 31. The phone ignores the 31 value and changes the brightness at 41 still. So. With that in mind. I need to find a brighter brightness for the lowest value because it won't trigger in soft lit conditions. But its just a tad too dark for those soft lit situations. So.....
Anyways. Yeah! It worked. Just gotta work with my values. Lol.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
So what's the exact procedure for this?
1. Use APK Tool to decompile the framework-res APK (apktool d framework-res.apk)
2. Edit arrays.xml with the values
3. Recompile the APK (apktool b framework-res framework-res.apk)
4. Push the APK to /system/framework/
5. Set the permissions
6. Reboot
I obviously screwed up a step because my boot animation kept looping until I pushed the original APK and rebooted. The new APK is also almost half the size as the original...
Turge said:
So what's the exact procedure for this?
1. Use APK Tool to decompile the framework-res APK (apktool d framework-res.apk)
2. Edit arrays.xml with the values
3. Recompile the APK (apktool b framework-res framework-res.apk)
4. Push the APK to /system/framework/
5. Set the permissions
6. Reboot
I obviously screwed up a step because my boot animation kept looping until I pushed the original APK and rebooted. The new APK is also almost half the size as the original...
Click to expand...
Click to collapse
updated op with step 7-end.
j4n87 said:
updated op with step 7-end.
Click to expand...
Click to collapse
Ahh.. this is probably what I was looking for: drag&drop the ressources.arsc from new compiled to original framework-res.apk with 7zip.
Thanks, I'll try it after lunch using WinRAR.
you're welcome
j4n87 said:
you're welcome
Click to expand...
Click to collapse
That worked perfectly. Here's what I did:
Pulled the framework: adb pull /system/framework/framework-res.apk
Pulled the resources: adb pull /system/framework/com.htc.resources.apk
Decompiled the framework-res APK: apktool d framework-res.apk
Edited arrays.xml with the new values
Recompiled the APK: apktool b framework-res framework-res-new.apk
Dragged and dropped resource.arsc from framework-res-new.apk to framework-res.apk
Pushed the modified APK: adb push framework-res.apk /system/framework/
Set the permissions - omitted this step since it has enough permission
Rebooted
I'll need to tweak the settings since it's a little low atm..
Turge said:
That worked perfectly. Here's what I did:
Pulled the framework: adb pull /system/framework/framework-res.apk
Pulled the resources: adb pull /system/framework/com.htc.resources.apk
Decompiled the framework-res APK: apktool d framework-res.apk
Edited arrays.xml with the new values
Recompiled the APK: apktool b framework-res framework-res-new.apk
Dragged and dropped resource.arsc from framework-res-new.apk to framework-res.apk
Pushed the modified APK: adb push framework-res.apk /system/framework/
Set the permissions - omitted this step since it has enough permission
Rebooted
I'll need to tweak the settings since it's a little low atm..
Click to expand...
Click to collapse
yeah, thats the right way
..will add this to the OP
j4n87 said:
yeah, thats the right way
..will add this to the OP
Click to expand...
Click to collapse
Cool.
By the way, you can see the settings used via "adb shell" using the command: logcat | grep lcdValue
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:10, lcdValue:20
D/PowerManagerService( 245): New lightsensor value:10, lcdValue:20
D/PowerManagerService( 245): New lightsensor value:160, lcdValue:80
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:90, lcdValue:60
D/PowerManagerService( 245): New lightsensor value:160, lcdValue:80
D/PowerManagerService( 245): New lightsensor value:40, lcdValue:40
Is it safe to assume that this method will work on Sensation?
KrisHilbun said:
Is it safe to assume that this method will work on Sensation?
Click to expand...
Click to collapse
Yep. I did if for a friends sensation. Same process.
Doesn't work
Hi,
I tried doing this and followed the exact steps (used the values from the other posting) and when the phone finishes rebooting, the screen stays in the dimmest value rather then adjusting by itself when I set it to auto brightness.
The only different thing I did was instead of using ADB, I used root explorer to pull out framework-res and com.htc into my SD card then moved that to my apktool folder to extract. Then used root explorer to copy it back into system/framework and applied the same permissions as it was before.
Any ideas?
I jumped to a new rom and ran also to issues. My phone was in a bootloop after editing the array xml. Got a "devide by zero fatal exception" - found out, that the lowest value I can us is 21 - the array.xml in the thread i linked is starting with 5 i think.
My current array.xml:
Code:
</integer-array>
<integer-array name="config_autoBrightnessLevels">
<item>11</item>
<item>41</item>
<item>91</item>
<item>161</item>
<item>226</item>
<item>321</item>
<item>641</item>
<item>1281</item>
<item>2601</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>21</item>
<item>21</item>
<item>41</item>
<item>72</item>
<item>110</item>
<item>145</item>
<item>186</item>
<item>208</item>
<item>231</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesUp">
<item>21</item>
<item>41</item>
<item>88</item>
<item>145</item>
<item>145</item>
<item>145</item>
<item>186</item>
<item>208</item>
<item>231</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesDown">
<item>21</item>
<item>41</item>
<item>88</item>
<item>145</item>
<item>145</item>
<item>186</item>
<item>208</item>
<item>231</item>
<item>255</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
..are you also sure, that you have all object tags opend/close correctly?
Sometimes I copied too much/less from one to other xml and also got faulty behaviour.
Hi
Can someone please exlpain the following code:
<integer-array name="config_autoBrightnessLevels">
<integer-array name="config_autoBrightnessLcdBacklightValues">
<integer-array name="config_autoBrightnessLcdBacklightValuesUp">
<integer-array name="config_autoBrightnessLcdBacklightValuesDown">
I want to understand which of the following does what so that I can set my own auto brightness values, please help
Cheers
Kar do yar koi tou reply
Hey all,
So early today an eagle eyed user on our forum www.alliance-rom.com (Kkillize) posted asking if the following could cause battery drain. The power profile.xml in framework-res.apk had the following:
Code:
<item name="cpu.idle">4</item>
<array name="cpu.active">
<value>577</value>
<value>408</value>
<value>249</value>
<value>148</value>
<value>55</value>
</array>
<item name="battery.capacity">2100</item>
Now...last time I checked our device didnt have these values!! Seems samsung ported the S3 firmware and didnt change these entries.
I suspected these may be contributing if not responsible for the lockscreen freeze so me and Mirkoddd have tested changing these values today to what they should be...
Code:
<item name="cpu.idle">2</item>
<array name="cpu.active">
<value>577</value>
<value>408</value>
<value>249</value>
<value>148</value>
<value>55</value>
</array>
<item name="battery.capacity">1650</item>
...and so far have had 0 lockscreen freezes.
I have attached a link to a cwm framework-res.apk for deodexed LSJ for willing testers as this needs to be tested by lots of people. I have also attached the individual compiled xml for people on custom roms who want to drag this into their framework-res.apk.
MAKE A BACKUP AND DO NOT FLASH THE CWM ZIP ON A CUSTOM ROM!!!!
If you have already tried this and still get freezes, please shout up!!
Thanks
https://sourceforge.net/projects/goldiealliance/files/Stock-LSJ-LockscreenFreezeFixTest.zip/download
2hrs with no freeze
Mirko ddd said:
2hrs with no freeze
Click to expand...
Click to collapse
Yes.... I ran that all day yesterday with no freeze.
:thumbup:
I was scanning around and noticed that.
Sent from my SGH-I777 using Tapatalk 2
Seems too simple to me but we will see once people test it
Goldieking said:
Seems too simple to me but we will see once people test it
Click to expand...
Click to collapse
Funny thing is also...since I changed that bool setting I told you about.... earlier I haven't had any freeze either.
So I'm not sure if it's one or both you know?
Sent from my SGH-I777 using Tapatalk 2
As posted in the alliance forums, it definitely seems to be working. Tnx guys
Sent from my GT-I9100
Does that battery capacity value matter for users with the Samsung extended battery?
Sent from my GT-I9100 using Tapatalk 2
diffusal said:
Does that battery capacity value matter for users with the Samsung extended battery?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Yes because it effects how the phone reads the battery usage and it could show misinformation.
This is what the sgs2 should have with stock battery.
Code:
<device name="Android">
<item name="none">0</item>
<item name="screen.on">75</item>
<item name="bluetooth.active">32</item>
<item name="bluetooth.on">0.3</item>
<item name="screen.full">201</item>
<item name="wifi.on">0.3</item>
<item name="wifi.active">83</item>
<item name="wifi.scan">52</item>
<item name="dsp.audio">34</item>
<item name="dsp.video">265</item>
<item name="radio.active">242</item>
<item name="radio.scanning">82</item>
<item name="gps.on">1</item>
<array name="radio.on">
<value>2.7</value>
<value>3</value>
</array>
<array name="cpu.speeds">
<value>12000000</value>
<value>10000000</value>
<value>800000</value>
<value>500000</value>
<value>200000</value>
</array>
<item name="cpu.idle">2</item>
<array name="cpu.active">
<value>577</value>
<value>408</value>
<value>249</value>
<value>148</value>
<value>55</value>
</array>
<item name="battery.capacity">1650</item>
</device>
So for users with extended battery do we just change 1650 to 1950?
Sent from my GT-I9100 using Tapatalk 2
diffusal said:
So for users with extended battery do we just change 1650 to 1950?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
To get more accurate battery usage results..... yes...
Wow! Quiet thread, I thought loads of people would be wanting to test if this fixes the most annoying thing in LSJ. Without feedback and testers how can we know if it fixes the issue?
The lockscreen freeze happens mainly on wifi and is quite annoying.
Flashed the fix and will test it for at least 24hrs to come to a conclusion.
Kudos to whoever found this out. Does this also help in fixing battery drain on wifi?
Sent from the Matrix
rakeshishere said:
The lockscreen freeze happens mainly on wifi and is quite annoying.
Flashed the fix and will test it for at least 24hrs to come to a conclusion.
Kudos to whoever found this out. Does this also help in fixing battery drain on wifi?
Sent from the Matrix
Click to expand...
Click to collapse
It may help with drain i suppose yes. The more people who install it the better. Thanks
Goldieking said:
Hey all,
So early today an eagle eyed user on our forum www.alliance-rom.com (Kkillize) posted asking if the following could cause battery drain. The power profile.xml in framework-res.apk had the following:
Code:
<item name="cpu.idle">4</item>
<array name="cpu.active">
<value>577</value>
<value>408</value>
<value>249</value>
<value>148</value>
<value>55</value>
</array>
<item name="battery.capacity">2100</item>
Now...last time I checked our device didnt have these values!! Seems samsung ported the S3 firmware and didnt change these entries.
I suspected these may be contributing if not responsible for the lockscreen freeze so me and Mirkoddd have tested changing these values today to what they should be...
Code:
<item name="cpu.idle">2</item>
<array name="cpu.active">
<value>577</value>
<value>408</value>
<value>249</value>
<value>148</value>
<value>55</value>
</array>
<item name="battery.capacity">1650</item>
...and so far have had 0 lockscreen freezes.
I have attached a link to a cwm framework-res.apk for deodexed LSJ for willing testers as this needs to be tested by lots of people. I have also attached the individual compiled xml for people on custom roms who want to drag this into their framework-res.apk.
MAKE A BACKUP AND DO NOT FLASH THE CWM ZIP ON A CUSTOM ROM!!!!
If you have already tried this and still get freezes, please shout up!!
Thanks
https://sourceforge.net/projects/goldiealliance/files/Stock-LSJ-LockscreenFreezeFixTest.zip/download
Click to expand...
Click to collapse
Im on a custom rom so how can I safely apply this?
Omega 16.2
philz kernal 3.75
ICS XD AIO mod
GT-I9100
How do I change this if I have "the extended battery". The xml seems to be in some binary format
Take my cwm zip.
Copy your framework-res.apk from your phones system/framework folder to pc.
Download the xml attached in op.
Open your framework-res.apk with 7zip.
Drag the xml into the res/xml folder.
Close 7zip.
Replace the framework-res.apk in the flashable zip with the one you just edited and flash it in cwm.
Sent from my GT-I9100 using Tapatalk 2
Thanks but my ideal was to change The value to match my extended battery
Skickat från min GT-I9100 via Tapatalk 2
Goldieking said:
Take my cwm zip.
Copy your framework-res.apk from your phones system/framework folder to pc.
Download the xml attached in op.
Open your framework-res.apk with 7zip.
Drag the xml into the res/xml folder.
Close 7zip.
Replace the framework-res.apk in the flashable zip with the one you just edited and flash it in cwm.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Ok I will give it a try.
Omega 16.2
philz kernal 3.75
ICS XD AIO mod
GT-I9100
I am going to modify it to suit the 2000mah battery and test it. Why do we need to copy the framework-res.apk from the phone? Also, how to modify the xml file in the front page which is not allowing the text editor to edit. Thx.
Would you please share it with med also
Skickat från min GT-I9100 via Tapatalk 2
I hope this is the correct forum
I am doing this to Cyanogenmod 11.
I want to add an option to Settings > Interface > Status Bar > Signal Status Style. I am so close to having it done, but there is one thing I am missing, and that is actually getting the radio button to switch the Icon to the correct .java. Here is what I have done so far:
Added to Setting/res/values/cm_strings.xml;
Code:
<string name="status_bar_signal_style_always">Always show type</string>
Added two lines to Settings/res/values/cm_arrays.xml;(marked with *'s)
Code:
<string-array name="entries_status_bar_signal" translatable="false">
<item>@string/status_bar_signal_style_icon</item>
<item>@string/status_bar_signal_style_text</item>
*<item>@string/status_bar_signal_style_always</item>
<item>@string/status_bar_style_hidden</item>
</string-array>
<string-array name="values_status_bar_signal" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
*<item>3</item>
</string-array>
Created a new java file named SignalClusterAlwaysView.java in SystemUI/src/com/android/systemui/statusbar and signal_cluster_always_view.xml in SystemUI/res/layout, respectively;
Added to SystemUI/res/layout/status_bar.xml;
Code:
<include layout="@layout/signal_cluster_always_view"
android:id="@+id/signal_cluster_always"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
Added (changed STYLE_HIDDEN to 3) in SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java.
Code:
public static final int STYLE_ALWAYS = 2;
Really all I am trying to do is create a setting to show network type even while WiFi is connected. This is accomplished by simply clearing this line from SignalClusterView.java,
Code:
mMobileType.setVisibility(
!mWifiVisible ? View.VISIBLE : View.GONE);
and changing android:layout_marginEnd to 3dip in signal_cluster_view.xml.
I can't seem to figure out how the existing setting for a text only network icon sends that to SystemUI. I've explored StatusBar.java in the Settings.apk source, and I think the issue may be in this line,
Code:
int signalStyle = Settings.System.getInt(resolver, Settings.System.STATUS_BAR_SIGNAL_TEXT, 0);
where it is setting the value of the option selected to Settings.System.STATUS_BAR_SIGNAL_TEXT. I think it is properly setting the value to 2, like I want, but it still sees 2 as HIDDEN instead of ALWAYS; or that it does see I want ALWAYS, but doesn't know to refer to SignalClusterAlwaysView.java in SystemUI.
What am I missing? Is there an easier way to do this?
Sorry if this is in the wrong thread.
I just checked, and yes, the value of STATUS_BAR_SIGNAL is changing to my intended values. My one missing link is defining what those values do.
Where is the file that contains the value assignments? i.e. STATUS_BAR_SIGNAL = 1 starts StatusBarTextView.java in systemui, while 2 and 3 don't do anything. I don't care about 3, just need to make 2 start StatusBarAlwaysView.java (or that process, obviously it isn't .java once compiled).
I answered my own question here: http://stackoverflow.com/questions/21869758/adding-a-setting-option-in-android-settings-apk/21881423#21881423