OK guy & girls, does anybody know if,any kit kat rom, has a settings for it, to use with alerts, instead of downloading an app? I downloaded an app called ' button led ' it works, but it only lights up one led. The ring has 2 LEDs left, right.
helloyoufool said:
OK guy & girls, does anybody know if,any kit kat rom, has a settings for it, to use with alerts, instead of downloading an app? I downloaded an app called ' button led ' it works, but it only lights up one led. The ring has 2 LEDs left, right.
Click to expand...
Click to collapse
I am also waiting for something like this!
Everything I've read so far, the rear light has one white LED and can't be controlled, and with Lightflow I never could get the rear LED to do anything.
Front LED works good with Lightflow, but since I'm using AOKP I settled on using its built-in LED functionality even though it has a few limitations. Lightflow uses about 80M of ram, which is just insane.
khaytsus said:
Front LED works good with Lightwave,
Click to expand...
Click to collapse
I'm not finding this app. Can you share a link? Thanks.
LG G2
Here a link, to the app I'm using for my rear led alert
http://forum.xda-developers.com/showthread.php?t=1958939
20degrees said:
I'm not finding this app. Can you share a link? Thanks.
LG G2
Click to expand...
Click to collapse
Oops, I meant LightFLOW, editing my post
---------- Post added at 08:36 PM ---------- Previous post was at 08:34 PM ----------
helloyoufool said:
Here a link, to the app I'm using for my rear led alert
http://forum.xda-developers.com/showthread.php?t=1958939
Click to expand...
Click to collapse
Exactly what are you setting up in there to use the rear LED? What's the device path etc?
Nevermind, I found some stuff based on info in that thread and some other areas.
I still haven't figured out the (automated) rgb + blink stuff, but I can turn the left/right button on, torch on, red, green, or blue on. Blinking (without using sleep/usleep or such) and RGB I haven't yet figured out.
Yea that's the only that sucks.. Can't light the both LEDs, its either left or right.
helloyoufool said:
Yea that's the only that sucks.. Can't light the both LEDs, its either left or right.
Click to expand...
Click to collapse
Oh, no, I could light them independently but it seemed like turning one off turned off both. So I could go left, left off, right, right off, both.
I haven't decided what I'm going to do with the script I was playing with that night, but it was for fun. Especially flickering the torch at 50ms, etc. I figure at some point I'll use the stuff in Tasker.
How did you get them both to light up?
khaytsus said:
Oh, no, I could light them independently but it seemed like turning one off turned off both. So I could go left, left off, right, right off, both.
I haven't decided what I'm going to do with the script I was playing with that night, but it was for fun. Especially flickering the torch at 50ms, etc. I figure at some point I'll use the stuff in Tasker.
Click to expand...
Click to collapse
how did you do this?
antawnm26 said:
how did you do this?
Click to expand...
Click to collapse
Note, I'm on AOKP 4.3 with its kernel. These very well might not be exactly the same for all ROMs.
Attaching a script, it's just for playing, not really very useful at this point. Your device must be awake for the script to run properly, otherwise you'll find "sleep 1" (sleep 1 second) taking 5-10 seconds
If the devices in the script don't exist to play with, try find /sys | grep brightness to find them on your ROM.
green() etc turn it on the first time you hit the function, turn it off the next. The rear LEDs were a little weird, so I did them differently. They always show as 71 for some reason, where the others show 0 when they're off. Anyway, it works. I'm not checking any arguments, but some expect a second argument, and the third argument isn't used at all. Anyway, just an example, nothing you can directly use.
Code:
#!/bin/sh
rear_left="/sys/devices/leds-qpnp-d8117600/leds/button-backlight1/brightness"
rear_left_max="/sys/devices/leds-qpnp-d8117600/leds/button-backlight1/max_brightness"
rear_right="/sys/devices/leds-qpnp-d8117600/leds/button-backlight2/brightness"
rear_right_max="/sys/devices/leds-qpnp-d8117600/leds/button-backlight2/max_brightness"
red="/sys/devices/leds-qpnp-d8117200/leds/red/brightness"
red_max="/sys/devices/leds-qpnp-d8117200/leds/red/max_brightness"
blue="/sys/devices/leds-qpnp-d8117200/leds/blue/brightness"
blue_max="/sys/devices/leds-qpnp-d8117200/leds/blue/max_brightness"
green="/sys/devices/leds-qpnp-d8117200/leds/green/brightness"
green_max="/sys/devices/leds-qpnp-d8117200/leds/green/max_brightness"
torch="/sys/devices/leds-qpnp-d8117400/leds/led:flash_torch/brightness"
torch_max="/sys/devices/leds-qpnp-d8117400/leds/led:flash_torch/max_brightness"
# These could be useful for blink/rgb but not working from what I've found
# so far, but good info from the Tasker forum
# https://groups.google.com/forum/#!topic/tasker/pKWOQXZv7Hs/discussion
blink_patterns="/sys/devices/virtual/g2_rgb_led/use_patterns/blink_patterns"
input_patterns="/sys/devices/virtual/g2_rgb_led/use_patterns/input_patterns"
onoff_patterns="/sys/devices/virtual/g2_rgb_led/use_patterns/onoff_patterns"
pattern=$1
time_on=$2
time_off=$3
green()
{
echo "green"
if [ `cat $green_max` == `cat $green` ]; then
echo 0 > $green
else
echo `cat $green_max` > $green
fi
}
red()
{
echo "red"
if [ `cat $red_max` == `cat $red` ]; then
echo 0 > $red
else
echo `cat $red_max` > $red
fi
}
blue()
{
echo "blue"
if [ `cat $blue_max` == `cat $blue` ]; then
echo 0 > $blue
else
echo `cat $blue_max` > $blue
fi
}
rear_left()
{
if [ `cat $rear_left` -gt 0 ]; then
echo 0 > $rear_left
else
echo `cat $rear_left_max` > $rear_left
fi
}
rear_right()
{
if [ `cat $rear_right` -gt 0 ]; then
echo 0 > $rear_right
else
echo `cat $rear_right_max` > $rear_right
fi
}
torch()
{
if [ `cat $torch_max` == `cat $torch` ]; then
echo 0 > $torch
else
echo `cat $torch_max` > $torch
fi
}
flashtorch()
{
flashes=0
while [ $flashes -lt $time_on ]; do
let flashes=flashes+1
torch
usleep 50000
torch
usleep 40000
done
}
case $pattern in
testrear)
rear_left
sleep $time_on
rear_left
sleep $time_on
rear_right
sleep $time_on
rear_right
sleep $time_on
rear_left
rear_right
sleep $time_on
rear_left
rear_right
;;
testfront)
green
sleep 1
green
blue
sleep 1
blue
red
sleep 1
red
;;
testwhite)
red
green
blue
sleep 1
red
green
blue
;;
flashtorch)
flashtorch
;;
esac
N00b
Yo guys. Rooted my [email protected] with CloudyG2 and im wondering, how would i control my rear power button LED ring?
P.S, im kind of a noob with this stuff. Sorry for resurrecting this from 2013, i've been searching all over the web for something to control my LED ring
Naweed Reza said:
Yo guys. Rooted my [email protected] with CloudyG2 and im wondering, how would i control my rear power button LED ring?
P.S, im kind of a noob with this stuff. Sorry for resurrecting this from 2013, i've been searching all over the web for something to control my LED ring
Click to expand...
Click to collapse
Yes.. Me too. Pls help
Sent from my LG-D802 using XDA-Developers mobile app
Related
Has anyone figured out how to control the backlight on the Home, Menu, etc soft buttons on a rooted Epic?
I am looking in /sys/class/leds/ and there are five directories:
blue/
red/
mmc0::/
mmc1::/
mmc2::/
By changing the content of the brightness file in blue/ and red/ I am able to turn the blue and red notification LEDs on and off; but the mmc* directories don't seem to do anything, and I can't figure out how to control the softkey LEDs.
Code:
# cd /sys/class/leds/mmc0\:\:/
# cat brightness
0
# echo 255 > brightness
# cat brightness
0
# cat /sys/class/leds/device/leds/mmc0\:\:/brightness
1
# echo 0 > /sys/class/leds/device/leds/mmc0\:\:/brightness
# cat /sys/class/leds/device/leds/mmc0\:\:/brightness
1
What I primarily want to do is get those softkey lights to turn off and stay off while I am reading an ebook. This was easy on my Samsung Moment:
Code:
echo 0 > /sys/class/leds/button-backlight/brightness
Any clues?
I have been wanting this since the beginning. The softkey leds seem to be connected to the keyboard backlight. Even if I could just turn off the keyboard backlight entirely (i.e. changing the timeout does not help ebook reading), I would be happy.
Just set it to 3secs then it would turn off fast works for me when reading ebook.
Sent from my SPH-D700 using Tapatalk
Hmmm. The choice between a bright light shining in my face or a bright light flashing in my face? Neither are acceptable.
in fact, i hope it could be on when screen is on, although there is an option "Same as screen timeout", it simple set the timeout the same as screen's, i mean, they just do not sync. when you opened some app keep the screen on, the keys will fade a few moment later, no matter what you've set, that's really frustrating me!
I've been searching for the control file and found this. It looks promising, but its zero length. I was expecting it to contain a value like the blue & red ones.
Code:
/sys/devices/platform/s3c-keypad/brightness
After forgetting about this for a long while, I found it!
/sys/devices/virtual/misc/melfas_touchkey/brightness is the file that controls the softkey backlight on the Epic.
Use
Code:
echo 0 > /sys/devices/virtual/misc/melfas_touchkey/brightness
to turn off the backlight.
Code:
echo 1 > /sys/devices/virtual/misc/melfas_touchkey/brightness
to turn on the backlight.
Code:
chmod 0333 /sys/devices/virtual/misc/melfas_touchkey/brightness
to prevent other apps from changing the backlight's on/off status. And
Code:
chmod 0647 /sys/devices/virtual/misc/melfas_touchkey/brightness
to undo the previous line's lockdown.
Please post questions in General section.
Try out SimpleLEDToggle Plus in the Market. It's 99 cents. It didn't work for me but that's probably because I'm not rooted. There was a comment that it worked on the Epic. It specifically said that you can use it for reading ebooks with the lights off.
Sent from my SPH-D700 using XDA App
dennistpm said:
Try out SimpleLEDToggle Plus in the Market. It's 99 cents. It didn't work for me but that's probably because I'm not rooted. There was a comment that it worked on the Epic. It specifically said that you can use it for reading ebooks with the lights off.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Big plus if this works...I will check it out.
SimpleLedtoggleplus doesn't work. I lost my buck but I contacted the dev and told him about this thread. 15 minutes it too short. It should be 60 at least
This line does not work under 2.2 rooted,
Code:
echo 0 > /sys/devices/virtual/misc/melfas_touchkey/brightness
The updated line is
Code:
echo 2 > /sys/devices/virtual/misc/melfas_touchkey/brightness
Works for me, your mileage may vary.
The suggested chmod seems to have no impact, for me, nor does 0444 or 0000.
Now to find a way to tie a desktop icon to a shell script... (sure it's easy for you, but I'm a n00b)
Chisight
a way to tie a desktop icon to a shell script
ZenInsight said:
SimpleLedtoggleplus doesn't work. I lost my buck but I contacted the dev and told him about this thread. 15 minutes it too short. It should be 60 at least
Click to expand...
Click to collapse
Thing is, with android and linux being so free in regards with what you can do, 15 minutes is just under enough time to download the app, install, back up the app data, transfer it to your pc, then request a refund.
Sent from my Epic 4G via Tapatalk
It wouldn't take 15 mins to do that...
Sent from my Nexus S using XDA App
chisight said:
This line does not work under 2.2 rooted,
Code:
echo 0 > /sys/devices/virtual/misc/melfas_touchkey/brightness
The updated line is
Code:
echo 2 > /sys/devices/virtual/misc/melfas_touchkey/brightness
Works for me, your mileage may vary.
The suggested chmod seems to have no impact, for me, nor does 0444 or 0000.
Now to find a way to tie a desktop icon to a shell script... (sure it's easy for you, but I'm a n00b)
Chisight
Click to expand...
Click to collapse
Wow!!! Did you actually get the hard key lights to shut off???!
I've been wanting this for about a year now and finally found a solution.
I odin'd EF02Plus rom (gingerbread) yesterday and last night while reading I noticed that the button leds now do not come on when I touch the screen (YES!!!). The leds do come on just fine if you tap a hardware button. Perfect setup for night reading.
Not sure if this is the same in all EF02 based roms or not, but I'm guessing it probably is.
retrobits said:
I've been wanting this for about a year now and finally found a solution.
I odin'd EF02Plus rom (gingerbread) yesterday and last night while reading I noticed that the button leds now do not come on when I touch the screen (YES!!!). The leds do come on just fine if you tap a hardware button. Perfect setup for night reading.
Not sure if this is the same in all EF02 based roms or not, but I'm guessing it probably is.
Click to expand...
Click to collapse
You are kidding? That's it? I wonder if it's the rom or kernel.
Hey guys,
Not sure if this is still useful to anybody. I'm on EH 17 CM7.1 Kang and I found the values for controlling the brightness of the softkeys and the hardkeys
For the face soft keys (better reading ebooks):
Code:
/sys/devices/virtual/sec/t_key # echo 0 > brightness
For the keyboard keys (to save power either typing or playing emulated games):
Code:
/sys/devices/platform/s3c-keypad # echo 2 > brightness
Hope this helps.
thephawx said:
Hey guys,
Not sure if this is still useful to anybody. I'm on EH 17 CM7.1 Kang and I found the values for controlling the brightness of the softkeys and the hardkeys
For the face soft keys (better reading ebooks):
Code:
/sys/devices/virtual/sec/t_key # echo 0 > brightness
For the keyboard keys (to save power either typing or playing emulated games):
Code:
/sys/devices/platform/s3c-keypad # echo 2 > brightness
Hope this helps.
Click to expand...
Click to collapse
Very cool! Disabling soft key backlight does turn them off and stop them from lighting on screen press in cm7, but pressing a softkey lights them up again. I hope this info can help the screen filter app dev on our epics!
I have my phone by my bed, and now i have this cool capdase case white can let it stand up sideways so ive been using the night clocks
BUT THAT DAM GREEN LIGHT IS BUGGING ME
because i charge my phone o/night
i have searched all over for how to turn it off?
im rooted using a cm6 froyo rom by wolfthingy
if not possible to turn off can i at least change it to red
yes ive tried blink
put a black scotch tape on the light and remove it next morning!!
kunalgahlot said:
put a black scotch tape on the light and remove it next morning!!
Click to expand...
Click to collapse
great idea
2.2 cyanogen settings disable led on charge
Sent from my X10i running 2.2 Xtremes-Cyanogen using XDA App
Hawkysoft said:
2.2 cyanogen settings disable led on charge
Sent from my X10i running 2.2 Xtremes-Cyanogen using XDA App
Click to expand...
Click to collapse
It would be great if i can find that setting...
unfortunately, no such thing in my CyanogenMod-6.1.3 v4.3 settings
or....do i need a new pair of glasses?
Can you find the cyanogen mod settings at all?
yes i can, and found as well led notifications settings, but none of them is for charging settings!
For Eternity on my phone I made script in Gscript, which echoes the '0' value to the led and the button leds then sets chmod to 444 of those files somewhere inside /sys. but it is for 2.1
Adolf1994 said:
For Eternity on my phone I made script in Gscript, which echoes the '0' value to the led and the button leds then sets chmod to 444 of those files somewhere inside /sys. but it is for 2.1
Click to expand...
Click to collapse
Can you share the script, pretty please?
My_Immortal said:
Can you share the script, pretty please?
Click to expand...
Click to collapse
Sorry, but my phone is dead(not bricked) right now
but on the xda's wiki page of X10i you can find some help.
you can search for the files mentioned with root explorer(recommended)
I will edit this post if Ifigured it out
Adolf yeah it would fix all se failure system things like the low in call volume.
Sent from my X10i using XDA Premium App
shahkam said:
Adolf yeah it would fix all se failure system things like the low in call volume.
Sent from my X10i using XDA Premium App
Click to expand...
Click to collapse
what do you mean with this?
all I can remember is this
Code:
#!/system/sh
echo 0 > /sys/[...]ledc:[...]brightness <-this was issued 3 times for blue,green and red
echo 0 > /sys/[...]kbl:[...]brightness <- this was for the KeyBoard Leds, but I'm totally unsure about this :S
chmod 444 for every file to keep the settings until reboot
exit
I'm really sorry, but I'm not a flash junkie and am having driver problems on PC. Atm I'm forced to use my SE W580i
ok, my X10 is alive, so here is the script for 2.1
probably you can apply it for 2.2
but I plan to update to wolf's cm6
Code:
#! /system/bin/sh
echo 0 > /sys/class/leds/lv5219lg:rgb1:red/brightness
echo 0 > /sys/class/leds/lv5219lg:rgb1:green/brightness
echo 0 > /sys/class/leds/lv5219lg:rgb1:blue/brightness
echo 0 > /sys/class/leds/lv5219lg:sled/brightness
chmod 444 /sys/class/leds/lv5219lg:rgb1:red/brightness
chmod 444 /sys/class/leds/lv5219lg:rgb1:green/brightness
chmod 444 /sys/class/leds/lv5219lg:rgb1:blue/brightness
chmod 444 /sys/class/leds/lv5219lg:sled/brightness
I have the same complaint. I turn the phone over. If you're not using it as a nighttime clock there's no real problem.
Sent from my X10a using XDA Premium App
stan.s said:
I have the same complaint. I turn the phone over. If you're not using it as a nighttime clock there's no real problem.
Sent from my X10a using XDA Premium App
Click to expand...
Click to collapse
Yeah, same here
Background:
I previously had an old Nexus i9250 which had an LED and I'm missing that badly, despite the Moto notification.
However, the Moto X 2 (2014) has a LED hidden under the earpiece, but it is normally only used to indicate charging (this is similar to the Nexus 6, but the Moto 2014 LED is just green, the Nexus-6 seems to have a hidden multi-color LED too).
On rooted devices the LED can be turned on by writing a value to a system file:
echo <brighness> >/sys/class/leds/charging/brightness
(<brighness> is some value betweeen 1 and 255, for testing in an adb shell it needs to be issued from su)
The LED can also be activated using the LightFlow app (see thread here: http://forum.xda-developers.com/showpost.php?p=59198021&postcount=22)
Here are instructions for the Tasker app (which allows more flexible control over the LED):
1) Create a Tasker task "Led On If Screen Off"
- Task-Type "Code>Run Shell", set Use-Root to "on", command: echo 64 >/sys/class/leds/charging/brightness
- EDIT: as someone suggested here, alternately (instead of the run.shell command) you can add a Task: Alert>Set-Light>Charging and set slider to 64
- fill in the IF-section: IF %SCREEN equals off
- (the number 64 in the command is the brightness, it can technically run from 1 [dim] to 255 [battery consuming])
2) Create a task named "Led Off"
- Task-Type "Code>Run Shell", set Use-Root to "on", command: echo 0 >/sys/class/leds/charging/brightness
- EDIT: as someone suggested here, alternately (instead of the run.shell command) you can add a Task: Alert>Set-Light>Charging and set slider to 0
3) Create a Profile named "Notify Led On"
- Profile-Type "Event>UI>Notification"
- Owner Application "*" (or any you may like)
- Assign profile to perform task "Led On If Screen Off"
4) Create a Profile named "Notify Click Led Off"
- Profile-Type "Event>UI>Notification Click"
- Assign it to perform task "Led Off"
and/or
5) Create a Profile named "Screen On Led Off"
- Profile-Type "Event>UI>Display>Display On"
- Assign to perform task "Led Off"
Violá ... Tasker will turn on the LED if the display is off and a notification arrives. (Of course other triggers like "State>Battery" can also be linked to the "Led On" task).
Enjoy
Can you say why my echo <brightness> keeps coming back to 0 by itself?
fhreire said:
Can you say why my echo <brightness> keeps coming back to 0 by itself?
Click to expand...
Click to collapse
It should be something like
echo 255 >/sys/class/leds/charging/brightness
And needs to be running in root or superuser, so make sure the command is set to run as root (and you have Tasker allowed in SuperSU or similar apps).
fhreire said:
I don't have the Tasker app, I tried a cracked one to test but it didn't ask me permission for SuperSu, so I guess it's not working, innit?
Click to expand...
Click to collapse
The Use-Root flag must be set in the task.
Probably su echo 64 >/sys/class/leds/charging/brightness as a command will also work.
Or your cracked version is broken (Tasker is worth the money anyway and you can get a refund from PlayStore within a few hours if you don't like).
Otherwise see the link (in the original post) to the thread using LightFlow for the LED
We can make it blink!
shimodax said:
Here are instructions for the Tasker app (which allows more flexible control over the LED):
1) Create a Tasker task "Led On If Screen Off"
- Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 64 >/sys/class/leds/charging/brightness
- fill in the IF-section: IF %SCREEN equals off
- (the number 64 in the command is the brightness, it can technically run from 1 [dim] to 255 [battery consuming])
2) Create a task named "Led Off"
- Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 0 >/sys/class/leds/charging/brightness
3) Create a Profile named "Notify Led On"
Task-Type "Event>UI>Notification", Owner Application "*" (or any you may like) and assign it to task "Led On If Screen Off"
4) Create a Profile named "Notify Click Led Off"
Task-Type "Event>UI>Notification Click", and assign it to task "Led Off"
and/or
5) Create a Profile named "Screen On Led Off"
Task-Type "Event>UI>Display>Display On", and assign it to task "Led Off"
Violá ... Tasker will turn on the LED if the display is off and a notification arrives. (Of course other triggers like "State>Battery" can also be linked to the "Led On" task).
Click to expand...
Click to collapse
Great one! Was looking for some way to turn it on and off.
BTW, you can make it blink softly (like Moto G 2014 and others) by changing the action Led On If Screen Off to the following:
1. Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 1 >/sys/class/leds/charging/brightness
- fill in the IF-section: IF %SCREEN equals off
2. Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 25 >/sys/class/leds/charging/brightness
- fill in the IF-section: IF %SCREEN equals off
3. Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 255 >/sys/class/leds/charging/brightness
- fill in the IF-section: IF %SCREEN equals off
4. Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 25 >/sys/class/leds/charging/brightness
- fill in the IF-section: IF %SCREEN equals off
4. Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: echo 0 >/sys/class/leds/charging/brightness
- fill in the IF-section: IF %SCREEN equals off
6. Task-Type "Task>Wait"
- 10 seconds (or the desired blinking interval)
7. Task-Type "Task>Goto"
- Type "Action number"
- Action number 1
Then, just add the following to the Led Off task:
- Task-type "Task>Stop"
- Task "Led On If Screen Off"
And it should blink until you tap the notification. My hope is that it will decrease the battery consumption to a minimum level.
Hope it helps!
shimodax said:
The Use-Root flag must be set in the task.
Probably su echo 64 >/sys/class/leds/charging/brightness as a command will also work.
Or your cracked version is broken (Tasker is worth the money anyway and you can get a refund from PlayStore within a few hours if you don't like).
Otherwise see the link (in the original post) to the thread using LightFlow for the LED
Click to expand...
Click to collapse
Just bought the app, gonna try that again, thanks.
joaoeder said:
BTW, you can make it blink softly (like Moto G 2014 and others) by changing the action Led On If Screen Off to the following:
...
Click to expand...
Click to collapse
Very cool. Something learned today . Thanks!
joaoeder said:
Then, just add the following to the Led Off task:
- Task-type "Task>Stop"
- Task "Led On If Screen Off"
Click to expand...
Click to collapse
Very cool .
I did my own version so it blinks really smooth, with fade-in and fade-out, and repeating every 5 seconds.
To ensure compatibility, install busybox!
Same as @joaoeder, but put this on Led On If Screen Off
1. Task-Type "Code>Run Shell"
- set Use-Root to "on"
- Command: (ensure that you copy everything in a single line. I recommend to copy & paste )
Code:
l=1;while [ $l -ne 32 ] ;do echo $l >/sys/class/leds/charging/brightness; l=`expr $l + 1`;sleep 0.01;done;sleep 0.5;while [ $l -ne 0 ] ;do l=`expr $l - 1`;echo $l >/sys/class/leds/charging/brightness;sleep 0.01;done
- fill in the IF-section: IF %SCREEN equals off
2. Task-Type "Task>Wait"
- 5 seconds (or the desired blinking interval)
3. Task-Type "Task>Goto"
- Type "Action number"
- Action number 1
Now the led will smoothly fade in for 1/3 second, keep on 1/2 second, and fade out for 1/3 second.
No more crappy slow and noticeable brightness steps! It's almost identical to the stock notification of most phones.
I had issues with tasker, I discovered that I had to reboot the phone each time I made changes for applying them, otherwise it just didn't work
If you want the led to be on for more time, change sleep 0.5 to whatever you want (0.5=1/2 second, 1=1second, 2=2 seconds...etc)
No need to use shell, you can use the build in taster function.
It is under Alert > Set Light, from the drop down menu select charging and use the slider to set the brightness of the Led.
I thought it was said the OS couldn't access this light, nice!
Nedle said:
No need to use shell, you can use the build in taster function.
It is under Alert > Set Light, from the drop down menu select charging and use the slider to set the brightness of the Led.
Click to expand...
Click to collapse
Awesome, didn't see that. Will edit the original post. Thanks!
Nedle said:
No need to use shell, you can use the build in taster function.
It is under Alert > Set Light, from the drop down menu select charging and use the slider to set the brightness of the Led.
Click to expand...
Click to collapse
Now that's news to me. Nice to see it has a built in way to access the led. Thanks for sharing!
Could someone show how the LED looks?
Thanks.
Can this be applied to the 2013 moto x?
Haven't had any luck with tasker yet, i cant get the prompt for root to show. gonna try lightflow and see if i have any luck with it. Do i need to disable moto display and ambient display?
EDIT: Fiddled with lightflow for a while with no luck either. Finally got tasker to show the prompt for SU but it isnt working either. Can't figure what I am doing wrong.
dabyd64 said:
I did my own version so it blinks really smooth, with fade-in and fade-out, and repeating every 5 seconds.
Click to expand...
Click to collapse
Great dude!
wasnt able to get it working on moto x 1st gen either. obviously the implementation differs from the one in the moto x 2nd gen, allthough the paths and the triggers are the same. would have been great to get a notification led....
Gesendet von meinem ghost mit Tapatalk
I can't seem to get this to work on my 2nd Gen Moto X. I can get the tasks to work just fine (turns on/off the LED) but the profiles with the notification and notification click don't work. The light doesn't come on with a notification, with screen on or off, and if I manually turn the light on through the task, I can't get it to turn off with a click on a notification. Any ideas?
akates said:
I can't seem to get this to work on my 2nd Gen Moto X. I can get the tasks to work just fine (turns on/off the LED) but the profiles with the notification and notification click don't work. The light doesn't come on with a notification, with screen on or off, and if I manually turn the light on through the task, I can't get it to turn off with a click on a notification. Any ideas?
Click to expand...
Click to collapse
Using moto display? Clicking a notification through moto display isnt registered as notification click unfortunately.
Try setting notification + display state off to turn on the led for notifications.
Good luck and cheers
Sent from my XT1092 using XDA Free mobile app
Guys, I'm having some issues with the led.
First I've rooted my phone and tried to make the led blink using tasker and Stock ROM, but I have no success.
The second time, I've flashed temasek ROM (with some led options like blink duration and speed) but didn' t worked too.
The third time I've tried with tasker and the custom ROM. No success
To sum up my situation I can't make the led blink, it turns on but still on continuosly when the screen is off.
I would like to know if someone made the led blink with success.
Sorry about bad english
Sent from my victara using XDA Free mobile app
Just to let you guys know, you can have the charging indicator as a notification light if you have
1) root
2) tasker or another similar application.
The command to use the led is
Echo X > /sys/class/leds/charging/brightness
X to be substituted for values 0,1,2,3.
0 = off
1 = fast blink
2 = slow blink
3 = solid
Unfortunately the led is only white but beggars can't be choosers.
You need 2 profiles, one for when the notification comes on, and one for when the notification is removed.
I have a basic understanding of Tasker. Once these 2 profiles are created do I need to do anything else for my apps such as messaging or email to use them? Would you be able to attach your profiles?
Profile: Notification (2)
Event: Notification [ Owner Application:Facebook, Instagram, Messenger, Messages, TypeApp, WhatsApp, Push Notification Tester Title:* Text:* Subtext:* Messages:* Other Text:* Cat:* New Onlyff ]
Enter: Light (3)
A1: Run Shell [ Command:echo 2 > /sys/class/leds/charging/brightness Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
Profile: Notification Removed (4)
Event: Notification Removed [ Owner Application:* Title:* Text:* Subtext:* Other Text:* Cat:* ]
Enter: Light Off (5)
A1: Run Shell [ Command:echo 0 > /sys/class/leds/charging/brightness Timeout (Seconds):0 Use Rootn Store Output In: Store Errors In: Store Result In: ]
Thank you for the quick reply. Would it be possible for you to backup your profiles and attach the xml file here for easy import?
governmentissuejoe said:
Thank you for the quick reply. Would it be possible for you to backup your profiles and attach the xml file here for easy import?
Click to expand...
Click to collapse
Here you go
The LED was always used for notifications for me on LineageOS, without needing any additional applications.
BtbN said:
The LED was always used for notifications for me on LineageOS, without needing any additional applications.
Click to expand...
Click to collapse
That's lineageos. Unfortunately for those of us who want to use stock we have not much of a choice.
Apart from promoting Moto App where you have notifications on screen, I see no reason why we can't use LED for notification without root. It'll be very useful...
davtse said:
...
Echo X > /sys/class/leds/charging/brightness
0 = off
1 = fast blink
2 = slow blink
3 = solid
...
Click to expand...
Click to collapse
Great find! Unfortunately it is not working overly well on my Moto Z Play. The LED blinks very erratically. I even tried scripting my own blink pattern with the following code:
Code:
Run echo 3 > /sys/class/leds/charging/brightness
Wait 2 seconds
Run echo 0 > /sys/class/leds/charging/brightness
Wait 2 seconds
Goto start
Sometimes, the LED lights up for 2 seconds and goes dark for 2 seconds. Other times I see the LED blinking for a split second, and going dark for ~3.5 seconds. Something seems to interfere or the LED reacts slowly at times.
Btw., I am running the official Lenovo Marshmallow.
daniel_m said:
Great find! Unfortunately it is not working overly well on my Moto Z Play. The LED blinks very erratically. I even tried scripting my own blink pattern with the following code:
Sometimes, the LED lights up for 2 seconds and goes dark for 2 seconds. Other times I see the LED blinking for a split second, and going dark for ~3.5 seconds. Something seems to interfere or the LED reacts slowly at times.
Btw., I am running the official Lenovo Marshmallow.
Click to expand...
Click to collapse
It's doze or some stock power save feature i think. I have the same problem on stock. Sigh.
davtse said:
It's doze or some stock power save feature i think. I have the same problem on stock. Sigh.
Click to expand...
Click to collapse
I don't know if you have xposed installed, but if so, you can try the AppContext module.
https://forum.xda-developers.com/xposed/modules/appcontext-application-context-tasker-t3623272
governmentissuejoe said:
I don't know if you have xposed installed, but if so, you can try the AppContext module.
https://forum.xda-developers.com/xposed/modules/appcontext-application-context-tasker-t3623272
Click to expand...
Click to collapse
The notification detection isn't the issue, the system seems to go wonky when the screen goes off, its like the led timer isn't consistently firing off the alarm.
davtse said:
The notification detection isn't the issue, the system seems to go wonky when the screen goes off, its like the led timer isn't consistently firing off the alarm.
Click to expand...
Click to collapse
In order to test my task, I ran it with "screen on". Therefore I didn't even think about doze or other power saving mechanisms.
Damn-it! It is working correctly now
I didn't change anything in tasker. I use the following settings: "Run In Foreground -> On", "Show Notification Icon -> On", "Use Reliable Alarms -> Never" and "Reduce Resource Usage -> On"
Weird... Mine only seems to go wonky when the screen has been off for a while.
Hi, does anyone know how to change the power-off timeout on the Nook Simple touch? When it automatically switches off and leaves a screen saying "Your Nook has been turned off to conserve battery power" or something.
I've looked in /data/data/com.android.providers.settings/databases/settings.db but there is no setting available.
Pkill-9 said:
Hi, does anyone know how to change the power-off timeout on the Nook Simple touch? When it automatically switches off and leaves a screen saying "Your Nook has been turned off to conserve battery power" or something.
I've looked in /data/data/com.android.providers.settings/databases/settings.db but there is no setting available.
Click to expand...
Click to collapse
What do you mean by "power-off timeout"? That screen appears only when you have intentionally shut down your device by long pressing the power button and then confirming through the onscreen dialog that you want to power off the device.
Or are you talking about the forced shutdown when the device decides there is not enough battery power to stay on?
The only "timeout" I can think of is the screensaver timeout which is found in Settings.
nmyshkin said:
What do you mean by "power-off timeout"? That screen appears only when you have intentionally shut down your device by long pressing the power button and then confirming through the onscreen dialog that you want to power off the device.
Or are you talking about the forced shutdown when the device decides there is not enough battery power to stay on?
The only "timeout" I can think of is the screensaver timeout which is found in Settings.
Click to expand...
Click to collapse
My Nook will shutdown at 60% battery power, or 40%, or 20% or something, and it will say that. I remember the word in particular is 'conserve'. I think when it's run out of battery it says something different.
Is there another way to have it shutdown after a period of time? I've seen a thread about using Tasker, but you have to purchase that from the Google Play store. I'd prefer to use a script or something.
Pkill-9 said:
My Nook will shutdown at 60% battery power, or 40%, or 20% or something, and it will say that. I remember the word in particular is 'conserve'. I think when it's run out of battery it says something different.
Is there another way to have it shutdown after a period of time? I've seen a thread about using Tasker, but you have to purchase that from the Google Play store. I'd prefer to use a script or something.
Click to expand...
Click to collapse
It should not be shutting down until it's in the 20's, maybe less. Something is not right--but you knew that.
The question is, hardware or software? If it's software and you do a backup, factory reset and restore the backup, you may be right back where you started. If it's hardware, nothing you do will fix it.
A third option is to do a factory restore and rebuild your system, rather than restore a potentially corrupted backup. That way if it's not hardware, you may solve the problem.
As an afterthought, there are some "battery recalibration" apps out there--not sure if any for Eclair, though. I'm a little leery of their promises, but it might be another thing to look into.
Tasker can do many things, but I'm not sure this is one of them. There is only one version that runs on the NST. PM me for more info if you want to go that route.
I think I will make an app that does what I want. Where can I find documentation on Android 2.1 and/or information on building an app for Android 2.1? I can't find any on google, nor and the official documentation seems to only be for the newest Android versions.
Pkill-9 said:
I'd prefer to use a script or something.
Click to expand...
Click to collapse
You can prepare custom tailored file named "debuglog.sh".
Then put it into /system/bin folder.
NST's android will run it every ~10 seconds.
ucy74 said:
You can prepare custom tailored file named "debuglog.sh".
Then put it into /system/bin folder.
NST's android will run it every ~10 seconds.
Click to expand...
Click to collapse
Thanks, this is working really well.
EDIT: I did it! I used wake locks to keep the script running when suspended, here is my final script, which will shutdown the nook if it is in sleep mode for a day:
Code:
#!/system/bin/sh
# debuglog.sh is an unused path, with a service definition in /init.rc that calls this file. init.rc can't be modified because the root filesystem is created from an
# I am using debuglog.sh for my shutdown script, and if I have any other scripts I want to run in the future, I can use it for that.
wakeup_timeout=86400
wait_until_sleep() {
cat /sys/power/wait_for_fb_sleep # https://stackoverflow.com/a/11275032
}
echo shutdown-on-sleep >/sys/power/wake_lock # Prevent this process from suspending when the device is suspended: https://stackoverflow.com/a/40518240
while
do
wait_until_sleep
timeout -t $wakeup_timeout cat /sys/power/wait_for_fb_wake
if [[ $? -ne 0 ]] ; then # If the command timed out, then it reached the scheduled shutdown timeout. If the command succeeded, then the Nook was awoken from it's slu
reboot -p
fi
done
I will check that running the script doesn't significantly increase battery consumption. If not, then this should be very very helpful in extending the battery life
---------------------------------------------------------------------------
Old post:
I've created a script, but I can't seem to get the NST to wakeup when scheduled. This is the script I am using:
Code:
#!/system/bin/sh
# debuglog.sh is an unused path, with a service definition in /init.rc that calls this file. init.rc can't be modified because the root filesystem is created from an image.
# I am using debuglog.sh for my shutdown script, and if I have any other scripts I want to run in the future, I can use it for that.
wakeup_timeout=60
get_current_unix_time() {
date '+%s'
}
set_wakeup_timeout() {
#echo $wakeup_timeout > /sys/power/wakeup_timer_seconds
echo $(expr $(get_current_unix_time) + $wakeup_timeout) > /sys/class/rtc/rtc0/wakealarm
}
wait_until_sleep() {
cat /sys/power/wait_for_fb_sleep # [url]https://stackoverflow.com/a/11275032[/url]
}
wait_until_wake() {
cat /sys/power/wait_for_fb_wake #
}
set_wakeup_timeout
while
do
wait_until_sleep
went_to_sleep=$(get_current_unix_time)
scheduled_wakeup=$(expr $(get_current_unix_time) + $wakeup_timeout)
wait_until_wake
if expr $(get_current_unix_time) \> $(expr $scheduled_wakeup - 5) ; then
reboot -p
fi
done
Pkill-9 said:
I did it!
Click to expand...
Click to collapse
You can check also parameters shown via
Code:
cat /sys/class/power_supply/bq27510-0/uevent
or drain percentage directly
Code:
cat /sys/class/power_supply/bq27510-0/capacity
but remember not to drain battery completely!
nook cannot wakup easily from case like this
So after running my script for the night, the battery has gone down by 11%, so running it with a wakelock is not a viable solution.
Ideally I could have the kernel schedule wake-ups, like I was trying before, but I can't seem to do that.
Apparently /dev/alarm is used by Android to schedule wakeups, but everything I find talks about using it from an app, instead of writing to it directly from commandline.
Pkill-9 said:
...battery has gone down by 11%...
Click to expand...
Click to collapse
What service/task would You like to keep running against battery saving? Epaper driver may be power hungry, but maybe You can turn off some android services or wifi driver?
ucy74 said:
What service/task would You like to keep running against battery saving? Epaper driver may be power hungry, but maybe You can turn off some android services or wifi driver?
Click to expand...
Click to collapse
The script is what eats up battery, nothing much I can do to improve it, it's running the 'timeout cat ...' command.
I'm a little late to the thread, but I use a simple app called AutoPowerOff to control this. It doesn't seem to have any affect on battery when the system is on.
AutoPowerOff for Android - APK Download
Download AutoPowerOff apk 1.0.2 for Android. Auto power off your device to save battery life.
apkpure.com
In the app itself, you can only set the timeout to a maximum of 23 hours 59 minutes. I wanted a bit of a longer timeout, though, and found that if you edit the app's settings XML file in /data/data, you can set whatever timeout you want. I use 72 hours, which is perfect for my habits. If I go three days without using my Nook, usually it means I'm going to go a few weeks. This way, I still have a nice charged battery when I do come back.