(Need Root)Enable Automatic Light Sensor on Xperia Ray

Search This thread

arcatarc

Senior Member
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/webscr?cmd=_s-xclick&hosted_button_id=Q94WGHC4F2DH2
 

Attachments

  • als_curve.zip
    301 bytes · Views: 5,168
  • InstallazioneALS_Xperia_Ray.zip
    158.4 KB · Views: 2,545
Last edited:

coolkaas

Senior Member
Nov 14, 2010
169
100
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.​
 
Last edited:

zstoichev

Member
Apr 17, 2011
39
60
Sofia
www.5group.com
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?
 
Last edited:

zstoichev

Member
Apr 17, 2011
39
60
Sofia
www.5group.com
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.
 
  • Like
Reactions: jimtonic01

radek.kaplan

New member
Dec 9, 2011
1
0
Q: how to enable ?

OK, sensor now working ( tested in service menu )

Unfortunately, I do not see the possibility of its use - especially for automatic brightness adjustment desktop. There is no option to set AUTOMATIC BRIGHTNESS. I tried a few widgets and even though I always set AUTO, never worked ...

How do in practice this now-functional sensor to use?

THX
 

efx_d3

Senior Member
Dec 28, 2010
165
44
México
OK, sensor now working ( tested in service menu )

Unfortunately, I do not see the possibility of its use - especially for automatic brightness adjustment desktop. There is no option to set AUTOMATIC BRIGHTNESS. I tried a few widgets and even though I always set AUTO, never worked ...

How do in practice this now-functional sensor to use?

THX

Hi, to work well you must edit the file. sh, and replace with:http://forum.xda-developers.com/attachment.php?attachmentid=805848&d=1323082156 , then, in the state switch, option 2 is what gives the brightness automatically, try putting a lamp and then covering the sensor with your finger and see as changing the brightness automatically, for me it worked great, greetings.

sorry bad English, I use google translator ñ_ñ
 

Bazonga

Senior Member
Oct 9, 2011
117
15
Hi, to work well you must edit the file. sh, and replace with:http://forum.xda-developers.com/attachment.php?attachmentid=805848&d=1323082156 , then, in the state switch, option 2 is what gives the brightness automatically, try putting a lamp and then covering the sensor with your finger and see as changing the brightness automatically, for me it worked great, greetings.

sorry bad English, I use google translator ñ_ñ

I don't understand what you mean with this?
 

efx_d3

Senior Member
Dec 28, 2010
165
44
México
I don't understand what you mean with this?

1.-arcatarc follow steps.
2.- edit file, 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[/LEFT]

IMPORTANT :Optional:replace als_curve.ini with the one i provide(is from arc):for me is better. (with this works best for me also)

link download : http://forum.xda-developers.com/attachment.php?attachmentid=805848&d=1323082156

Both of the files, hw_config.sh and als_curve.conf, are in /system/etc.

to try:

1 .- Use light switch widget.
2 .- Second tap the widget ( i use extended control) is auto brightness.
3 .- Try a flashlight and see how it works the brightness automatically.

I hope it is clear to you, greetings.

I may not understand because I do not speak English, my language is Spanish and use a translator,

xda took months just by using the google translator

sorry for bad writing in English :eek:
 
Last edited:

Bazonga

Senior Member
Oct 9, 2011
117
15
Thanks, but I just don't understand which widget i have to use? What do you mean with "option 2"? I only have the brightness on/off switch and the state switch with airplane mode, gps, bluetooth etc but no brightness??
 
Last edited:

masterflai

Member
Aug 6, 2008
26
4
You're english is fine. :)

---------- Post added at 11:41 PM ---------- Previous post was at 11:38 PM ----------

Thanks, but I just don't understand which widget i have to use? What do you mean with "option 2"? I only have the brightness on/off switch and the state switch with airplane mode, gps, bluetooth etc but no brightness??

I suppose he means, that you can check the functionality by using a freeware widget like Backlight! Launcher: Set the display brightness to "A" (auto) and the sensor would adapt the brightness of your screen depending on your environment.

I checked the sensor in the service menu and it's running, but I didn't see a change when I use a flashlight or my hand.
Does it belong to a special widget?

I have choosen the Backlight on/off widget and changed it to off and on again and I used the named brightness widget.
 
Last edited:

hansip87

Senior Member
Jan 14, 2011
2,915
2,242
Jakarta
I don't see any changes in automatic brightness with this trick and additional widget, even though the ALS did worked from device test. Help?

EDIT: It works now! :D just having a wrong angle before when checking. as long as the Brightness is not set at the lowest then it would work. Thanks!

sent from my little red phone using XDA App :)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 61
    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/webscr?cmd=_s-xclick&hosted_button_id=Q94WGHC4F2DH2
    10
    ALS

    try my app
    not very clean, not fast, not nice, not general
    but can be usefull on some eric phones
    tested on xperia pro, neo - android 2.3
    3
    Hi arcatarc. I'm on JJ 3.2 rom. I searched this thread and you told, that in JJ's rom is ALS enabled by default. When i open hw_config.sh(inside system/etc) it shows, that:
    # 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]

    Also i think its not enabled (it was the same on JJ 3.1). Or JJ enabled it by another way?

    echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
    line is enabling als

    echo 0,0,0,0 ... means that als is most wide range, lowest up response, lowest down response, and has no offset...
    first 3 values you can change from 0-7, the last one I don't know
    1
    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.
    1
    Should i do update from sd card or
    wipe dalvik cache,factory reset,wipe cache and then install from sd card???:confused::confused::confused:

    ---------- Post added at 10:56 AM ---------- Previous post was at 10:53 AM ----------

    Should i do update from sd card or
    wipe dalvik cache,factory reset,wipe cache and then install from sd card???

    Only flash zip from cwm...