Monday, November 24, 2014

Moto E Playing with the LED

After we played with Moto G LED, it's time to do the same with MotoE's one :




It's always cool to know at a glance that your device is charging without the need of lighting the screen, here is how:

in /sys/class/leds/charging/trigger we have these triggers available : 

Code:
[none] bkl-trigger usb-online mmc0 mmc1 battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid bms-online
easy to change them using :
Code:
echo battery-charging >/sys/class/leds/charging/trigger
needs to set any value !=0 for brightness (LED is either ON or OFF on MotoE):
Code:
echo 1 >/sys/class/leds/charging/trigger
Moto E is quite different than Moto G :
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 ./charging and the second one (less bright, ont the right) is ruled by the ./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.


The above has only been tested on stock rooted ROM
Here is the XDA dedicated thread