Original source (for MotoG) <<< make sure you read the blog article before commenting ....
dedicated Blog article for MotoE
It's always cool to know at a glance that your device is charging without the need of lighting the screen, here is how:
Requirements :
in /sys/class/leds/charging/trigger we have these triggers available :
easy to change them using :
needs to set any value !=0 for brightness (LED is either ON or OFF on MotoE):
Moto E (is quite different than Moto G MotoG has two LEDs too, they are simply impossible to see):
If you pay attention, you can se that Moto E has Two little white LEDs soldered under the LED hole, the first one (left) is ruled by /sys/class/leds/charging and the second one (less bright, ont the right) is ruled by the /sys/class/leds/white.
/sys/class/leds/white/trigger, and /sys/class/leds/white/brightness configure the right LED and these settings are overridden has soon as a notification comes.
/sys/class/leds/charging/trigger and /sys/class/charging/brightness configure the left LED (the brighter one) and these settings are not overridden by notifications AND both can work toghether:
You can see the left one kept ON while charging (using battery-charging trigger) and the right one Blinking with an incoming notification.
It is time for the community to help, and we will find out a way to correctly dim the LEDs if possible.
For now, the best way is to set left LED (/sys/class/leds/charging/) for charging using dedicated trigger and keeping the right one to none and get both working together this way.
Set at boot:
WARNING : if you fail this, you may screw up your device ... (keep a backup somewhere)
For whose who asked, here is the proof of the 2 LEDs and their White-color :
http://forum.xda-developers.com/showpost.php?p=57039807&postcount=7

Feel free to test further and report your discoveries!
The above has been tested on stock rooted ROM, and reported to work on CM11-m12, both on XT1022.
Here is the LED related Thread for MotoG
XDA:DevDB Information
[LED][DEV] Moto E LED Custom Controls, Tool/Utility for the Moto E
Contributors
matmutant
Version Information
Status: Testing
Created 2014-11-24
Last Updated 2014-12-15
dedicated Blog article for MotoE
It's always cool to know at a glance that your device is charging without the need of lighting the screen, here is how:
Requirements :
- Moto E (tested on XT1022)
- Rooted
- SU rights granted
- adb if you want to monitor all this from a computer
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.
*/
Code:
[none] bkl-trigger usb-online mmc0 mmc1 battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid bms-online
Code:
echo battery-charging >/sys/class/leds/charging/trigger
Code:
echo 1 >/sys/class/leds/charging/trigger
If you pay attention, you can se that Moto E has Two little white LEDs soldered under the LED hole, the first one (left) is ruled by /sys/class/leds/charging and the second one (less bright, ont the right) is ruled by the /sys/class/leds/white.
/sys/class/leds/white/trigger, and /sys/class/leds/white/brightness configure the right LED and these settings are overridden has soon as a notification comes.
/sys/class/leds/charging/trigger and /sys/class/charging/brightness configure the left LED (the brighter one) and these settings are not overridden by notifications AND both can work toghether:
You can see the left one kept ON while charging (using battery-charging trigger) and the right one Blinking with an incoming notification.
It is time for the community to help, and we will find out a way to correctly dim the LEDs if possible.
For now, the best way is to set left LED (/sys/class/leds/charging/) for charging using dedicated trigger and keeping the right one to none and get both working together this way.
______________________________
WARNING : if you fail this, you may screw up your device ... (keep a backup somewhere)
- Create a blank file and name it like 99charging_LED-blink
- paste the following in that file :
Code:#!/system/bin/sh # enabling charging LED blinking while charging echo "battery-charging-blink-full-solid" >/sys/class/leds/charging/trigger echo "1" >/sys/class/leds/charging/brightness - mount /etc/init.d as RW
- Paste 99charging_LED-blink there
- set permissions as -RWXR-XR-X
- Open terminal emulator, and type :
Plug it to charger, it should start blinking ... if not, make sure everything is correctly setCode:su sh /etc/init.d/99charging_LED-blink - Reboot
- Enjoy!
______________________________
For whose who asked, here is the proof of the 2 LEDs and their White-color :
http://forum.xda-developers.com/showpost.php?p=57039807&postcount=7
Feel free to test further and report your discoveries!
The above has been tested on stock rooted ROM, and reported to work on CM11-m12, both on XT1022.
Here is the LED related Thread for MotoG
XDA:DevDB Information
[LED][DEV] Moto E LED Custom Controls, Tool/Utility for the Moto E
Contributors
matmutant
Version Information
Status: Testing
Created 2014-11-24
Last Updated 2014-12-15
Last edited:
