by google user
REQUIREMENTS: root (edits file in /sys/), busybox (CAT editor), existing file charging_enabled
when this flow doesnt work, you may need busybox (for cat).
This flow edits
to enable or disable current flowing into the battery.
There are other flows doing the same, but these didnt work for me. They direct the echoed bool value directly into the file, which had no effect. I direct the echo into cat (commandline text editor) and direct that to the file. Confirmed working.