Remove All Ads from XDA
Find Your Device:
Or Continue to Thread: [SCRIPT][XPERIA U][upd 11-oct-…
10th October 2012, 11:49 AM
dapaua's Avatar
OP Senior Member
Thanks Meter: 247
Donate to Me
Lightbulb [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 .
ledset [option]
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.
Attached Files
File Type: zip - [Click for QR Code] (419 Bytes, 362 views)
File Type: zip - [Click for QR Code] (1.5 KB, 782 views)
Last edited by dapaua; 11th October 2012 at 11:10 AM. Reason: Version 2.
The Following 10 Users Say Thank You to dapaua For This Useful Post: [ View ] Gift dapaua Ad-Free