Why does my phone turn off after "android is upgrading/optimizing apps"?

A

AC Question

I have flashed the Android Lollipop 5.0.1 factory image on my Nexus 5. I have replaced my LCD and the battery. When I power it on, the google logo pops up, the Lollipop colors dance around, the android logo pops up, then the "android is upgrading/optimizing apps" pops up. After a few seconds of optimizing it turns itself off. When I flashed KitKat 4.4.4, it sort of worked, but the battery was "charging, 0%" and only worked when plugged in. Help!
 

B. Diddy

Senior Ambassador
Moderator
Mar 9, 2012
165,602
4,751
113
Visit site
Welcome to Android Central! How confident are you about the quality of the battery you installed, and the integrity of the connections? It sounds like the phone is running out of battery and shutting down before it can do anything else.