[Sprint Samsung Galaxy Note II] sw99:
Way back in my EVO OG days, someone had discovered how to directly access the LEDs, and I had put together some Tasker scripts to put them to good use. I know that there are apps like LightFlow that allow you to do a bunch of stuff to the LEDs, but I found them very cumbersome to use, and there were all kinds of settings that don't work on the Note 2. There was no easy way to know what settings to choose and what were appropriate for the Note 2. Also, Light Flow only works when the display is off, and interferes with the Phones own notification system. This mod works whether the display is on or off (if you want) and is independent of the built in charging notifications.

Also, it's way more awesome to learn to do stuff yourself!

I've used Tasker for years, and although it takes some getting used to, it does a great job at executing tasks based on events.

--------------------------------------------------------------------------------------

Anyway, here's what you can do using Terminal Emulator (which can then be scripted in Tasker). YOU WILL NEED ROOT ACCESS.

Background

1. There are 3 LEDs used for notifications, leg_r (red), led_g (green) led_b (blue).

2. Each LED can be set to a specific brightness from 0 to 255 (where 0 is off and 255 is full brightness), by writing to the "brightness" file.

3. Each LED can be set to blink by writing a value of 0 (off) or 1 (on) to the "blink" file.

4. You can set the time the LED illuminates and the time it is dark when blinking by writing to the "delay_on" and "delay_off" files (values are in milliseconds).

5. These files are located in /sys/class/leds

It appears that "blink" must be executed again after changing the delay for it to have an effect, and turning the LED off requires you to revert the last change - if you set brightness and then blink, you must set blink to 0 to turn it off. If you turned it on with brightness last, then you must set brightness to 0 to turn off. (still investigating this part).​

All you need to do is enter the following commands:

echo 500 > /sys/ckass/leds/led_b/delay_on <- sets the ON time to 1/2 second

echo 500 > /sys/ckass/leds/led_b/delay_off <- sets the OFF time to 1/2 second

echo 128 > /sys/ckass/leds/led_b/brightness <- sets LED brightness (blue) to about 1/2 of max (note that this turns on the steady LED)

echo 1 > /sys/ckass/leds/led_b/blink <- Blinks the Blue LED at the above intervals​

Now in Tasker you can:

a. Create a profile for the "Missed Call" State (or event).

b. Add a Task and in that task add 4 "Scripts" of type "Shell" for each of the above.

c. Make sure you check "Use Root" for each script

I've done this to have my phone flash red for missed calls, blue for missed texts and green for missed calendar events (each as its own Tasker profile)

You need to create one (or two) additional profiles to disable the flashing. All it needs is the following 3 commands to turn all the LEDs off.

echo 0 > /sys/ckass/leds/led_b/blink

echo 0 > /sys/ckass/leds/led_r/blink

echo 0 > /sys/ckass/leds/led_g/blink​

I set one for the "Screen Unlock" event and one for the "Notification Bar". This way, the flashing stops in intuitive ways.

There's way more stuff you can do and trigger alerts on using Tasker.

You can also access the 2 Flashes and 2 Task Lights on the back of the phone (although I suspect it is really just two LEDs that run in 2 different modes). They are located at:

/sys/class/leds/leds-sec1

/sys/class/leds/leds-sec2

/sys/class/leds/torch-sec1

/sys/class/leds/torch-sec2

These only have a brightness setting to turn them on, and are limited to what ever value is stored in max_brightness.

I've attached a couple of Tasker pictures, but feel free to post any questions.