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:
- Moto E (tested on XT1022)
- SU rights granted
- adb if you want to monitor all this from a computer
#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. */
[none] bkl-trigger usb-online mmc0 mmc1 battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid bms-online
echo battery-charging >/sys/class/leds/charging/trigger
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.
Set at boot:
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 :
#!/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 :
su sh /etc/init.d/99charging_LED-blink
For whose who asked, here is the proof of the 2 LEDs and their White-color :
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
[LED][DEV] Moto E LED Custom Controls, Tool/Utility for the Moto E
Last Updated 2014-12-15