(Need Root)Enable Automatic Light Sensor on Xperia Ray

hansip87

Senior Member
Jan 14, 2011
2,915
2,242
0
Jakarta
What? I had to try it to be sure. Anyway, I have no proof that it really does nothing (I said "I'm pretty sure"), I could be wrong.

Maybe now it's more sensitive? I don't know since I haven't tested it extensively before. All I'm sure of is that the sensor already worked in the service menu, and that the screen brightness changed slightly even before the mod. Also, the light sensor still doesn't show up in test programs such as Z Device Test.

That's why I'm skeptical about this mod.
The sensor works, but no effect to the screen. That's what this mod fixes.
 

C_Karhu

Senior Member
Jan 28, 2012
349
80
0
Hi!
I modified my hw_config.sh and replaced my als_curve.ini with the provided. My sensor works great now, but since it's possible to modify one never get's satisfied! :p
So I'd like to know what to change to make the display less bright in dark conditions, and what to change to make it 100% bright in daylight.
And last, the stock backlight widget, does it respond to theese changes in the files or is it "pre-config."?

Great job btw with the hack!
 

hansip87

Senior Member
Jan 14, 2011
2,915
2,242
0
Jakarta
Hi!
I modified my hw_config.sh and replaced my als_curve.ini with the provided. My sensor works great now, but since it's possible to modify one never get's satisfied! :p
So I'd like to know what to change to make the display less bright in dark conditions, and what to change to make it 100% bright in daylight.
And last, the stock backlight widget, does it respond to theese changes in the files or is it "pre-config."?

Great job btw with the hack!
Try to play with gain in the parameter value, the first digit one. If you want it more sensitive, reduce the next two parameter.

Sent from my ST18i using XDA App
 

mope

Member
Jan 25, 2006
35
0
0
Hi All!

I made the changes, but nothing happened. I checked the light sensor in the Service menu and it says:
Ambient Light Sensor
Value:0
No changes in the value whatever I do...

any ideas?
 

slicksteiner

New member
Mar 25, 2012
3
0
0
Is als_curve.ini the same as als_curve.conf? followed the steps, removed the als_curve.conf then change the settings to 1,1,1,0 in the hw_config.sh.. it works! thank you! tested it by putting the phone near a light source such as lamp, or light bulbs and watched the screen go brighter and then removing it shows the screen go back.. and with the settings, the transition is almost unnoticeable
 

Xperia-Ray

Senior Member
Jan 16, 2012
349
337
0
Have you chaecked the following file? pre_hw_config.sh

can u check the arc file to see the defferences?

# LMU AS3676 Configuration before chargemon
dev=/sys/devices/i2c-0/0-0040/leds/
echo 0 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
echo 20000 > $dev/lcd-backlight/max_current
echo 2400 > $dev/red/max_current
echo 4200 > $dev/green/max_current
echo 3000 > $dev/blue/max_current
 
Last edited: