Mine also started again with this problem now: when the phone is on, it won't charge. When the phone is off, connecting the cable would activate the charging mode but once it reaches the battery animation it stops charging (even with the orange led on).
The charging board is not the original one, I already replaced it once for the same issue but, since the phone turned off starts, and it even gets an initial connection to the computer, I'm convinced that this is software issue.
Is there a way to replace the battery controller without flashing the whole thing?
I'm tired of reinstalling everything, and with 28% battery, it won't let me use the local update.
Furthermore, for no reason, my TWRP is now in chinese, so I would need to reinstall everything again.