[SCRIPT][XPERIA U][upd 11-oct-2012][ROOT] Blink v2
This is a small script to control leds on xperia u.
You will need root and busybox.
Instructions. Unzip, Put it in /system/bin , give it execution permissions (555, for example) and run it in a terminal.
Do not install it with CWM.
Use it as
blink [led] [intensity]
led list: red, green, blue, red1, green1, blue1, red2, green2,blue2,red3,blue3,green3
the ones without number are the small led next to the power button. Numbers are the notification bar, from left to right.
intensity goes from 0 to 255
0 stops blinking.
I use it with tasker for many things.
If you just use it with no arguments, it makes the power green led to blink. If you give no intensity, it uses 50.
You need to be root, so if you are using this on the terminal or adb, type "su" first.
For tasker, mark the "use root" box.
blink red2 - makes the middle led on the bar blink red.
blink red2 0 - stops the blinking for middle red led.
blink green3 255 - blinks green right led, max power.
blink blue1 200; blink red1 - makes left led blink in a bluish violet.
You can of course modify the script to match your needs. All the info was extracted from this forums, so I cannot say that I did anything new, just put the script together.
Note1: The blink speed seems random ,sometimes is faster, and sometimes it is slower. If anyone knows how to control it, please tell me and I will try to add it to the program. Sometimes it is so slow that it does not work.
Note2: Leds-u-ctrl allows you to use the ambient bar for notifications, and it is a very nice program. If you find this too complicated, you may try that. I am not related in anyway to LUC developer.
Edit : I added version 2.
New command: solid. Works as blink, but with solid light. Same syntax.
New command:ledset .
fadeon : sets fade to on for led blinking
fadeoff: sets fade to off for led blinking
baroff : turns off all notification bar leds
alloff : turns off all notification and power leds
Copy to /system/bin ,give permissions as usual.
Last edited by dapaua; 11th October 2012 at 11:10 AM.
Reason: Version 2.