Controlling LED's with tasker - HTC EVO 3D

I take no credit for this, but just got it working with the evo 3d, this is mearly copied work of sw99's from the og evo forum found here
I cannot find screen brightness controls but everything else seems to work with a tiny change from the og evo to the e3d.
Also found that you can turn both the green and red led on at the same time and get orange.
You just need to download the Locale Execute Plug-in and obviously have Tasker
In tasker set up a new action and choose plugin then the execute plugin and click edit
replace X with option you want
For amber led on/off,
@! echo X > sys/devices/platform/leds-pm8058/leds/amber/brightness
0 = OFF
1 = ON
For amber led blink,
@! echo X > sys/devices/platform/leds-pm8058/leds/amber/blink
0 = Solid
1 = Blink
For green led on/off,
@! echo X > sys/devices/platform/leds-pm8058/leds/green/brightness
0 = OFF
1 = ON
For green led blink,
@! echo X > sys/devices/platform/leds-pm8058/leds/green/blink
0 = Solid
1 = Blink
For capacitive leds,
@! echo X > sys/devices/platform/leds-pm8058/leds/button-backlight/brightness
0 = OFF
1 = ON
For Flash leds,
@! echo X > sys/devices/platform/flashlight.0/leds/flashlight/brightness
0 = OFF
125 = Low power
127 = High Power
129 = High Power Single Flash
You must "Test" the task several times and wait for the Superuser permissions to trigger, otherwise the task will not execute. You will need to do this for each task you create using this plugin.

Pretty cool stuff here man. Thanks for a info. Now I have to find a way to implement this. Maybe I can find a way for the LED to blink when I am in a 4G zone. That would be amazing in itself.

Very nice, kudos

akiradavis said:
Pretty cool stuff here man. Thanks for a info. Now I have to find a way to implement this. Maybe I can find a way for the LED to blink when I am in a 4G zone. That would be amazing in itself.
Click to expand...
Click to collapse
If you ever find that out let me know. That would make my life.

Nice
Works cool
Sent from my PG86100 using XDA Premium App

Great stuff, wish I weren't colorblind.

A.Priori said:
Great stuff, wish I weren't colorblind.
Click to expand...
Click to collapse
That blows!
Sent from my PG86100 using XDA Premium App

Thanks for the kudos. I was kind of waiting for full root before I messed with this.
I also kind of miss the extra led on the OG EVO. The charge led is being used by the system, and as such, if a system event occurs it will override your settings.

sw99 said:
Thanks for the kudos. I was kind of waiting for full root before I messed with this.
I also kind of miss the extra led on the OG EVO. The charge led is being used by the system, and as such, if a system event occurs it will override your settings.
Click to expand...
Click to collapse
welcome! and yeah sucks we only have the one led this go around

lame, moved to general. was in development with the og evo. oh well, hope i helped someone

DomSim said:
lame, moved to general. was in development with the og evo. oh well, hope i helped someone
Click to expand...
Click to collapse
This was incredibly helpful. I use my phone at night and the capacitive LEDs at the bottom were blinding me. I've now got tasker profile to automatically turn them off when the display comes on.

Has anyone had any problems running these commands with the latest version of Android?

WillJitsu said:
Has anyone had any problems running these commands with the latest version of Android?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1198622
And
http://forum.xda-developers.com/showthread.php?t=1176607
I use the script from the second link on my 2,3,4 ROM

phatmanxxl said:
http://forum.xda-developers.com/showthread.php?t=1198622
Click to expand...
Click to collapse
That's not really what I was asking. I think my problem is due to the latest version of Superuser that was included in the ROM I downloaded.

I don't know why your having issues with super user, I use root explorer to place the script in system/bin then activate it in the terminal.
I haven't tried it using tasker

phatmanxxl said:
I don't know why your having issues with super user, I use root explorer to place the script in system/bin then activate it in the terminal.
I haven't tried it using tasker
Click to expand...
Click to collapse
I was just able to fix it by downgrading to Superuser 2.3.6.3. Thanks.

great tip - thank you very much!

Related

[Solved] Is there a script or a command to permanently turn off capacitive lights?

I rather not have them turn on at all. I don't like using screen filter because it disables randomly or when the brightness is adjusted either manually or from another app.
LEDs hack in the market. You can use to disable them, but I don't know if it will stay after reboot.
Didn't work that's the first thing I tried.
I have a script I got from somewhere on here that I just run the command in terminal emulator. One command, and it turns off when on or turns off when on.
#!/system/bin/sh
ws=255
exec < /sys/devices/platform/leds-pm8058/leds/button-backlight/brightness
read s
ks=$((s^ws))
echo $ks > /sys/devices/platform/leds-pm8058/leds/button-backlight/brightness
Click to expand...
Click to collapse
Sent from my PG86100 using XDA App
arrgh couldn't get it to work, says 0 not found in adb and 255: not found in terminal emulator
Use screen filter in the market
mattfmartin said:
Use screen filter in the market
Click to expand...
Click to collapse
Re-read post #1
I have to admit this would be very nice. No need for the lights and should help battery.
I'm ready to take the phone apart and remove/cut the leds for them.
I dislike them too
NewZJ said:
I'm ready to take the phone apart and remove/cut the leds for them.
I dislike them too
Click to expand...
Click to collapse
I was thinking of just maybe coloring the LED's with a black Sharpie. But im sure there's a easy way without taking the phone apart.
Here, download this then
adb remount
adb push leds /system/bin
Now, in adb shell or terminal, type leds
http://db.tt/4Bx7sRs
Sent from my PG86100 using XDA App
Is it possible to just dim them?
I would like them as dim as possible so that I can only see them lit in complete darkness.
you can set up profiles in tasker to disable them
http://forum.xda-developers.com/showthread.php?t=1185127
/self plug
DomSim said:
you can set up profiles in tasker to disable them
http://forum.xda-developers.com/showthread.php?t=1185127
/self plug
Click to expand...
Click to collapse
Thanks. I don't have tasker, but looked at this from your tut: For capacitive leds,
@! echo X > sys/devices/platform/leds-pm8058/leds/button-backlight/brightness
0 = OFF
1 = ON
I was able to use Root Explorer, and navigate to "/sys/devices/platform/leds-pm8058/leds/button-backlight/brightness" When I got to the 'brightness' file, I long pressed it, and cliicked 'open in text editor'. It opened and the number 255 was there. I deleted it, and added a 0, then hit menu and chose 'save and exit'. Not sure if i did it right, but as soon as I hit save and exit the capacitive lights turned out, and I've had no issues so far.
EDIT: NVM, they came back on and the 0 changed back to 255. Lights are back on after the screen shuts off and turns back on.
Tasker is $7, kinda pricey for me. Im a cheap bastard when it comes to adding to my $200+ phone bill.
Noticed they came back on with the script too. So I modified the script to make it stick.
http://db.tt/4Bx7sRs
Sent from my PG86100 using XDA App
man my adb is not working, will this work in the script manager?
Pushed it using root explorer then typed leds in the terminal. LED's turned off. Nice!
Also worked after reboot. Thanks alot!
Glad it worked for ya. Do you get that bug with the half a search light lit though? It's a hardware problem but damned annoying
Sent from my PG86100 using XDA App
danaff37 said:
Glad it worked for ya. Do you get that bug with the half a search light lit though? It's a hardware problem but damned annoying
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
It's leakage. Any way to make the leds turn off at screen dimmed?
Sent From My HTC Evo 3D Using Tapatalk On The Now Network From Sprint!

Notification Light - How to use tasker and keep it blinking!

I think I have figured out a setup for tasker to make the notification light blink longer than 5 minutes. The setup that is currently working for me is to use tasker with the Locale Execute Plug-in. I followed DomSim's guide to get Locale Execute to handle LED blinking. You can setup solid/blinking lights using that guide. I just chose a generic green blinking light for all notifications. I also chose to shut off led notifications under settings-display, though I don't know if it would conflict in any way.
In tasker,
1) Create new profile
2) First context - choose Event, UI, Notification, Done
3) Task Selection - choose New Task, click +, Plugin, Execute, Edit, type lines from DomSim's thread ie
Code:
For green led blink,
@! echo 1 > sys/devices/platform/leds-pm8058/leds/green/blink
4)Click Done and test until it gets root permission (took several times until it happened)
4) click +, Tasker, Wait 5 minutes, Done
5) click +, Tasker, Goto Action, 1, add an if then statement so it only repeats if the notification is not cleared. Done
6) click Done and Apply
So far it's worked to keep my led flashing on notifications for longer than 5 minutes. I'm sure it'll affect battery life some, but I don't know how much. You could make it more complex and have different color (red or green) and solid/flash for different events like missed call, sms, etc. using tasker and replacing Notification in step 2 with whatever you want. Also, Locale Execute Plug-in may not be needed as tasker has the ability to flash the LED as well, but I could not get it to work in the past...but that was before I thought of using an infinite loop. It will save some typing if you don't need Locale Execute Plug-in .
original post
So now that we have root and s-off, is there something that can be changed to make it so the notification light will keep flashing until the notification is dismissed? It shuts off after about 5 minutes as it is now, which defeats its purpose IMO. I've tried using many of the LED controller programs, and none of them work reliably for notifications even with root. I've also tried setting up profiles in tasker to blink the led, but it still shuts off after 5 minutes.
Is this 'feature' in the kernel or some other part of HTC's software? I'd love for a mod/program to make it blink until the notification is dismissed or the battery is dead .
Click to expand...
Click to collapse
I would like that too honestly good idea
Sent from my PG86100-EVO3D-using Tapatalk
I too agree
root + app "tasker"
kthxbye close thread
Tilde88 said:
root + app "tasker"
kthxbye close thread
Click to expand...
Click to collapse
mwalt2 said:
I've also tried setting up profiles in tasker to blink the led, but it still shuts off after 5 minutes.
Is this 'feature' in the kernel or some other part of HTC's software? I'd love for a mod/program to make it blink until the notification is dismissed or the battery is dead .
Click to expand...
Click to collapse
Learn to read, kthxbye.
With tasker are you able to use different colors?
As for notification, someone would have to modify the framework-res I believe.
Tilde88 said:
root + app "tasker"
kthxbye close thread
Click to expand...
Click to collapse
^^^^fail
Sent from my PG86100-EVO3D-using Tapatalk
Nobody has any other ideas? If someone has it working with tasker or any other program, go ahead and post how you did it.
I guess I should title the thread "Get a Photon!" so I could get pages and pages of replies .
I've been using Light Flow, it's the best app I've found so far but I haven't tried a whole lot to be honest. It works pretty decent, though like you said not 100% reliable. You can also adjust the vibrate rate/pattern which I love.
I've come from a Blackberry, the notification LED on those are very big, very bright and multiple color selections, where the EVO 3D has 3, green, red and a deep orange. I've missed many a different notifications on my EVO 3D, specially text messages. I'll walk out of the room, come back and see no blinking light, then check my phone like 30 minutes later and notice I had a text message sitting for 30+ minutes without even knowing.
Not only is shutting the light off after 5 minutes a terrible idea, like you said pretty much defeats the purpose but the notifications not showing while charging due to the light staying constantly red is a terrible design decision if you ask me.
Updated the OP with some tasker settings that seem to be working (so far).
A total noob with Tasker here, what exactly do I put for the IF statement in step 5?
Thanks
gsgflash said:
A total noob with Tasker here, what exactly do I put for the IF statement in step 5?
Thanks
Click to expand...
Click to collapse
I actually never could get tasker to work right. I got it to keep the LED on until dismissed, but the loop caused the phone to never go to sleep and ate through battery faster. If your interested, I've implemented a fix at the kernel level (thanks to joe85) for 2.3.4 Sense ROMs. You can find the thread here. It's been the only reliable fix for me.
mwalt2 said:
I actually never could get tasker to work right. I got it to keep the LED on until dismissed, but the loop caused the phone to never go to sleep and ate through battery faster. If your interested, I've implemented a fix at the kernel level (thanks to joe85) for 2.3.4 Sense ROMs. You can find the thread here. It's been the only reliable fix for me.
Click to expand...
Click to collapse
Thanks for letting me know, will take a look at the link

Turning off auto brightness...

Anyone come accross how to do this yet?
Brightness is set to maximum but dims when in low light.
Thanks.
As of the moment no way to set the auto brightness to off. Maybe some software update oughta to do it, or some genius gets pissed off and develop one.
I also noticed that when you force off the capacitive button lights (useful when dark) via software, the keyboard light will not turn on also (not useful when dark).
The x10 mini has locked auto-brightness too and it can be disabled this way:
http://forum.xda-developers.com/showthread.php?t=1036544&highlight=brightness
Maybe it works on the mini/active as well?
Hyper_Sonic said:
Edit /etc/hw_config.sh using RootExplorer
1. change the line: i2c_pwm_als with i2c_pwm
2. set permissions to rwxr--r-- (744) if they are changed! VERY IMPORTANT!
3. reboot and enjoy the missing sensor
Click to expand...
Click to collapse
Nice find schmolch. Will try and update this thread.
jtdc said:
I also noticed that when you force off the capacitive button lights (useful when dark) via software, the keyboard light will not turn on also (not useful when dark).
Click to expand...
Click to collapse
how and where do you do this? is this a setting somewhere? (cant find it)
or do you use 3rd party software? (if so, whats it called?)
^ Its an app on the market called "Screen Filter". I use that to further dim the screen (at nights), thereby save battery as well. And its free, as in really free, no ads at all unlike many "free" but has ad pushing. You can turn off the capacitive button lights when you prefer to setup a widget for it.
jtdc said:
Nice find schmolch. Will try and update this thread.
Click to expand...
Click to collapse
Looks like the format has changed in this file.
But this one looks interesting:
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
I guess it can be tested "live" by doing:
echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
I'm on a non-rooted build so I can't test myself :-(
jtdc said:
^ Its an app on the market called "Screen Filter". I use that to further dim the screen (at nights), thereby save battery as well. And its free, as in really free, no ads at all unlike many "free" but has ad pushing. You can turn off the capacitive button lights when you prefer to setup a widget for it.
Click to expand...
Click to collapse
thanks a bunch!
edit: exactly what i was looking for actually!
jtdc said:
^ Its an app on the market called "Screen Filter". I use that to further dim the screen (at nights), thereby save battery as well. And its free, as in really free, no ads at all unlike many "free" but has ad pushing. You can turn off the capacitive button lights when you prefer to setup a widget for it.
Click to expand...
Click to collapse
I found another app, which may actually be better, as it turns off the backlight of the capacitive buttons, but leaves the keyboard backlight active when opened!
it's called "Keyboard backlight controller".
funny enough, this is supposed to disable keyboard backlight, but on the Xperia Mini Pro it disables only the backlights of the soft-keys!
edit: forgot to mention, this app needs root, so may not be for everyone.
Whoa nice find, I'll try that when I can
Sent from my GT-P1000 using Tapatalk
Anyone also notice the screen flickers when dimmed?
Karlos G said:
Anyone also notice the screen flickers when dimmed?
Click to expand...
Click to collapse
yes, this is caused by the auto brightness, which can't be turned off in the user interface.
I've played around with hw_config.sh file, trying to get it disabled, but to no avail.
Anyone else more luck?
I've found an application that works, it's called "Disable Auto Brightness".
It was made for another Xperia type phone, but also works on the mini pro (and I assume mini as well).
It works, but its somewhat unhandy: it'll disable the auto brightness sensor, but only after unlocking. so while using the stock lock screen, it works almost perfectly, but when using something like widgetlocker, it'll only work if you leave the system keyguard enabled (under advanced settings) which I don't really like too much.
so for anyone having these flicker issues, this is a fairly good solution.
but I'd like to have the sensor completely turned off.
soooo, anyone any luck with that?
Heimiko said:
yes, this is caused by the auto brightness, which can't be turned off in the user interface.
I've played around with hw_config.sh file, trying to get it disabled, but to no avail.
Anyone else more luck?
I've found an application that works, it's called "Disable Auto Brightness".
It was made for another Xperia type phone, but also works on the mini pro (and I assume mini as well).
It works, but its somewhat unhandy: it'll disable the auto brightness sensor, but only after unlocking. so while using the stock lock screen, it works almost perfectly, but when using something like widgetlocker, it'll only work if you leave the system keyguard enabled (under advanced settings) which I don't really like too much.
so for anyone having these flicker issues, this is a fairly good solution.
but I'd like to have the sensor completely turned off.
soooo, anyone any luck with that?
Click to expand...
Click to collapse
I guess that means the echo 0 to lcd-backlight/als/enable thing I posted a few days ago didn't work?
Smiley76 said:
I guess that means the echo 0 to lcd-backlight/als/enable thing I posted a few days ago didn't work?
Click to expand...
Click to collapse
correct. including another few different settings I tried.
they do have effect on the brightness of the LEDs though, but sadly no turning off the auto brightness of the screen.
Smiley76 said:
Looks like the format has changed in this file.
But this one looks interesting:
echo 1 > $dev/lcd-backlight/als/enable #Sensor on/off. 1 = on, reg 90h
I guess it can be tested "live" by doing:
echo 0 > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
I'm on a non-rooted build so I can't test myself :-(
Click to expand...
Click to collapse
This works on my SK17i (Xperia mini pro). See here for more info.
Hey thnx!! It proved to be help full for me!!

Soft Key Brightness

How do I go about changing this? I know its possible.
Sent from my EVO LTE using xda premium
navigate to
/sys/class/leds/button-backlight
and /sys/class/leds/button-backlight/device/leds/button-backlight
I can get them to be temporarily disabled but they come back on after I turn the screen off then on
screen filter app isn't working at all
I actually want to see if I can make them brighter. Mine seem very dim.
Do I decompile it?
Sent from my EVO LTE using xda premium
You can echo to it with an app like gscript lite, and then make a shortcut to it if you want.
echo 255 > /sys/class/leds/button-backlight/device/leds/button-backlight/brightness
That should be max brightness, 0 would be off.
I used to do this on my OG Evo to turn off the capacitive button backlights. My LED notification light seems to get stuck On whenever I tried to turn off the backlights on this phone though. I don't remember under what circumstances, been a while since I tried it, might have been when unplugging from a charger, and only rebooting would fix it.
Philosuffer said:
You can echo to it with an app like gscript lite, and then make a shortcut to it if you want.
echo 255 > /sys/class/leds/button-backlight/device/leds/button-backlight/brightness
That should be max brightness, 0 would be off.
I used to do this on my OG Evo to turn off the capacitive button backlights. My LED notification light seems to get stuck On whenever I tried to turn off the backlights on this phone though. I don't remember under what circumstances, been a while since I tried it, might have been when unplugging from a charger, and only rebooting would fix it.
Click to expand...
Click to collapse
Ill try it now. Ill let you know.
But to keep it that way without running a script, I would have to decompile?
Sent from my EVO LTE using xda premium
I'm getting fc issues with the gscript. It also said script failed when I had it working.
Sent from my EVO LTE using xda premium
eyeisdasteve said:
I'm getting fc issues with the gscript. It also said script failed when I had it working.
Sent from my EVO LTE using xda premium
Click to expand...
Click to collapse
Hmm, gscript definitely worked for me, but then I also ran into the problem that NewZJ ran into anyway - they would come back on after waking the device. I was trying to disable them though, not make them brighter.
Also, I just looked at the file again and when they're on I think the brightness is set to 255 anyway. Maybe it is already set to max brightness by default when they're on.

[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.
Examples:
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]
options:
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.
dapaua said:
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.
Click to expand...
Click to collapse
Regarding Note1: the blinking speed depends fully on the CPU load and speed at that moment.
Since the CPU governor's system default is flexible the speeds tends to vary.
The only way I've found up till now (and included in LUC) is to temporarily change the governor.
The downside is that the cpu speed is changed for the whole system, not only the shell script.
Regarding Note2: thanks
Looks really interesting, will give it a try with tasker
It works untilj unless you don't touch the buttons (home/back/options) the color you set goes away but the white blink still keeps
Btw. In sys/class/led/device. There is file use soft dim (something like that) it helps the blinks to in away softly and come back softly. Can you tell/guide what line com where should I add to your script ?? Or can do it for me??
Sent from my ST25i using xda app-developers app
jitin02 said:
It works untilj unless you don't touch the buttons (home/back/options) the color you set goes away but the white blink still keeps
Btw. In sys/class/led/device. There is file use soft dim (something like that) it helps the blinks to in away softly and come back softly. Can you tell/guide what line com where should I add to your script ?? Or can do it for me??
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
Hi, yes, I know. That cannot be fixed because sony's framework for lighting the bar interferes with the script. I use it only when the screen is off, and I turn the led off when the screen is on.
I played a bit with the file dim_brightness, but couldn't figure how it works. But if you have any information, tell me and I will add it to the script.
I think some good additions would be solid lights: "solid red2 50" for eg. and a way of turning all lights off in one go, maybe putting in "rgb123 0".
dapaua said:
Hi, yes, I know. That cannot be fixed because sony's framework for lighting the bar interferes with the script. I use it only when the screen is off, and I turn the led off when the screen is on.
I played a bit with the file dim_brightness, but couldn't figure how it works. But if you have any information, tell me and I will add it to the script.
Click to expand...
Click to collapse
Hi
Sorry didn't mentioned the full name of the file. its> pattern use softdim
Its in sys/class/led//device. Here from the last its the 4th file
I can tell u what to add. Will try explain you how I came to know about it
Leave the script for a sec(Coz it don't do anything to the original files in the above mentioned folder. )
Just set the value of any of the led file use_pattern manually to 1. Than set the value of the same led file pattern use softdim
See if understood or get it. Otherwise let me know I will try make video of what it does to show it.
I really want it happen successfully as I am fan of it from the day fourth of after bought this phone, (as fourth day of buying it I was playing with it manually . Will be great if works
Btw its only ics that don't let the leds blink but on gb this interference don't happens
They blink the way you set it until you don't restart the phone
But nixx-x1 helped me keep the settings even after starting with a small script on gb. But ICS don't even let that too work
Sent from my ST25i using xda app-developers app
It doesnt work as it should but could you make police type blink option.
Sent from my ST25i using xda app-developers app
XperianPro said:
It doesnt work as it should but could you make police type blink option.
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
The idea is that with this you can program your own patterns. I'm not going to do the patterns, but I will post an example for a police light. It's not perfect, but should give you an idea about how to do this:
Code:
#!/system/bin/sh
ledset alloff
for a in `seq 100`
do
solid blue1 0 ; solid blue3 0 ; solid red1 100 ; solid red3 100;
usleep 100000
solid red1 0 ; solid blue1 100 ; solid red3 0; solid blue3 100;
usleep 100000
solid red1 100 ; solid red3 100; solid red2 100; solid blue2 100; solid green2 100; solid blue1 0 ; solid blue3 0;
usleep 100000
solid red1 0 ; solid blue1 100 ; solid red2 0; solid green2 0 ; solid blue2 0 ;solid red3 0; solid blue3 100;
usleep 100000
done
ledset alloff
Save it as police, put it in /system/bin/ and give the permissions.
You will need version 2 that I just posted.
jitin02 said:
Hi
Sorry didn't mentioned the full name of the file. its> pattern use softdim
Its in sys/class/led//device. Here from the last its the 4th file
I can tell u what to add. Will try explain you how I came to know about it
Leave the script for a sec(Coz it don't do anything to the original files in the above mentioned folder. )
Just set the value of any of the led file use_pattern manually to 1. Than set the value of the same led file pattern use softdim
See if understood or get it. Otherwise let me know I will try make video of what it does to show it.
I really want it happen successfully as I am fan of it from the day fourth of after bought this phone, (as fourth day of buying it I was playing with it manually . Will be great if works
Btw its only ics that don't let the leds blink but on gb this interference don't happens
They blink the way you set it until you don't restart the phone
But nixx-x1 helped me keep the settings even after starting with a small script on gb. But ICS don't even let that too work
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
Thank you very much, this info was really nice and helpful.
Mitchio said:
I think some good additions would be solid lights: "solid red2 50" for eg. and a way of turning all lights off in one go, maybe putting in "rgb123 0".
Click to expand...
Click to collapse
Thanks! I implemented your suggestions.
Great . V2
will try as soon as i update mine to Indian ICs (releasedalready)
Police script does not work.
Sent from my ST25i using xda app-developers app
XperianPro said:
Police script does not work.
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
It works for me. I'll attach it here. Probably it is because you edited it in windows, and you used windows endlines.
I'll attach it here, just copy it to /system/bin and give permissions as in first post.
Here is output.
Sent from my ST25i using xda app-developers app
Still wondering wat would be the command for the police script to work
jitin02 said:
Still wondering wat would be the command for the police script to work
Click to expand...
Click to collapse
XperianPro said:
Police script does not work.
Click to expand...
Click to collapse
1. copy all files from V2.zip (first post) into /system/bin/
2. copy police script into /system/bin/
3. change permission of those 4 files you just copied to 555 (or just check all boxes)
4. go to a shell emulator and type " police " (without quotes)
then you have your phone siren blinking
XperianPro said:
Here is output.
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
You need busybox installed. Get the installer from play store, use normal install.
Rainbows
For those liking rainbows, I've edited the rainbow scripts used in LUC a bit to be used in the same way as the blink scripts
Just extract the .zip attached and copy it with the other files in /system/bin and set the execute.
There are 3 sequences in it:
RB1 = fade in sequence
RB2 = loop sequence
RB3 = fade out sequence
You can also set a slowdown factor in msec.
If you don't want to slow it down use value " 0 ".
I found that slowdown factors up to 50000 still work smoothly (it will take a minute to finish thou..)
Commands
Code:
rainbow [slowdown] [sequence] [sequence] [sequence]
Example
Code:
rainbow 1000 RB1 RB2 RB2 RB3
This will fade in the rainbow, loop it 2 times and fade it out.
at the moment it's possible to have 6 loops (so 8 sequences in total)
If you use less you'll get a few "1000: not found"... those can be ignored
Perhaps daPaua knows a way to have the input dynamic instead of fixed
nixx-X1 said:
1. copy all files from V2.zip (first post) into /system/bin/
2. copy police script into /system/bin/
3. change permission of those 4 files you just copied to 555 (or just check all boxes)
4. go to a shell emulator and type " police " (without quotes)
then you have your phone siren blinking
Click to expand...
Click to collapse
Don't work
Sent from my ST25i using xda app-developers app
---------- Post added at 07:58 AM ---------- Previous post was at 07:57 AM ----------
nixx-X1 said:
For those liking rainbows, I've edited the rainbow scripts used in LUC a bit to be used in the same way as the blink scripts
Just extract the .zip attached and copy it with the other files in /system/bin and set the execute.
There are 3 sequences in it:
RB1 = fade in sequence
RB2 = loop sequence
RB3 = fade out sequence
You can also set a slowdown factor in msec.
If you don't want to slow it down use value " 0 ".
I found that slowdown factors up to 50000 still work smoothly (it will take a minute to finish thou..)
Commands
Code:
rainbow [slowdown] [sequence] [sequence] [sequence]
Example
Code:
rainbow 1000 RB1 RB2 RB2 RB3
This will fade in the rainbow, loop it 2 times and fade it out.
at the moment it's possible to have 6 loops (so 8 sequences in total)
If you use less you'll get a few "1000: not found"... those can be ignored
Perhaps daPaua knows a way to have the input dynamic instead of fixed [/QUOTE
Work great thanks
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse

Categories

Resources