[NEED] LED Changer

P

__PG__

Guest
#!/system/bin/sh
# [email protected]

Code:
ledsdir="/sys/devices/soc/78b6000.i2c/i2c-2/2-0045/leds"
echo testing solid led colors : blue cyan green purple red yellow white
for leds in blue cyan green purple red yellow white
do
        echo led color : $leds on
        echo 255 > $ledsdir/$leds/brightness
        sleep 3
        echo led color : $leds off
        echo 0 > $ledsdir/$leds/brightness
        sleep 1
done

echo testing solid led colors : cyan purple yellow white
for leds in cyan purple yellow white
do
        echo led color : $leds on
        echo 255 > $ledsdir/$leds/brightness
        sleep 3
        echo led color : $leds off
        echo 0 > $ledsdir/$leds/brightness
        sleep 1
done

echo testing blinking led colors combination
for leds in cyan yellow purple cyan purple yellow cyan
do
        echo led blink : $leds
        echo 255 > $ledsdir/$leds/blink
        sleep 10
done
for leds in cyan purple yellow white
do
        echo 0 > $ledsdir/$leds/blink
done

open android terminal emulator and type these command
Code:
su
sh /sdcard/leds-test

It would be helpful to many people as its not a hardware limitations and I trust XDA _/\_"
 

tweakradje

Senior Member
Mar 18, 2005
1,047
532
133
Android
sites.google.com
The "REAL" solution is coming closer.

http://4pda.ru/forum/index.php?showtopic=841683&st=0#entry64978644

Two lib (Redmi 3S Light Module lights.msm8937.so 32/64bit) files need updating.
But still not all colors.
Dunno where these lib files came from (which ROM) but still not perfect.
The fact that owner need to be system is strange.

Beware that your /etc/init.qcom.post_boot.sh and /etc/device_features/santoni.xml
are overwritten by some zip files from 4pda. Better look into the zip file first.

Cheers
 
Last edited:

Embeeweezer

Member
Feb 24, 2017
40
5
8
This is funny, testing the script does work for the colors cyan, purple, yellow and white.
Not for red, green and blue. They will show up as white!
I'm on LOS14.1.
(edit: it's still better than only 'black or white' ;) )
(edit 2: I also noticed any value higher than 0 will be 'on', so 1 will be just as bright as 90 or 255 and no half brightness for 128)
 
Last edited: