2

I've installed Lineage on a Samsung tab s2 which I use in the car. I've added the following to get it to auto start when it goes on charge

# /system/etc/init/off_mode_charge.rc
on charger
    setprop sys.powerctl reboot,leaving-off-mode-charging

But does anyone know a way to add a script to the startup routine so if the battery is below say 10% it won't continue starting? I use tasker to power off the tablet when the usb power drops but there have been a couple of times for some reason it doesn't, meaning the battery can drop to 0% and then it goes into a restart loop as the low power supply in the car isn't enough during startup. I can read the power using the capacity file in /sys/class/power_supply/battery/ just not sure how, or if, I can add a script to the startup sequence to use this.

Thanks

2

0

You must log in to answer this question.

Browse other questions tagged .