yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Themes and Apps] prosumerhacks:
Nice..thanks!

I tried the mod and i think it's working.. but more tests to do in the coming days... outside in the bright sunlight.. :)

can op explain what these values are and how changing them really gets the auto-brightness levels to change... some explanation would be helpful... ;)

thanks!
[Galaxy S II Themes and Apps] zoule HCo:
Thanks u for the great modification..

I've tried several value.. will post my best result..:D
[Galaxy S II Themes and Apps] prosumerhacks:
Please do...and can you share your observation too.. ;)
[Galaxy S II Themes and Apps] LockeOn:
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.

Explanation is also added to the first post now.

The latest values that I am testing (previous ones from couple of posts before were to low):

5

32

60

120

240
[Galaxy S II Themes and Apps] zoule HCo:
Want to know does this value has related with the other config?

<integer-array name="config_autoBrightnessLevels">
<item>15</item>
<item>150</item>
<item>1500</item>
<item>15000</item>
</integer-array>

current testing value..

<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>5</item>
<item>15</item>
<item>45</item>
<item>90</item>
<item>170</item>

Even though i change the value.. the screen still look bright.. but u will notice the different when change setting auto/manual brightness it will dim a little bit compare to the stock samsung value.. so what i can say.. its worked..
[Galaxy S II Themes and Apps] swissd8:
I am very interested as well, as I find the brightness to high most of the time and the display uses like 80% of power even indoors
[Galaxy S II Themes and Apps] zoule HCo:
oh my.. very interesting finding.. I've been use this value

EDIT..

<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>5</item>
<item>15</item>
<item>45</item>
<item>90</item>
<item>170</item>
</integer-array>

Battery life improve a lot.. for the last almost 3 hours with phone call, sms + playing with Amoled plus screen the battery only drop 2%.. the screen really eat up the battery a lot before this twaek happen..
[Galaxy S II Themes and Apps] LockeOn:
My recomendation for all kinds of modifications is: Do NOT touch something You don't know. These values are Lumen values which describe light intensity that is getting to your light sensors. By lowering these values You INCREASED battery consumption because your screen will now go on higher brightness level with lower light. So please don' t temper with stuff that You are not familliar with but if You really insist on doing so don't let others copy your mistakes by posting strange mods and saying it has great results.
[Galaxy S II Themes and Apps] zoule HCo:
Thanks.. i also have strange feeling.. about this..

bcoz the the sensor react sometime very slow..

Thanks my friend.. noted..
[Galaxy S II Themes and Apps] prosumerhacks:
@desean, can you pls add your comments on the more aggressive values you tried...
[Galaxy S II Themes and Apps] galinha:
Thanks for your work , how do i install this ( soory) im in cognition 1.50 ?

Please.

Thanks in advance
[Galaxy S II Themes and Apps] desean:
still trying so will add after using it for a few days.

but so far it working great for me. bright enough when outdoors under sunlight although no strong sunlight condition testing yet as it is raining for most part of the day at where i am.
[Galaxy S II Themes and Apps] LockeOn:
I tried your values and so far second level value - 20 is a little bit too low and in the morning sun it is a little bit too dim as a second value I am using 32 and so far it is always bright (and it already is less then half of the standard Samsung levels)
[Galaxy S II Themes and Apps] desean:
i know my values isn't for everyone ;)

for me i am trying to find values that work best for me indoors and outdoors at the minimum brightness (i think i am more tolerant on the lower brightness :p).
[Galaxy S II Themes and Apps] prosumerhacks:
alrite desean... ;) i'm using the same values.. lets share notes then! :)

thanks!
[Galaxy S II Themes and Apps] galinha:
Please...how do i instal this in cognition 1.5 ?
[Galaxy S II Themes and Apps] prosumerhacks:
Please read first post...
[Galaxy S II Themes and Apps] galinha:
Thanks but im really just a New Andoid used ! ADB is not for me...dont know what is ..
[Galaxy S II Themes and Apps] LockeOn:
In that case this modification is definitely not for You. Guide included in the first post is as clear and simple as it can be.
[Galaxy S II Themes and Apps] galinha:
Thanks...i read.... but can you help me with ADB ? You reply will say google it ?

Its easy to help even with stupid questions....
[Galaxy S II Themes and Apps] Deviser:
Could we have a CWM flashable zip with this MOD? Thanks.
[Galaxy S II Themes and Apps] desean:
not quite possible. why? Some other MODs also modify framework-res.apk to work (for example, I know APM uses framework-res.apk too). If CWM flashable zip is to be provided, there would be too many possible combinations to take care of or else your other MODs may break. Best way is to learn and DIY. A simple and clear guide is already provided on the first post.
[Galaxy S II Themes and Apps] desean:
seriously, don't expect to be spoon-fed here. you can start reading from http://xdaforums.com/showthread.php?t=532719
[Galaxy S II Themes and Apps] LockeOn:
Exactly as desean has said, it would require to make plenty of CWM packages for each framework there is (for each rom, each modification etc.) so the only option is to either DIY or wait untill rom/theme maker etc. will include this modification into his/her rom/theme/modification.
[Galaxy S II Themes and Apps] David Roosendaal:
So I liked the idea... installed APK Manager (no spaces in the path)

And the script tells me I have no Java.

I do, and it's up to date too. Any ideas? I'm stuck.

Running W7/64b

EDIT: you don't need Java, but the JAVA JDK (and then I hit not having ADB but got that working now :) )

Cheers,

David
[Galaxy S II Themes and Apps] Deviser:
I follow the guide but I end with a smaller framework.apk (with less 1MB than the original). Since I'm just changing a value, is this normal?

I tried to push the apk and the phone stuck at Samsung logo...then I used the previous framework and the phone booted normally.
[Galaxy S II Themes and Apps] Mekrel:
Apk Manager has set higher zip compression than the original .apk, apparently, this can cause problems. You can set compression in apk manager to 0

Are you on a deodexed ROM? Did you clear Dalvik cache before booting?

If you open both the original .apk and your modded .apk with your Archive manager (WinRar/WinZip/7zip), do both have the same CRC value for the files in META-INF and for AndroidManifest.xml?
[Galaxy S II Themes and Apps] David Roosendaal:
When I use option 8 Adb push...

It fails to put the file to where I want it...

When I go to adb and type

adb remount

it says remount failed: Operation not permitted.

I have a rooted phone (CFROOT) ... this isn't good enough?

Irritating.... any ideas? I have the environment variable set to the sdk/platform-tools dir... it finds ADB

I used root explorer to overwrite the file. Done.

Does puzzle me why it doesn't want to go thru ADB...
[Galaxy S II Themes and Apps] Deviser:
I've set the compression to zero and I get a bigger file in the end... Phone still stuck at Samsung logo.

I'm using VillainRom 2.4.2 (deodexed) with the deodexed browser fix.

The CRC for those files is the same.

Thanks for your help.

UPDATE: Had to flash VillainRom again (without wiping) and now the mod worked. Maybe it was the theme i used the cause of my problems.

In recovery try:

Adb root

adb remount

adb push....

(This worked for me...)
[Galaxy S II Themes and Apps] squall_kay:
Any way to make the auto-brightness faster to response?
[Galaxy S II Themes and Apps] LockeOn:
You can always temper with values I described in this post - http://xdaforums.com/showpost.php?p=17033682&postcount=35

By lowering them You phone will respond to the lower light intensity ergo it will respond faster although I do not recomend this because it can make battery usage high. The other day I was also thinking about adding more auto-brightness leves but I am afraid it would result in higher battery usage as well.
[Galaxy S II Themes and Apps] desean:
your question was already answered at post 54, please read. if it isn't causing you any issues, you can use it. my redone framework-res.apk is also 5.98MB and everything is fine.

p.s. please post here instead of pm me. at least others can read and learn as well.
[Galaxy S II Themes and Apps] desean:
prosumerhacks, testing concluded so comments added too ;)
[Galaxy S II Themes and Apps] bgx:
Just want to say that you can add more brightness levels! Tryd to make it a bit smother and it does work! ;-)
[Galaxy S II Themes and Apps] Jason93:
Can you tell us your values please??
[Galaxy S II Themes and Apps] bgx:
Here we go:

<integer-array name="config_autoBrightnessLevels">
<item>15</item>
<item>150</item>
<item>1500</item>
<item>8500</item>
<item>11000</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>2</item>
<item>32</item>
<item>55</item>
<item>80</item>
<item>120</item>
<item>160</item>
<item>255</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>
[Galaxy S II Themes and Apps] LockeOn:
I am aware of that and I did test it before I was lowering the brightness levels but the question remains - won't it have a negative effect on battery due to increased light sensor activity?
[Galaxy S II Themes and Apps] k1sr:
I don't have a definite answer to that, but the sensor activity would be exactly the same... it has to be sensing the light to know what the light is, it doesn't just decide to sense the light when the light is at a certain level...
[Galaxy S II Themes and Apps] Jility:
I am getting some greenish flair if i use your settings...looks not good...maybe you can adjust your settings a bit
[Galaxy S II Themes and Apps] LockeOn:
That is correct but I am more concerned with the fact that it might be sending information to change brightness level more often that i would normaly do. I didn't check this and I am a little bit busy right now so either someone else will test that or I will later.

It is possible with the lowest level - 5 because as far as I know the lowest default level that can be set manualy is 10. I did not experience anything like that on my end so I am not so sure about it, does anyone else have problems like that? If it helps my latest values are: 5; 30; 60; 120; 235 and I think I am gonna keep that.
[Galaxy S II Themes and Apps] Ozhak:
FYI, I tried using your more aggressive set of values (second set), and it was too dark for me as I have a dark screen protection layer.

Therefore I applied your first set of values and it is good for me.

Thanks for the mod! :)
[Galaxy S II Themes and Apps] orkmaster:
Sorry my english first,

When i was change framework-res.apk brightness settings my email settings lost and my wallpaper changed.Any idea?
[Galaxy S II Themes and Apps] Ozhak:
Yes! My email settings is gone... I have to sign in again to gmail account. Weird.. Is it supposed to do this?

EDIT: Wallpaper did not change though. Is it because we pasted in the edited framework-res.apk that my emails settings is gone?
[Galaxy S II Themes and Apps] prosumerhacks:
someone tested this... :)
[Galaxy S II Themes and Apps] prosumerhacks:
Explaination: more to read...

i've done some reading on setting autobacklight settings and I think threre's more to be explained here...for pple who want to experiment with these settings.. i've quoted few posts from other forums for general reading... so all credits to original posts elsewhere... :rolleyes:

The first array is for the light sensor values, not the "screen brightness" level per se. So this calibrates for screen and button brightness depending on the light level and the type of sensor, as in INPUT. Changing the first value in the first array changes the "light level" at which the first "brightness level" in the second array is used. The second array sets the screen brightness (for OLED and LCD) level as an OUTPUT. The second array MUST have one line more than the first array.

Do add your comments... ;)

thanks for the mod!
[Galaxy S II Themes and Apps] mdalacu:
If I understend this correctly, to have the phone using minimum brightness for higher ambient light we shoud increase the first value in the array, not lowering it. Let's say 50 instead of default 35 , not 5 as suggested. This principle should apply to thr rest of values, the last must have 250, not lower = when the light sensor reads 250 lumens then it should use the maximum brightness not before, in lower ambiental light. Am I right? I am in vacation and I can't test my theory.
[Galaxy S II Themes and Apps] Nebucatnetzer:
What's wrong?

I did everything as mentiond in the how to post here but after I pushed the framework-res.apk back to the phone and reboot it stucks at the triangle.

Does anyone know what I'm doing wrong?

I attached the log so maybe you can see something in there.

Edit:

The zipalign happens really fast and without any feedback is this normal?

And I forgot the logfile but now it's here.
[Galaxy S II Themes and Apps] LockeOn:
I already explained this in this post.

Nope You got it wrong, and that is why I hate when somebody writes some explanations that they do not fully understand. There is a whole other block of array values that I already desribed in this post. The values I described it the first post are only modifying SCREEN BRIGHTNESS VALUES. Please stop confusing people with a whole new theories based on nothing.

You are using heavily modified framework-res.apk and there seems to be a lot of additional .pngs that are not described in framework resources therefore when You try to decompile and later compile this framework-res.apk You will break it even if won't modify anything.
[Galaxy S II Themes and Apps] Nebucatnetzer:
Cheers mate. Do you know maybe an option how it could work?

I'm searching now for hours but couldn't find anything useful. Would be really cool if you could give me a little hint in the right direction.
[Galaxy S II Themes and Apps] prosumerhacks:
If you can compile your framework file with no error, replace the file in system\app...reboot to recovery then clear dalvik cache, fix permissions and reboot... Clearing dalvik is important...
[Galaxy S II Themes and Apps] crypticc:
while you're there enable SIP via wifi using this mod...

http://xdaforums.com/showthread.php?t=1109962

The only additional step is to Edit the xml file "res\values\bools.xml" and change the parameter for "config_sip_wifi_only" from “true” to “false”

Note, this is also more explicit in rezipping the new zip using no compression for those that asked about why their modded frameworks didn't boot. However, I didn't and it worked.

Here is my modded framework incase anyone has my setup. (XXKH3+XEUKD1 from Intratech thread, Ninphetamine 2.1.3)

Values are more conservative, but look okay to me:

25

45

85

145

250

See .xls for reason I picked those values. Cust1 is from OP, Cust2 is mine.

Regards

Chris
[Galaxy S II Themes and Apps] ehmi:
Do you have the framework from lightning rom, because i also have errors while compile apk.

attached framework from lightning 6.1
[Galaxy S II Themes and Apps] orkmaster:
same here!
[Galaxy S II Themes and Apps] bgx:
ERROR: Failure processing PNG image C:\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\quickcontact_badge_pressed.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\quickcontact_badge_small_pressed.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\quickcontact_badge_small_unpressed.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\apk_manager_4.9\other\..\projects\framework-res.apk\res\drawable-hdpi\quickcontact_badge_unpressed.9.png

Delete these files and recompile again!
[Galaxy S II Themes and Apps] orkmaster:
Ok at the moment.
[Galaxy S II Themes and Apps] ehmi:
Thanks thanks thanks, no errors anymore and screen settings work great!!!!!!

g ehmi
[Galaxy S II Themes and Apps] zabihjan:
Is this gonna work with insanity Rom
[Galaxy S II Themes and Apps] Nebucatnetzer:
I'm using Villain Rom. I think it's because of the themes.
[Galaxy S II Themes and Apps] L0cutus:
lot of errors also for leomar75 2.6 rom :-(
[Galaxy S II Themes and Apps] eybee1970:
don't care about the errors - recompile and build apk anyway...it will work ;)
[Galaxy S II Themes and Apps] jayerfernandes:
Is it not possible to adjust the framework using the cm7 framework as a bit of a guide? They anyways have 3 columns, once for the sensor input thresholds, one for the user defined screen brightness levels as per sensor values and one for key brightness, though i could never figure out the last one. Theres also the option to increase the no of steps for a smoother transition.
[Galaxy S II Themes and Apps] orkmaster:
Do you have attempted to Stock rom?
[Galaxy S II Themes and Apps] adit17:
is it normal when my new framework-res.apk size is smaller than original? it's about 6,92 Mb (new) than 9,96Mb (original) ??
[Galaxy S II Themes and Apps] prosumerhacks:
its fine...
[Galaxy S II Themes and Apps] adit17:
ok, i'll try it now...

thanks for your reply
[Galaxy S II Themes and Apps] crypticc:
framework-res.apk modded for values above, and 3g SIP for Intratech's PDA: XWKH4| Modem/phone: XXKH3| CSC: XEUKD1 from this thread....

http://xdaforums.com/showthread.php?t=1075278

cheers all
[Galaxy S II Themes and Apps] AndroidGX:
Working nicely on the framework-res.apk file of my HTC GreenCircle JKay theme (Kitchen deodexed). Thanks LockeOn ! great tutorial.
[Galaxy S II Themes and Apps] didopidobg:
The best MOD I`ve ever used! Now I get like double battery life :) Thanks to the OP.
[Galaxy S II Themes and Apps] adit17:
could you share your value? :)
[Galaxy S II Themes and Apps] crypticc:
KI3 Mod

KI3 framework modified with...

<integer-array name="config_autoBrightnessLcdBacklightValues">

<item>16</item>

<item>45</item>

<item>85</item>

<item>145</item>

<item>250</item>

</integer-array>
[Galaxy S II Themes and Apps] Firefighter-88:
help please...

I had no problem editing my framework.apk before, but now suddenly i get an error when i want to compile the apk, but then it continues to y/n, y/n, delete the file and press any.... and so on, but when i replace the framwork.apk in system/framework and reboot i get stock at boot screen an have to do a recovery!!!

So i ask, if someone would please try and see if they can edit it to these values without the error, and then post it here for me to download? :)

thanks in advance....

<integer-array name="config_autoBrightnessLevels">

<item>15</item>

<item>150</item>

<item>1500</item>

<item>5000</item>

<item>10000</item>

<item>15000</item>

</integer-array>

<integer-array name="config_autoBrightnessLcdBacklightValues">

<item>2</item>

<item>2</item>

<item>25</item>

<item>50</item>

<item>80</item>

<item>120</item>

<item>255</item>

</integer-array>

<integer-array
[Galaxy S II Themes and Apps] oliverlim:
Can someone help me understand step 2 of this instruction?

"place it in the "place-apk-here-for-modding" folder"

I do not see this folder anywhere, so I just create it and place the copied file over here? How then do I get the batch file so that I can run it? Sorry. Rather new and read through the whole 10 pages and still do no understand the instructions totally. For some reason, I need to increase the low light levels. Its too dim on low light but I can probably decrease the high levels downwards though.
[Galaxy S II Themes and Apps] black-snowflake:
great!``thanks
[Galaxy S II Themes and Apps] wltklah:
Need help here...I run a KI3 ROM for Taiwan/HK region. The framework-res.apk is named twframework-res.apk instead. So anyway I decompile it and I got an error. The error report as follow:

=======

java version "1.7.0"

Java(TM) SE Runtime Environment (build 1.7.0-b147)

Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

not found C:\android-sdk\platform-tools\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk

not found C:\android-sdk\platform-tools\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk

I: Loading resource table...

I: Decoding resources...

I: Loading resource table from file: C:\Users\wltklah\apktool\framework\1.apk

W: Could not decode attr value, using undecoded value instead: ns=android, name=text, value=0x01040446

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01040446

at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)

at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)

at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)

at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)

at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)

at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)

at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)

at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)

at brut.androlib.res.AndrolibResources.decode(Unknown Source)

at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)

at brut.androlib.ApkDecoder.decode(Unknown Source)

at brut.apktool.Main.cmdDecode(Unknown Source)

at brut.apktool.Main.main(Unknown Source)

=============

I did put the twframework-res.apk file into to "put apk here for modding" file..

After decompile with the error message, I still found some files under the project folder, but there is no array.xml

What should I do to fix the decompile error??

Thanks for the help
[Galaxy S II Themes and Apps] shrooms90:
u get that error coz ur trying to decompile the touchwiz framework, witch i guess depends on framework-res.apk. so u got the wrong file theres gotta be a file named framework-res.apk in ur /system/framework folder
[Galaxy S II Themes and Apps] wltklah:
Thanks for your reply. I looked again in my /system/framework folder. I couldn't find framework-res.apk. The closest is twframework-res.apk. I checked and double checked. Couldn't find framework-res.apk without the tw infront.

I use droid explorer on my computer to copy the file to my PC though..should I use something else? Maybe the file is hidden??

Thanks alot for your help
[Galaxy S II Themes and Apps] vandanh15:
someone help me with.

I use Androidmeda-HyperDroid-rom v1.1.1

not find framework-res.apk \ res \ values ​​\ arrays.xml

to adjust the values ​​on which