[MOD] Custom LED Notification Control for Moto G (2014) - G 2014 Android Development

REQUIREMENTS:
Moto G 2014 (Tested on XT1068/69)
Root
DISCLAIMER:
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards, BURNT LEDs,
* thermonuclear war, or you getting fired because the alarm app failed.
* YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
INTRO:
Using the steps mentioned in this post you'll be able to use the Moto G (2014) front notification LED for notifying you based on various triggers. Be careful while editing the files mentioned in this post. Lets begin....
INSTRUCTIONS:
Using your favorite File Manager navigate to the following file on your rooted Device:
Code:
[B]/etc/init.qcom.post_boot.sh[/B]
Now add the following lines at the end of the file: (Replace REPLACE ME WITH TRIGGER with the triggers provided at the end of the post:
Code:
# enabling LED based on custom triggers
echo "[B]REPLACE ME WITH TRIGGER[/B]" >/sys/class/leds/white/trigger
echo "1" >/sys/class/leds/white/brightness
Now choose the condition/trigger to activate the LED (I've only tested one trigger at a time. Multiple triggers may cause instability. Experiment at your own risk!):
TRIGGERS:
usb-online (lights up when USB connected)
battery-charging-or-full (full time ON LED when charging or charged)
battery-charging (full time ON LED when charging)
battery-full (full time ON LED when charged)
battery-charging-blink-full-solid (blinks until charged)
Now save the file and reboot and enjoy!!
Let me know your comments and suggestions below.
Cheers
Krishna Sagar

Reserved by OP

Or you may root, modify the files and then do a full unroot. This will keep the changes on the device as well

Thanks for sharing! You can also use trickster mod to customize your led.
Is our led only white?
Sent from my XT1063/64 using XDA Free mobile app

Yes. There a re 2 LED actually under that light. One dim and the other one is bright.
But No RGB... It is only White!

Interferes with LED activity on notifications?
First off, I love this mod - I really like my phone LED to show me my phone is charging But when I set it to show charging, it seems to prevent any incoming messages or emails from activating the LED notifcations. (I tried both the solid LED & the flashing one. Note that with the flashing-on-charge option, the led seems to keep flashing when I unplug the charger before the battery is full, no matter what I do -kind of annoying!)
So - anyone know how to use these settings so that the LED indicates charging AND still responds to event notifications?

KrishnaSagar said:
Yes. There a re 2 LED actually under that light. One dim and the other one is bright.
But No RGB... It is only White!
Click to expand...
Click to collapse
When does the dim one come on?
Sent from my XT1063/64 using XDA Free mobile app

??
How to disable the notification light when the phone is charging?

EduardoMarshall said:
How to disable the notification light when the phone is charging?
Click to expand...
Click to collapse
Use another trigger or Remove these lines and reboot to remove!

Or place the simbol # at first of the two last lines.

KrishnaSagar said:
Yes. There a re 2 LED actually under that light. One dim and the other one is bright.
But No RGB... It is only White!
Click to expand...
Click to collapse
Hmm found something interesting
There actually exists an rgb in sys/class/leds/rgb but idk if it does mean anything.

Anas Karbila said:
Hmm found something interesting
There actually exists an rgb in sys/class/leds/rgb but idk if it does mean anything.
Click to expand...
Click to collapse
It doesn't matter that it says rgb because the led is a white led and won't do colors.

Tel864 said:
It doesn't matter that it says rgb because the led is a white led and won't do colors.
Click to expand...
Click to collapse
I got the red led to show up but i need to somehow increase the brightness
In terminal type:
Su
Echo /sys/class/leds/rgb/trigger
Then download an led controll app like light manager open an task change color to red an press test then turn off the screen and you will see a red led light up under the speaker.
It is hard to see it even at night so you will have to look closely to find it.

The red light you're seeing is the infrared distance sensor that turns the screen on and off when you're in a call.

Tel864 said:
The red light you're seeing is the infrared distance sensor that turns the screen on and off when you're in a call.
Click to expand...
Click to collapse
Could be but it lights up when i select the red led in light manager and test it then the white one doesnt light up.

used an app for this but that did nothing
used pinkman kernel with synapse but that started blinking my screen lol
now gonna try this.

I want to show led when my phone charged full and when I connected any USB like pen drive so I used battery-full and usb-online trigger but my led blink even my phone not fully charged and led not blink when I connected any USB pen drive any solution?

its not working for me . i copy pasted it and replaced the trigger but doesnt work. i did reboot btw

Trickster mod from the playstore has led control.
You can even set your led to flash with disk activity, just like your computer! Neat! Jk but yeah.
Sent from my Moto G 2014 using XDA Free mobile app
---------- Post added at 12:34 PM ---------- Previous post was at 12:31 PM ----------
Thecrazyskull said:
Could be but it lights up when i select the red led in light manager and test it then the white one doesnt light up.
Click to expand...
Click to collapse
If the red light is between the speaker and the display, its your proximity sensor.
Sent from my Moto G 2014 using XDA Free mobile app

Related

Notification LED light does not work AT ALL, EVER!

My Verizon Galaxy Nexus does not seem to even include a notification light. Although I see and read about a notification bottom middle of the front of the phone. Mine simply does not work at all and never has. Anyone know of this issue and may offer advice? I have downloaded light flow lite and have had no success, also downloaded LED tester apps and it still doesn't work. Please help.
Have you turned on the notification light in settings? Settings > Display > Pulse Notification Light
Yes.
Play Store > Light Flow > Your welcome
I have already installed light flow. Still not notification LED ever. I have had test SMS sent over and over with no response from the LED. Pulse notification light set, light flow set ON in accessability. All software is set to turn the LED on, the light itself is just not lighting up..
PLEASE HELP
Is it possible Verizon my only option here?
As a test, download an app called "Galaxy Nexus Led" from the market
Enable it and then plug ur charger and turn ur screen off
I think the Nexus's led only works when the screen is off
Sent from my Galaxy Nexus
Galaxy Nexus LED did not work either. Light will not show
bradleyyy said:
Galaxy Nexus LED did not work either. Light will not show
Click to expand...
Click to collapse
Take it to VZW and request a new device for the LED not working. You're not the first person I've seen with the issue, and you probably won't be the last to have the problem either.
I've had the same LED-Error... but i solved it.
At first... I'm shure that your LED is not broken. Cause... it is a LED
Before you read the rest of my message, check if you REALY activate your LED in the PhoneSettings and in any app you've allowed to controll the LED. If you're using LightFlow don't forget to activate it in the "Device-Admin-Settings" of your Phone.
Now try a test...
If your LED is not working ... format your cache and dalvicCache partition ... afterwards, it MUST work.
DasRohr said:
I've had the same LED-Error... but i solved it.
At first... I'm shure that your LED is not broken. Cause... it is a LED
Before you read the rest of my message, check if you REALY activate your LED in the PhoneSettings and in any app you've allowed to controll the LED. If you're using LightFlow don't forget to activate it in the "Device-Admin-Settings" of your Phone.
Now try a test...
If your LED is not working ... format your cache and dalvicCache partition ... afterwards, it MUST work.
Click to expand...
Click to collapse
Tried this and it still didn't work ^^

[Q] Light flow/LED problem

I just switched from a Nexus 4 to a HTC One M8 GPe. On the Nexus 4 I used Light flow very much with many colors and blink patterns to be able to identify what was happening without turning on the screen. Now when I have installed Light flow on my M8 it's only possible to choose from 4 colors or something and no blink patterns.
Is this possible to fix?
Great phone but this really bothers me...
djr83 said:
I just switched from a Nexus 4 to a HTC One M8 GPe. On the Nexus 4 I used Light flow very much with many colors and blink patterns to be able to identify what was happening without turning on the screen. Now when I have installed Light flow on my M8 it's only possible to choose from 4 colors or something and no blink patterns.
Is this possible to fix?
Great phone but this really bothers me...
Click to expand...
Click to collapse
Someone can correct me if I'm wrong, but I believe that it is due to the limitations of the LED on the M8 vs the N4. It's a different type of LED so there isn't an ability to tinker with it as much.
I miss that from my N4 too, but ultimately as soon as I saw/see a notification light I check the phone anyway.
Ruxin said:
Someone can correct me if I'm wrong, but I believe that it is due to the limitations of the LED on the M8 vs the N4. It's a different type of LED so there isn't an ability to tinker with it as much.
I miss that from my N4 too, but ultimately as soon as I saw/see a notification light I check the phone anyway.
Click to expand...
Click to collapse
I suspected this but before I got the M8 I didn't even realize that it would have anything else than the best LED. But yeah, 90% of the times It's just a message of some kind so I guess I'll survive. Still annoying though...
djr83 said:
I just switched from a Nexus 4 to a HTC One M8 GPe. On the Nexus 4 I used Light flow very much with many colors and blink patterns to be able to identify what was happening without turning on the screen. Now when I have installed Light flow on my M8 it's only possible to choose from 4 colors or something and no blink patterns.
Is this possible to fix?
Great phone but this really bothers me...
Click to expand...
Click to collapse
Not only is it not possible to fix because of the limitation of the LED that the other poster mentioned, but I'd be shocked if Light Flow gives you any color other than green and if it works consistently.
I had messed around with it some a couple of weeks ago, and gave up. I guess it's possible the Light Flow developer has tweaked it since then, but the version I was using was pretty useless on the M8. I don't fault the Light Flow developer though. I blame HTC on this one.
Andyw2100 said:
Not only is it not possible to fix because of the limitation of the LED that the other poster mentioned, but I'd be shocked if Light Flow gives you any color other than green and if it works consistently.
I had messed around with it some a couple of weeks ago, and gave up. I guess it's possible the Light Flow developer has tweaked it since then, but the version I was using was pretty useless on the M8. I don't fault the Light Flow developer though. I blame HTC on this one.
Click to expand...
Click to collapse
I was able to get green and amber to work. Some colors would just pick green or amber, others just wouldn't do anything.
Andyw2100 said:
Not only is it not possible to fix because of the limitation of the LED that the other poster mentioned, but I'd be shocked if Light Flow gives you any color other than green and if it works consistently.
I had messed around with it some a couple of weeks ago, and gave up. I guess it's possible the Light Flow developer has tweaked it since then, but the version I was using was pretty useless on the M8. I don't fault the Light Flow developer though. I blame HTC on this one.
Click to expand...
Click to collapse
Yeah, it seems to work pretty bad. Are there any other ways to control the LED like Light flow? Does it work better if you just let all the apps control it themselves? I guess not?
I was able to get green and amber to work.
Green, deep orange, magenta and cyan works for me, but green and cyan shows as green/yellow on the LED and deep orange and magenta shows as orange.
Messed around with the LED settings in Textra after I disabled Light flow and suddenly it actually started to blink. Great improvement!
Is it possible to get it to blink in Light flow too?
Edit: Yes, enable color mixing.
djr83 said:
Green, deep orange, magenta and cyan works for me, but green and cyan shows as green/yellow on the LED and deep orange and magenta shows as orange.
Click to expand...
Click to collapse
This is excellent information! Thanks. I'm going to have to reinstall Lightflow and take another whack at it!
---------- Post added at 06:39 PM ---------- Previous post was at 06:38 PM ----------
djr83 said:
Messed around with the LED settings in Textra after I disabled Light flow and suddenly it actually started to blink. Great improvement!
Is it possible to get it to blink in Light flow too?
Edit: Yes, enable color mixing.
Click to expand...
Click to collapse
I use Textra too, so will have to try this as well. Thank you!
Andyw2100 said:
This is excellent information! Thanks. I'm going to have to reinstall Lightflow and take another whack at it!
---------- Post added at 06:39 PM ---------- Previous post was at 06:38 PM ----------
I use Textra too, so will have to try this as well. Thank you!
Click to expand...
Click to collapse
Maybe I was unclear. To get it to flash in light flow you just need to enable mix and choose flash under the right color. This is not specific for Textra, but Textra can flash the Led by itself, without Light flow.
I've really tried getting it to work, but needed to put it in Direct Mode to get the LED with permanent light when lit, instead of flashing.
But in this mode the LED is dimmed even though the settings are set to 100% brightness in lightflow.
To get the LED 100% brightness I needed to remove Direct Mode and accept that permanent light instead didn't work, and live with flashing LED. Hence, not very different control than the standard setup i the Sense rom.
Any clues?
duckstardeluxe said:
I've really tried getting it to work, but needed to put it in Direct Mode to get the LED with permanent light when lit, instead of flashing.
But in this mode the LED is dimmed even though the settings are set to 100% brightness in lightflow.
To get the LED 100% brightness I needed to remove Direct Mode and accept that permanent light instead didn't work, and live with flashing LED. Hence, not very different control than the standard setup i the Sense rom.
Any clues?
Click to expand...
Click to collapse
Try direct mode, root mode and HTC alternative mode. All three at once.
With that Setting the led is always permanent on dimmed like 20% through mixer and also standard control.
Sendt fra min HTC One_M8 med Tapatalk
djr83 said:
Maybe I was unclear. To get it to flash in light flow you just need to enable mix and choose flash under the right color. This is not specific for Textra, but Textra can flash the Led by itself, without Light flow.
Click to expand...
Click to collapse
Yes, I had the LED flashing green from Textra, without Lightflow. But the Textra reminder options are so limited, I'd really prefer to use Lightflow if I can get it working properly.
duckstardeluxe said:
With that Setting the led is always permanent on dimmed like 20% through mixer and also standard control.
Sendt fra min HTC One_M8 med Tapatalk
Click to expand...
Click to collapse
Then I dont know. Works perfect for me. Really bright too. Have you turned off LED notification in screen settings?
I've been fooling around with this a lot since hearing the news that it was working.
I think I've got it working pretty well to my satisfaction now. As I was messing with settings, some of which I may have inadvertently checked (like the Samsung always on setting) I saw a number of interesting behaviors.
One was that at one point my basic notification was, instead of just the green LED flashing, a combination of alternating green and amber colors. (I'm not sure what I did, so don't ask me to reproduce it.)
At some other point I had the LED staying on even with the screen on.
There were other issues, though, when those things were happening. So I kept monkeying with the settings, and I think while neither of those things are happening now, for the most part Lightflow is working acceptably well. I actually would like it if the LED --could-- be on while the screen is on.
Also unless I am mistaken, after an alert, if the screen is turned on but the alert is not cleared, when the screen is turned off, the LED will not come back on. Is this what you two are experiencing as well? I'm pretty sure with my last phone if the alert was not cleared, the LED would continue to flash.
Thanks.
Andyw2100 said:
I've been fooling around with this a lot since hearing the news that it was working.
I think I've got it working pretty well to my satisfaction now. As I was messing with settings, some of which I may have inadvertently checked (like the Samsung always on setting) I saw a number of interesting behaviors.
One was that at one point my basic notification was, instead of just the green LED flashing, a combination of alternating green and amber colors. (I'm not sure what I did, so don't ask me to reproduce it.)
At some other point I had the LED staying on even with the screen on.
There were other issues, though, when those things were happening. So I kept monkeying with the settings, and I think while neither of those things are happening now, for the most part Lightflow is working acceptably well. I actually would like it if the LED --could-- be on while the screen is on.
Also unless I am mistaken, after an alert, if the screen is turned on but the alert is not cleared, when the screen is turned off, the LED will not come back on. Is this what you two are experiencing as well? I'm pretty sure with my last phone if the alert was not cleared, the LED would continue to flash.
Thanks.
Click to expand...
Click to collapse
When the LED is alternating between two colors (or more on other phones) it's probably two (or more) notifications and you've got the settings to loop through them all. Standard setting is to do this when you have the charger plugged in IIRC.
The LED is working with the screen on for me and I think it always has on the M8. On my Nexus 4 it turns off when I turn on the screen and the LED turns on again if I don't clear it and turn off the screen. Great if you don't want to read the message right now and still don't want to miss it later. Since the LED is always working wether or not the screen is on, this is not a problem on the M8.
But if it's possible to alternate with both colors on the same notification, that would be a great way to get a third "color". Could you check if it is like I said or if it really is dual color?
EDIT:
I got it to work! In mixer you can set one color to solid and one to flash to get both. So there are actually a difference on green + amber and amber + green. This will give us a total of 6 options: green, flashing green, orange, flashing orange, orange + flashing green, green + flashing orange.
EDIT2:
The non-flashing color isn't very strong, so I'm not sure how useful this really is.
http://youtu.be/CIRPbcZqV0U
djr83 said:
When the LED is alternating between two colors (or more on other phones) it's probably two (or more) notifications and you've got the settings to loop through them all. Standard setting is to do this when you have the charger plugged in IIRC.
The LED is working with the screen on for me and I think it always has on the M8. On my Nexus 4 it turns off when I turn on the screen and the LED turns on again if I don't clear it and turn off the screen. Great if you don't want to read the message right now and still don't want to miss it later. Since the LED is always working wether or not the screen is on, this is not a problem on the M8.
But if it's possible to alternate with both colors on the same notification, that would be a great way to get a third "color". Could you check if it is like I said or if it really is dual color?
EDIT:
I got it to work! In mixer you can set one color to solid and one to flash to get both. So there are actually a difference on green + amber and amber + green. This will give us a total of 6 options: green, flashing green, orange, flashing orange, orange + flashing green, green + flashing orange.
EDIT2:
The non-flashing color isn't very strong, so I'm not sure how useful this really is.
http://youtu.be/CIRPbcZqV0U
Click to expand...
Click to collapse
It was definitely not really two notifications, though it is somehow possible that Lightflow was acting as if it were. The alternating was definitely like the alternating LED colors that I used to see on my last device when it was alternating between notifications.
I can't reproduce it because I don't know what crazy combination of settings I had at the time. The Samsung always on setting was probably involved. It's even possible I had incorrect checked the Samsung root mode. I was really trying lots of things, and not sure of what I was doing.
Right now, as you suggested, I have Direct Mode, Root Mode, and HTC Alternative driect mode all checked.
I have all LED notifications turned off in Settings/Display and Gestures/Notification Light.
I have Textra set to not notify me in any way, and am using LighFlow for notifications and repeat notifications.
I have not tested things much, so I really don't know how well it is working, but it basically seems to be, though I definitely do not have the LED staying lit with the phone on, or after I turn it on and then back off.
I wonder if some of the differences we are seeing could be due to versions of the phone, rooting procedures, etc. My phone is the Verizon version, and I used Weaksauce to gain root access. Could this make a difference?
Again, many thanks!
It is not possible to fix because of the limitation of the LED.

LED notification

Hey guys,
I just wanted to check if Moto Z play has LED notification. I just read somewhere that this device does not have one. But wanted to confirm.
If this is true, I have to look for another device.
Thanks
No doesn't have notification light more a on screen notification , like if a gumtree message comes through and the screen is off It shows a tree in a dim white at the bottom
Sent from my XT1635-02 using Tapatalk
Moto hasnt had led notification since they had moto display.
Sent from my SM-T280 using Tapatalk
It actually has a hidden LED as every moto device. On CyanogenMod I've already repurposed it as notification LED.
Alberto97 said:
It actually has a hidden LED as every moto device. On CyanogenMod I've already repurposed it as notification LED.
Click to expand...
Click to collapse
Already a cyanogem for our device? Care to share?
Enviado de meu XT1635-02 usando Tapatalk
If it's like the Droid Turbo it has a "charging LED" that can be used with root
If u root there's a app that can make the front flash work as a notification
Sent from my XT1635-02 using Tapatalk
https://play.google.com/store/apps/details?id=net.megawave.flashalerts
I use this in my moto x style
Thank you guys for sharing the information
I saw the LED on our Moto Z play, when you connect the turbocharger with the phone turned off, you can clearly see a white led (not the flash) blinking briefly in the zone of the proximity sensors.
Yeah there is something between the front camera and speaker, maybe someone can configure it for notification
I used led control app to make it work. It is only white. And it didn't make it work for notifications. Only when charging, or usb, or using internal, or external memory.
brun3llo said:
I saw the LED on our Moto Z play, when you connect the turbocharger with the phone turned off, you can clearly see a white led (not the flash) blinking briefly in the zone of the proximity sensors.
Click to expand...
Click to collapse
Every moto has that it's a battery indicator not a notification led
Sent from my XT1635-02 using Tapatalk
We don't need a notification LED when we have the awesome Moto Display.
FreedFromDeath said:
We don't need a notification LED when we have the awesome Moto Display.
Click to expand...
Click to collapse
OK, but to see if I've a notification I've to wave the screen while the LED is "automatic"
Sent from my XT1635-02 using Tapatalk
Tasker is capable of using this LED and you can set it up to function as a notification light. I do it with my Droid Turbo.
Cobra04 said:
Tasker is capable of using this LED and you can set it up to function as a notification light. I do it with my Droid Turbo.
Click to expand...
Click to collapse
Could you post the steps in the tasker for making the led work as notification led? I tried writing the commands in the console but nothing happen
2wire50 said:
Could you post the steps in the tasker for making the led work as notification led? I tried writing the commands in the console but nothing happen
Click to expand...
Click to collapse
This may or may not work on the Z Play. You will need root.
BACKUP FIRST JUST IN CASE!
I have it setup to only turn on if the screen is off.
Task 1 (LED on): if %SCREEN ~ Off
Set light - set charging to 1
End if
Task 2 (LED off): set light - set charging to 0
For profiles do this for each app you want to have set off the LED if you don't want it going off for every notification. Otherwise don't choose an application and it'll go off for any notification:
event > UI > notification. Choose an application (optional) then have this profile perform Task 1.
To turn off the LED I have it go off when I turn the screen on.
Event > display > display on and have this perform Task 2.
I'm sure this can be improved but this is how I have it set up right now.

How to use LED notification on the Moto G Power - root required.

Edit: It can be done, see these videos!
https://youtu.be/fdvkuyd491w?t=72
https://youtu.be/FK6Bn8E_j1Q
harryspar said:
Edit: It can be done, see these videos!
https://youtu.be/fdvkuyd491w?t=72
https://youtu.be/FK6Bn8E_j1Q
Click to expand...
Click to collapse
I saw the notification light as well and enabled it via e x kernel manager apk.
Your suggestion and instructions was spot on.
Thanks...
Works great!!!
I watched the videos. It almost appears the LED blinks in the 2nd video. But am I correct in saying the notification LED does not blink?
zapjb said:
I watched the videos. It almost appears the LED blinks in the 2nd video. But am I correct in saying the notification LED does not blink?
Click to expand...
Click to collapse
I'm curious about this also. If notification doesn't blink this is useless.
jhjhjhjhjhjh said:
I saw the notification light as well and enabled it via e x kernel manager apk.
Your suggestion and instructions was spot on.
Thanks...
Works great!!!
Click to expand...
Click to collapse
How did you enable it using EX kernel manager?
I've tried this. It doesn't blink. Within the software, the Charging LED doesn't have a blink option, only solid.
I'd personally set the LED to only be on when I've missed a call or text since I don't care about emails.
Yes, I remember it being the same way on the G7 Power, and then I found out that it had a LED by installing one of the custom roms which had taken the time to add some custom features allowing full control of it. If it can be solid, it can also blink, it's just a matter of programming it that way, perhaps a developer could figure it out.

Status LED - for notifications?

Hi, could any one tell me if the charging LED also works as a notification light? Cheers.
Yes, notification led works when charging. When battery became full charged, then led turns off.
Hi thanks for that - I don't think I worded it right
Does the led does function as a notification light? (as well as a charging light)
Cheers
Yes, LED works also for notifications, but it is almost invisible. One must check the phone at specific angle to see the led.
_mysiak_ said:
Yes, LED works also for notifications, but it is almost invisible. One must check the phone at specific angle to see the led.
Click to expand...
Click to collapse
Thank you for that - that's what I needed to know - I've ordered it cheers
_mysiak_ said:
Yes, LED works also for notifications, but it is almost invisible. One must check the phone at specific angle to see the led.
Click to expand...
Click to collapse
Yes it is almost invisible. And i noticed that the LED is only in white. I can't make whatsapp flash it in green or red.

Categories

Resources