Nexus 5 crashes, battery down to 0% on Android 5.1.1 I'm currently running Android 5.1.1 (Chroma custom ROM) on my Nexus 5 and recently have been experiencing some weird issues with my battery, which have appeared more frequently in the last few days.

From time to time, when I use my phone (the screen is on), with a battery level of about 50-70% it just crashes (the screen turns black, no shut down notice etc) and when I power it back on, there is only about 0-2% battery left and the phone basically turns itself off again immediately. 

After connecting my nexus to a charger and letting it power up again, I look at the battery statistics to find out that something pretty weird is going on:




Click for larger version

This gets really annoying if it happens all the time, as the phone really isn't reliable at all any more. 

I don't have any unusual apps installed and this has happened to me on a few Roms so far, so I have gone through some factory resets as well without any success. 
Can software discharge a battery in such a small amount of time or is this issue likely to be hardware-related (e.g. battery)? 

Thanks in advance for your help!
This issue is widely reported and discussed on Google support forums. I experienced exactly the same thing on my Nexus 5 when running any CPU/GPU intensive apps. In my case running SkyForce game immediately caused the phone to shut down with 100% repeatability. Most of the time after the restart the phone would report significantly reduced battery charge level. Repeating the attempts to run SkyForce resulted in further shutdowns with battery charge quickly dropping to 0%. In some cases the phone refused to turn on after the shutdown unless connected to an external power source.

I attributed this behavior to the battery's inability to sustain the load, i.e old battery. Under small loads the battery behaves as if everything is normal and maintains the voltage. Under elevated loads the battery suddenly gives in and the voltage crashes "through the floor". This is expected behavior for an "expired" LiIon/LiPoly battery. It easily fools battery management subsystem into believing that the battery is at 100% charge, when even a slightly elevated load causes the voltage to "crash".

I bought a new battery and did the replacement, which fixed the issue for good. I have been using my Nexus 5 for a few months now with no anomalies of any kind.

The only thing that is not immediately explainable is why most people report the issue only after the system update. BTW, in my case the problems began after update to 5.1, not 5.1.1. I received the update to 5.1.1 later, after battery replacement, and it was completely uneventful. Yet many people report that in their case it was specifically 5.1.1 that triggered the problem. The only explanation I have is that the updates change something in battery management algorithm that tends to exaggerate old-battery issues.