On my Android device, running on Qualcomm SOC, I can control LEDs ( /sys/class/leds/*/ ) when the device is charging ( led to blue color ) or the battery getting low ( led to red color ), from a user space service ( Android HAL )
However, I also need to do the above color change on different battery states ( charging / low battery ) when the device is shut down and the charger is connected.
I couldn't find a service on the Qualcomm board that runs on low power mode ( i.e. when the device is shutdown )
I have looked at healthd daemon that turns on animation when the power button is pressed but I don't think this will be running when the device is in a shutdown state.
Can someone please point at a service/daemon that runs in a shutdown state and I can control leds from there.
Thank you.
In the init.target.rc file, I used "on charger" property to change the LED color and set up blinking timer.
on charger
write 255 /sys/class/leds/blue/brightness write 50 /sys/class/leds/blue/blink