I'am using a Linage Android image (rooted) to control the battery charge and discharge with the commands:
echo 0 > /sys/class/power_supply/battery/batt_slate_mode
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.
Samsung Tab E 7.0 SM-T113NU
Android 7.0.1 - Linage 14.1
App and ADB rooted