by Nereis Nereus
Fast charge when below 80%, normal charge up to 90%, if at night wait 6hrs before charging to 100%, otherwise maintain charge between 81~90% during the day if left on charger.
Requires eldrod16's Maxlife, tested with HTC 10, stock rooted Android N.
First alpha version open to public testing, no effort has been made to optimize flow but should be rather straightforward to read/edit.
Requires root and Maxlife installed, should be easy to migrate to Magisk Magic Charging Switch for those who wish to remain systemless. Will work on this once systemless xposed in magisk passes safetynet, but feel free to adapt this to another charge management daemon.
1.0 alpha: initial release
1.0 beta: bug fixes / easier to read flow layout
1.2 beta: bug fixes / better logic
1.3 beta: improved logic / prevent unnecessary loops
will eventually add option to maintain max charge at 75% if phone has been left on charger for over 3 days.
PS. Delete 91bms from init.d if you have issues with charge stuck on Maxlife default setting, and check if Kernel Auditor is running init.d emulation w/ delay on boot.