The same thing happened to me, the phone charged 0.5A.
I solved it by starting at TWRP, without disconnecting the charging cable, and then started charging at 1.5A (2.5A with the original charger tested later). When restarting the operating system it continued loading to 1.5A and the problem was...