[Module] AX8NoALS v002 | Disabling light sensor
Tired of the lack of possibility to turn off 'automatic light sensor', I have modified the original driver. The only difference is - I removed code that enables ALS.
Issues:
- sometimes screen wake ups with maximum backlight value and fades to desired value in seconds.
Manual installation:
- push ax8noals.ko to /system/lib/modules
- run the following command
Code:
insmod /system/lib/modules/ax8noals.ko
- set desired brightness.
Until you're sure that it works with your hardware, don't install it to hw_config.sh.
Make sure that module is inserted before lm3530 LMU configuration settings.
Code:
#insert new noALS module
insmod /system/lib/modules/ax8noals.ko
sleep 2
# lm3530 LMU configuration
dev=/sys/devices/platform/i2c-adapter/i2c-0/0-0036
echo als_off > $dev/mode # add this line if system overrides your mode
Release history
v002:
- restored how original modes works:- i2c, pwm, i2c_pwm: modes without als,
- als, pwm_als, i2c_pwm_als, i2_als: modes with als
- added two new modes:
- als_off - disables als in ALS enabled modes,
- auto - enables als in ALS enabled modes.
v001: just recompiled original driver with ALS disabled
Note:
It uses code to remove original driver from
doixanh X8Gesture module.
Disclaimer
I'm not responsible if this module damages your lovely phone. Use it at your own risk!