yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Brotuck:
No just did a compare of the files they are quite different.

You are wrong in this assumption.
[Galaxy S I9000 Android Development] Lukiqq:
Maybe because it's not working? Try stock lib, boot your phone and see what logcat says when automatic brightness is turned on, it detects light power up to 5 lux only, on and on...
[Galaxy S I9000 Android Development] $omator:
yup i was comparing to jvo still why any other changes - those are changes that differs from stock values =) and i assume stock works ok so why to tweak that?

i do not have 'on and on' lux spam detection on stock - my sensor is working perfectly at its full range - again on stock - so why other changes?
[Galaxy S I9000 Android Development] Lukiqq:
Oh, then I'm sorry to hear that I've spend few hours just to fix something what was working fine... ;)
[Galaxy S I9000 Android Development] $omator:
it might be broken on custom kernel like frontfacingcamera compiled out of outdated sources - just tested again sensor reacts on light as it should - so most probably cfroot aint breaking it - it might be an issue on custom kernels - 2.3.4 source aint released =) same story bro

but still question remains - why any other changes - checked with jvo arrays.xml and powermanagerservice.smali aint same as your proposed so why to change them?
[Galaxy S I9000 Android Development] Brotuck:
The weird thing with the JVP one was that it does sometimes work.

But i encountered several times that it did not or do reverse values or did not change anything at all like it was switched off.

So ill test this version for the next few days and report back.

Thanx again for the modifications Lukiqq :) much appreciated
[Galaxy S I9000 Android Development] TheVisitorX:
Hm I've also tried to replace only sensors.default.so because that other thing does not work with bezke modified framework and indeed it seems to work fine. Before there were no changes in brightness at all but after replace that file there are...
[Galaxy S I9000 Android Development] $omator:
whatuuuuuuuup

i would say use sensors.default.so from JVP and ignore other changes =)
[Galaxy S I9000 Android Development] TheVisitorX:
This one also comes with Bezke ROM and it does not work here, absolutely no changes in brightness (Talon Kernel). But that one from this post does work (for me).
[Galaxy S I9000 Android Development] Lukiqq:
You have no idea what are the changes in arrays in framework-res.apk, don't you? If so, look @android.com.pl in the same topic, I've explained it pretty understandable :)
[Galaxy S I9000 Android Development] $omator:
- arrays values are same in every gb i checked - how is that fixing if those are the same in every version? -and ab worked in previous versions...

- also keep in mind what is the suggestion in code related to those values i quoted -> http://xdaforums.com/showpost.php?p=14872595&postcount=14

- what is the purpouse of services tweaks and how is that related to fixing as those values also are same in every gb =) why change something that was working in previous releases in the first place?

- also what is the desired by you effect of services tweaks - you must have some plan in changing those?
[Galaxy S I9000 Android Development] Lukiqq:
Arrays in framework-res.apk were modified by me to be more accurate. Values are different than stock.

AUTOBRIGHTNESS_ANIM_STEPS and ANIM_STEPS should affect more accurate and fluid transition between different light steps but only when we add more steps in arrays.xml which is also not that easy because we need to change array lenght also in PowerManagerService.smali.

LIGHT_SENSOR_DELAY change from 2s to 1s afffects response speed of light sensor, but only when we allow to do so in kernel - gp2a.c.

Any other questions you are not sure? If you love all@stock then why you are here?
[Galaxy S I9000 Android Development] $omator:
there you go, finaly =) but i can not agree fully with your explanation

and you missed ALL_BRIGHT ...

but those changes are tweaks not fix

fix is in stock lib not one compiled from some sources, thats all
[Galaxy S I9000 Android Development] Lukiqq:
ALL_BRIGHT was 0xf which means in decimal 15. For me it means moment when all should be white if it is so, then value should be 0xff which means max brightness of 255*

*just a conjecture

Call it whatever you want, if you want to :)
[Galaxy S I9000 Android Development] $omator:
those values are not 'broken' to start with

-> so no need to 'fix' them

you can tweak them but i dubt that your assumptions are fully correct

therefore 'the tweeks' are just an addon to fix itself that is returning to stock lib

but i can not understand why you do promote an outdated one ;)
[Galaxy S I9000 Android Development] Lukiqq:
Maybe you are programmer or something, I'm definitely not, I have completely different profession, if you said so, then ok, let it be, you can always create your ow topic and name things whatever you want, but I'm not sure if you have something to show us. EOT.
[Galaxy S I9000 Android Development] $omator:
a lecture for my polish friend

mate by the last 3 pages you are ignoring those two basis

i see that you want good - and yes you discovered that custom kernels are replacing sensors.default.so with one compiled out of last aviable sources provided by samsung - that in result is breaking sensor readings apparently - same story as with front facing camera -> old sources made ffc picture twisted 90 degrees - and same as back then switching back to stock camera libs was fixing it - stock ones not old ones =)
[Galaxy S I9000 Android Development] castaway1:
Lukiqq great work.I tested this and it works for two steps of brightness low / high Is it possible add more then this two steps?if i run logcat there is

D/PowerManagerService( 320): onSensorChanged: light value: 5000

high brightness

or

D/PowerManagerService( 320): onSensorChanged: light value: 6

low brightness

Im testing this with gradually increasing intensity of light and screen had only low brightness or high brightness nothing between. Using DarkCore 2.7.3_JVP kernel.

Good job!Thanks for this.
[Galaxy S I9000 Android Development] Lukiqq:
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
I/StatusBarPolicy( 664): onSignalStrengthsChanged
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
D/PowerManagerService( 579): onSensorChanged: light value: 1000
[Galaxy S I9000 Android Development] $omator:
i think your log shows what to expect with custom kernels and such =)

and those are inside values registered... i think it got one step more at least

still you can not/do not want to anserw why change stock values that worked for all previous firmwares =)
[Galaxy S I9000 Android Development] .:Crack:.:
I did test your JVP version and the one from OP.

OP worked and yours didn't?
[Galaxy S I9000 Android Development] Lukiqq:
Ok, I think we finally have perfect solution, upload in few minutes.
[Galaxy S I9000 Android Development] $omator:
lecture #2

1) if youre using any custom kernel flash it first

2) flash your theme afterwards or copy over framework-res.apk from it if you used framework from op

3) then flash one of attached files

*)flashing any custom kernel afterwards (after step 3) will most probably break your sensors again

**)i do not use any custom kernels so i do not know if such features like BLN will still work after flashing this - if kernel makes changes in services.* you will need customized services.* but i will not do it =)

should work on cwm2 and cwm3
[Galaxy S I9000 Android Development] Lukiqq:
Ok, download sensors.default from here, change values in your framework-res.apk to:

<integer-array name="config_autoBrightnessLevels">
<item>30</item>
<item>300</item>
<item>600</item>
<item>1500</item>
<item>1500</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>80</item>
<item>150</item>
<item>200</item>
<item>255</item>
</integer-array>

AND BE HAPPY WITH ALL FOUR STEPS WORKING! :)
[Galaxy S I9000 Android Development] .:Crack:.:
so in <integer-array name="config_autoBrightnessLcdBacklightValues">

we have to edit 4 lines + delete one line?
[Galaxy S I9000 Android Development] Lukiqq:
Yes, just like I've posted.
[Galaxy S I9000 Android Development] $omator:
yes and ignore code comments =)

i am outta here, trying to help here is a time waste i guess
[Galaxy S I9000 Android Development] Lukiqq:
This one was useful, thank you.
[Galaxy S I9000 Android Development] flypubec:
The fact is that all latest recompiled kernels are based on JVH sources (latest samsung published sources), therefore using the custom kernel (except CF-Root or EXT4+hacks which are repacked JVP) will break the light sensor.

Yes, with JVP the light sensors works better, but far from perfect or even OK, so going back to old version currently gives us far better results.

In addition sensors lib in JVP kernel is obviously still in experimental stage, since it will flood your logcat and eat your battery. In another words, DON'T use sensors lib from JVP.

So the trick here is to use the sensors.default.so from JVH ROM and play with the values to adjust it to your needs.

As the previous poster already discovered the sensor will report only two values:

6 and 5000

Those are matched with the config_autoBrightnessLevels in arrays.xml

and will set the display to accordingly specified value in config_autoBrightnessLcdBacklightValues

So for example in my prefered settings, only the bold values are relevant

<integer-array name="config_autoBrightnessLevels">
<item>100</item>
<item>1000</item>
<item>5000</item>
<item>10000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
[B]<item>7</item> [/B]
<item>35</item>
<item>90</item>
[B]<item>155</item>[/B]
<item>250</item>
</integer-array>

@Lukiqq: Your settings all seem too high for me. I like the display on a very low level at low light, especially at complete dark in my bed. So everything more than 20 is too high for me for LOW level.
[Galaxy S I9000 Android Development] $omator:
long story short stock sensor is not flooding - 2.3.4 one provided with 'fisceto release' changes is as he reported in first tweets about

they/he must have made soem changes before releasing it or have diff/faulty files

ive got files straight from samfirmware and my sensor is working as it should
[Galaxy S I9000 Android Development] Lukiqq:
Free will :) I just pointed ppl to the place where all can be set. My last post with different sensors file (taken from CM7, thanks CyanogenMOD team!) is better than original JVH one, because now light sensor is working more "gently" and uses all of defined levels, depends of light condidions. Max light condition recognized by recently attached sensors is 1280 (not 5000 as it was with JHV).
[Galaxy S I9000 Android Development] flypubec:
Oh, all 4 stps ? That's great!

So with sensor lib from CM7 we should also use stock services.jar ?
[Galaxy S I9000 Android Development] Lukiqq:
You can use stock services.jar, or modded one for BLN support :)
[Galaxy S I9000 Android Development] .:Crack:.:
Will it work without editing the framework-res.apk?

so just with CM7 .so?
[Galaxy S I9000 Android Development] Lukiqq:
No, definitelly no, because new sensor file gets max light at 1280lux, instead of 5000lux @stock.
[Galaxy S I9000 Android Development] .:Crack:.:
but jvh one works..

I'll stay with that until simone updates this framework.

I'm always getting bootloops when editing it by myself.
[Galaxy S I9000 Android Development] Lukiqq:
Read carefully manual at the first page, there's nothing you can do wrong :) JHV method is working fine, but only with two levels.
[Galaxy S I9000 Android Development] $omator:
mate, i will post this again as youve missed it i guess

stock jvp sensor readings - inside(HOME) values - i think it reports also 15000 but i was to far from light source to test it =) but i am positive i saw 15000

also your cm7 lib reports max

10-160-320-640-1280-2600-10240
[Galaxy S I9000 Android Development] $omator:
so if you take lib from cm take values also - i think those guys knows better how to set those then you
[Galaxy S I9000 Android Development] Lukiqq:
I'm not saying you are wrong, but I've tried to use phone in pretty good light condition (day, directly at the sunlight) and got only 1280, so I think it is hard to get last two values in normal usage. Also keep in mind that light temperature is important too.
[Galaxy S I9000 Android Development] $omator:
there you go - under bright home lamp =)

sorry mate but if you say a say b also

you use cm7 lib- use values that guys used with them (if any)

i also might be missing few values from cm7 but who cares =)

just sidenote: if you want to help people DO IT AS IT SHOULD BE DONE
[Galaxy S I9000 Android Development] Lukiqq:
<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>35</item>
<item>55</item>
<item>70</item>
<item>70</item>
<item>250</item>
</integer-array>

These are original CM7 values, what do you think about them master? I know pretty well what to do, just stay with your stock Galaxy S and be happy. Do not meddle in the affairs of ppl who want something more than solid stock.
[Galaxy S I9000 Android Development] flypubec:
I just doublechecked and extracted the lightsensor.default.so from the ROM downloaded from samfirmware (tar file name = CODE_I9000XXJVP_CL264642_REV03_user_low_ship.tar.MD5) and it's exactly the same as the one flooding my logcat

So I guess you are wrong here =)
[Galaxy S I9000 Android Development] $omator:
well those values fits better the cm7lib than yours

you have to restart phone + fix permissions in cwm mate
[Galaxy S I9000 Android Development] Lukiqq:
You don't need to restart phone etc. just to compare files in hexeditor :D
[Galaxy S I9000 Android Development] $omator:
if you want new libs to be loaded you need restart phone - concentrate mate
[Galaxy S I9000 Android Development] Lukiqq:
Show me the moment where he has asked you about that?

btw. My master, remember about chmods :D
[Galaxy S I9000 Android Development] $omator:
youre annoying use scroll up
[Galaxy S I9000 Android Development] Lukiqq:
Extracted and checked doesn't mean he tried to use it, you know the word "compare"? :D
[Galaxy S I9000 Android Development] flypubec:
+1

@$omator

Again, Files are the same :) No magic by ficeto here.

Stock JVP floods. Just check your logcat.
[Galaxy S I9000 Android Development] $omator:
fact 1) custom kernels lib reports spam in logs - usless for setting brighteness

fact 2) jvp lib is reporting states i listed above not spamming - working well on stock (that means cfroot / noroot)

fact 3) cm7 lib is reporting more states and values from cm framework fits those
[Galaxy S I9000 Android Development] Lukiqq:
Ok, but the problem is that few % of XDA community used to use stock things... The rest is looking for the custom. So if some of custom things doesn't work, then we look forward to fix them. Nothing more, nothing less.
[Galaxy S I9000 Android Development] castaway1:
ok Lukiqq its a lot better now with new settings i saw 3 steps.Still not enought for me but better.

http://xdaforums.com/showpost.php?p=14906879&postcount=47

BTW if i make really high light on sensor(using LED light) buttons on phone light up :D
[Galaxy S I9000 Android Development] Bo$s:
Here's the installation package for STOCK ODEXED JVP:

JVP_brightness_fix-CWM3.zip (6.24 MB)

PS: I've used my framework-res.apk with CRT screen off and PNG's opt so animation is also included in package. Please don't complain if you don't like it ;)

PS2: It won't work on deodexed ROM's.
[Galaxy S I9000 Android Development] miztahbeezy:
I've installed $omator's fix, but it does not seem to work, brightness only adjusts after locking and unlocking the screen. (Speedmod T10)
[Galaxy S I9000 Android Development] yoohoo:
We need to compare apple with apple. There are 2 distinctive situations here:

1. JVP with stock kernel (or more specific non-recompiled kernel)

In this situation auto-brughtness is OK. No further actiion required.

(But for me it is only semi-ok because the light sensor only yields 2 readings, 6 and 5000)

2. JVP with recompiled kernel

Until an updated light sensor lib is released, a recompiled kernel will NOT work properly with the stock sensors.default.so. A replacement of the latest sensors.default.so by the author of this thread fixed the problem.
[Galaxy S I9000 Android Development] miztahbeezy:
After a bit if testing, I can conclude that with Bo$s' cwm zip something definately seems to work, so I think this'll work on the long term.

So, Bo$s, if you are reading this, could you please create a version which has the cm7 battery icons that show the 1% increments? I tried changing the pngs, but it does not show the battery level that way. For example, it shows 100% instead of 97. Thanks
[Galaxy S I9000 Android Development] Bo$s:
Use http://uot.dakra.lt/ to add % battery.
[Galaxy S I9000 Android Development] miztahbeezy:
Thanks for everything
[Galaxy S I9000 Android Development] Brotuck:
Latest fixes work great !

send from another galaxy !
[Galaxy S I9000 Android Development] habylab:
Could we have one for deodexed roms please?

Sent from my ever changing Galaxy S
[Galaxy S I9000 Android Development] triplex76:
hey Lukyqq could you tell me why using only this framework everything works as it should even if it got no mod inside?

I really tried to look at the differences between this one and other posted that doesn't work but I see no differences...but this work great and that's a fact...i'm confused!

I think the problem is not in array.xml
[Galaxy S I9000 Android Development] Hrithan2020:
Maybe, it is the sensors.so , which really makes the difference.
[Galaxy S I9000 Android Development] triplex76:
nope, cause it doesn't work with only sensor file ...
[Galaxy S I9000 Android Development] $omator:
bazinga it does ;]
[Galaxy S I9000 Android Development] triplex76:
no...it doesn't work with custom kernel and simply sensor file module!

it got only 2 steps of light!

with this framework it works PERFECTLY SMOOTH!
[Galaxy S I9000 Android Development] $omator:
yes it does -> http://xdaforums.com/showthread.php?p=15163932
[Galaxy S I9000 Android Development] triplex76:
No... Mine doesn't!!!

Sorry!
[Galaxy S I9000 Android Development] ChmT:
I read this thread and i'm confused what to do. I have Ficeto's JVP Base ROM with Darky kernel. What should I do to fix Auto-brightness?
[Galaxy S I9000 Android Development] $omator:
ask fisceto to fix what he broke =)
[Galaxy S I9000 Android Development] ChmT:
It's broken on stock rom also as reported by many people so it isn't his fault. And other custom kernels has same problem.
[Galaxy S I9000 Android Development] $omator:
bull**** allert!

stock FIRMWARE got no issies with brighteness - not a single version
[Galaxy S I9000 Android Development] ChmT:
So the problem is kernel related? Ok. Is there some easy way to fix this without replacing kernel?
[Galaxy S I9000 Android Development] $omator:
its a custom kernel related problem - kernels that are compiled out of 2.3.3 sources as 2.3.4 sources are not public all of them made out of 2.3.3 break the sensor readings locking it at one state or so

you can use so file from 2.3.3 that should work in 3 to 5 states (some report 3 states some 5) thats less invasive

z device test is the tool to test how is it working

and this thread aint the best about the problem lukiqq got disctracted by his not finished kernel and stated few absurds here =) use search to find proper thread
[Galaxy S I9000 Android Development] ChmT:
With z test I get 5 lux, 1000 and 5000. So it recognizes 3 levels but brightnes doesn't change.
[Galaxy S I9000 Android Development] $omator:
turn autobrighteness on - some mods editing susyemui - notification bar breaks it so you can set it but when you leave the options it reverts back to normal options - should work idk i will not dlash breaking stuff kernels just to test something =)
[Galaxy S I9000 Android Development] ChmT:
So I can just replace sensors.default.so, using root explorer, with the one from 2.3.3 rom?
[Galaxy S I9000 Android Development] $omator:
and then fix permisions in cwm advanced
[Galaxy S I9000 Android Development] ChmT:
Thanks. Did the fix permission and it works.

Someone know how to change Phone.apk to disable ascending ringtone or where to find already modified JVP Phone.apk?
[Galaxy S I9000 Android Development] gsw5700:
there is a post in the general section saying this thread has been closed, WTF

whoops, wrong thread, sorry

Sent using geek power
[Galaxy S I9000 Android Development] Mangus_U*RA:
mmm...i'm a bit confused...

The first post is a bit frightening for me...

I use a jvq based deodexed rom...with speedmod t23 no problems with brightness control..

but speedmod have other problems, so I tried galaxian, a very nice kernel...

the auto-brightness is working but the min brightness is clearly too low, barely readable ...

I don't understand what should I do to fix it...

Should I only substitute the .so file?

But why if with other kernels it was working fine?
[Galaxy S I9000 Android Development] guika:
Bezke 4.1 Rom + Darck Core 2.9.3 auto brightness level fix

Hi all,

I had a Bezke 4.1 Rom JVP with Dark Core 2.9.3 kernel

With this combo I don ' t have the phone.apk bug but I had the brightness bug.

So my solution was to decomplie the sensors.default.so from Darky 10.2 Rom

Put into Bezke Rom, + Fix Permession and I had 4 levels of brightness.

So here it is the file.
[Galaxy S I9000 Android Development] Empereur78:
Thanks for explanation in the 1st post, but i realized all steps but it doesn't work for my JVR deodex with CF-Root. It seems the sensor doesn't not refresh the brightness value ( tested with GPS status ).

- Has someone fixed successfully the brightness bug with JVR Rom ?

- Do you know an other app to test the brightness sensor ?

thanks
[Galaxy S I9000 Android Development] $omator:
there is no autobrighteness bug with stock jvr

there is no autobrighteness bug with cfroot'ed jvr

there

should be no

autobrighteness bug with custom kernel for jvr

Z-DeviceTest
[Galaxy S I9000 Android Development] Taifuuni89:
Yes there isn't any problem if the sensors.default.so is an original jvr version. Before we got kernels which fixed the problem, rom cooks bypassed this by using modified system files. Now those roms with modified files don't work even when the kernel would make it possible. You have to revert those modified files back to the originals. Could someone upload the original JVR sensors.default.so file here. I know that someone has posted it somewhere but couldn't find the 100% sure original file even with a thorough search.
[Galaxy S I9000 Android Development] tcibo:
Java was not found but i have istalled Java 6 Update 27 Win7 64 bit what to do?
[EVO Shift 4G General] smp420:
I have seen several endorsements for sms backup and restore... but it doesn't support mms (yet). Anyone have suggestions for easily backing/restoring both sms/mms between ROMS. I've been losing pictures I didn't bother to manually download for quite a while and thought I would ask before I flashed the new gingersense. Thanks guys.
[EVO Shift 4G General] rhodiggah:
What I do is long press on the picture text and "save picture" to the sdcard. It will save it under a file called download.
[EVO Shift 4G General] smp420:
Thanks, I do that, but was looking for a way to save them in the context of the thread
[EVO Shift 4G General] rhodiggah:
how about GO SMS, It's pretty capable of doing pretty much everything, Have a go at it...