Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Is there any way to automate charging cycles (like charge only from 40% to 80%) if the device always connected to power outlet? I'm searching for a way to read charging level and send commands to external devices to turn off/on power outlet.
If you have Magisk installed, this module Magic Charging Switch (MCS) can automate charging with certain conditions.
I didn't try it but according to the XDA post it's a decent option.