New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
arcatarc
Old
(Last edited by arcatarc; 26th February 2013 at 11:57 AM.) Reason: Update
#1  
arcatarc's Avatar
Senior Member - OP
Thanks Meter 1439
Posts: 1,221
Join Date: Jun 2007
Location: Anguillara Sabazia (ROMA)

 
DONATE TO ME
Default (Need Root)Enable Automatic Light Sensor on Xperia Ray

I've found the way to enable ALS on Ray:
Using root explorer Change this value in hw_config.sh(inside system/etc):
# LMU AS3676 Configuration
dev=/sys/devices/i2c-0/0-0040/leds/
echo 0,0,0,0 > $dev/lcd-backlight/als/params #[gain],[filter_up],[filter_down],[offset]
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
echo 12900 > $dev/torch/max_current
To
# LMU AS3676 Configuration
dev=/sys/devices/i2c-0/0-0040/leds/
echo 3,2,2,0 > $dev/lcd-backlight/als/params #[gain],[filter_up],[filter_down],[offset]
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
echo 12900 > $dev/torch/max_current

Optional:replace als_curve.ini with the one i provide(is from arc):for me is better.
UPDATE:I've deleted the "als_curve.inf" from phone and changed
echo 3,2,2,0 > $dev/lcd-backlight/als/params #[gain],[filter_up],[filter_down],[offset]
to
echo 1,1,1,0 > $dev/lcd-backlight/als/params #[gain],[filter_up],[filter_down],[offset]

now backlight seem more"wide range".

UPDATE: New CWM version added(InstallazioneALS_Xperia_Ray.zip):flash via recovery.

UPDATE:In official ics 4.0.4 i found the best way is to delete als_curve.inf (after change echo 1,1,1,0 )

UPDATE 08/November: for a fast response (istantaneous dim change) flash (Fast Response)InstallazioneALS_Xperia_Ray.zip

If you like my work make a donation(51% will be donate to UNICEF):
EVERY DAY CHILDREN DIE NEEDLESSY!!!
https://www.paypal.com/cgi-bin/websc...=Q94WGHC4F2DH2
The Following 58 Users Say Thank You to arcatarc For This Useful Post: [ Click to Expand ]
 
memazy
Old
(Last edited by memazy; 5th December 2011 at 11:51 AM.)
#2  
memazy's Avatar
Senior Member
Thanks Meter 19
Posts: 161
Join Date: Nov 2010
Location: Пловдив
where to find hw_config.sh in my system folder?

i found it, but...how to test?
Sony Xperia S White| 4.0.4
 
arcatarc
Old
#3  
arcatarc's Avatar
Senior Member - OP
Thanks Meter 1439
Posts: 1,221
Join Date: Jun 2007
Location: Anguillara Sabazia (ROMA)

 
DONATE TO ME
Quote:
Originally Posted by memazy View Post
where to find hw_config.sh in my system folder?

i found it, but...how to test?
You'll see the screen became more brigth when the ambient light rise,and viceversa..
 
aragog53
Old
#4  
Member
Thanks Meter 24
Posts: 76
Join Date: Apr 2011
Quote:
Originally Posted by memazy View Post
where to find hw_config.sh in my system folder?

i found it, but...how to test?
Both of the files, hw_config.sh and als_curve.conf, are in /system/etc.

Sent from my ST18i using Tapatalk
 
coolkaas
Old
(Last edited by coolkaas; 5th December 2011 at 06:24 PM.)
#5  
Senior Member
Thanks Meter 87
Posts: 150
Join Date: Nov 2010
Quote:
Originally Posted by arcatarc View Post
[LEFT]I've found the way to enable ALS on Ray.
works! thanks.

Auto-bright stay more sensitive than before.

note: if you replace original als_curve.conf don't forget to set right permissions! rw-r-r. See it at original file before replacing.
 
zstoichev
Old
(Last edited by zstoichev; 6th December 2011 at 11:01 AM.) Reason: added info about service menu
#6  
zstoichev's Avatar
Member
Thanks Meter 58
Posts: 34
Join Date: Apr 2011
Location: Sofia
Not working for me. Changed it to 3,2,2,0, rebooted and yet no avail.

Edit: !! One can check that light sensor is working fine through service menu (call *#*#7378423#*#*) -> Service tests -> Ambient light sensor. It shows the sensor output and one can play covering the sensor to see as value changes. So, the Ray has a working sensor after all, but it is not used?
 
coolkaas
Old
#7  
Senior Member
Thanks Meter 87
Posts: 150
Join Date: Nov 2010
Quote:
Originally Posted by zstoichev View Post
So, the Ray has a working sensor after all, but it is not used?
sensor works. auto-brightness works. but slightly. you can take a torch and to light on a sensor, having covered the screen with a hand. screen will change brightness.
 
zstoichev
Old
#8  
zstoichev's Avatar
Member
Thanks Meter 58
Posts: 34
Join Date: Apr 2011
Location: Sofia
yeah, I saw it "working"... with a step or two at most. I am really disappointed by how SE implemented this. Even the brightness manual slider seams to have 15-16 steps, i.e. it's not smooth. I had a HTC Hero and auto-brightness/slider were flawless.
The Following User Says Thank You to zstoichev For This Useful Post: [ Click to Expand ]
 
illus4
Old
#9  
Junior Member
Thanks Meter 64
Posts: 28
Join Date: Aug 2009
It works. Good job~
 
dzqlx1993
Old
#10  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Jul 2010
good job thanks!!!