Can I get some help with this weird battery behavior?

A

AC Question

Weird Battery Behaviour

Hey guys,
I'm facing some weird battery behavior ever since I flashed my phone with unofficial roms.

I'm currently using a Cyanogenmod 12.1 Unofficial build. I'm going explain the problem as detailed as possible.

Everything works fine, except after a boot, the phone ALWAYS shuts down in 2 to 3 minutes while a SIM card is present.
If a SIM card is not present, the phone shuts down anytime between 5 minutes to 1 hour.
The reason? The battery reading jumps from an accurate value to 0% and the phone shuts down.

ALSO, When I connect a charger, the phone shows "Charging" but no battery is detected (Charging 0% AC), so when I remove the charger, the phone immediately shuts down due to 0% battery.

Lets call this Mode 1


Well, now I tried something. I connected the charger, and then pulled out the battery while it was still connected.
The phone went off.
Now on a restart, the phone stays at the bootloader screen for 1.5 to 2 minutes (Samsung GS3 I9305)
Now after the phone boots up, everything looks normal, but now, the battery stays at 99% all the time. No matter how much I use or try to charge it, 99% always.

This is Mode 2

In short,
Mode 1: 5 seconds at bootloader, Accurate battery reading, Sudden 0%, phone shutdown
Mode 2: 2 minutes at bootloader, Inaccurate 99% battery reading, never shuts down.

Now I can switch between Mode 1 and Mode 2 by connecting a charger and pulling out the battery while its still connected. I've done this atleast 4 times and it always worked. Weird.

What is going on really? Any ideas on how to fix this?


P.S.
I've tried:
Flashing Samsung S3 i9305 stock 4.4.4
Flashing Cyanogenmod 10.1 (Official)
Flashing Cyanogenmod 11 ( Latest Nightly build)
Same problem everywhere.

Also tried Battery Calibration apps

I don't have a backup of the original stock rom as it was already broken in the first place.