I'am using a Linage Android image (rooted) to control the battery charge and discharge with the commands:
Charge:
echo 0 > /sys/class/power_supply/battery/batt_slate_mode
Stop charging:
echo 1 > /sys/class/power_supply/battery/batt_slate_mode
The problem that after sending the command to charge, the charge type changes from "AC charge" to "USB Charge" and the current level drop to less than 500mA. I am connected AC power outlet. If I disconnect and connect again the power outlet the current goes to 1A.
Reading the following article bellow some devices are a file to change the voltage (/sys/class/power_supply/battery/voltage_max), but mine doesn't have.
The picture show the files that I have on the folder:
Samsung Tab E 7.0 SM-T113NU
Android 7.0.1 - Linage 14.1
App and ADB rooted
Best regards,
Slate_mode
is messy in the sense it doesn't seem to work as expected always//If you are keen to do it your way only, this answer may help – beeshyams Jun 27 '20 at 17:36I'm using the ACC Magisk as recommeded. The problem persist. Even i connect to the power outlet it appears "USB Powered" with slow charge. I've tried change the current and voltage but doesn't work either.
dumpsys battery AC powered: false USB powered: true Wireless powered: false Max charging current: 0 Max charging voltage: 0 Charge counter: 0 status: 2 health: 2 present: true level: 86 scale: 100 voltage: 4100 temperature: 320 technology: Li-ion
– João Paulo Jun 30 '20 at 19:44