It all started about three months ago when my HTC One (M8)'s USB charging port died. At first the port would sometimes not work, you just have to move the cable around a bit for it to charge, then you had to hold the cable down to make it keep charging, and finally device wouldn't charge at all.
The same exact thing happened to my HTC Vivid. When I got the Vivid fixed, the technician said it was water damage.
Anyway, after the local phone repair shop successfully installed the new USB port on my One phone, failing on the first try as it was still in the same condition, everything was fine. For a few weeks. Then the phone started shutting down as if it had no battery left, at 20%. I immediately plugged it into a charger, turned it back on, and the phone read 1%.
Its been doing that ever since. Some days it goes down to 0%, some days it goes down to 20% or 25% and dies.
Here's a screen shot of what is going on.
Under device settings, it says that the battery condition is good.
So I'm just wondering why my phone may be doing this, and what do you think the best option is to fix this.
I tried recalibrating the battery, clearing the cache, and installing a new ROM. None of the above worked.