Chosen Solution

My nexus device only turns on when is connected to the charger, it shuts off whenever not plugged in. Some weeks ago i noticed my nexus was randomnly shutting down at 15-21% battery then it got worse now at 55-60% of battery, one week later it came at the point that at 90% of battery shut down and have to charge it again and finally now it shuts off whenever not plugged in. I read in many forums about similar problems and tried a few “solutions” like Entering in bootloader then bootloader logs pressing 10 seconds the power button after this process this should reset the battery statistics and boot the phone but it didn’t work, Factory reset, calibrating the battery and others but no one of this worked. What could be the problem? Also in the bootloader it shows a message that indicates the state of the battery is OK

If it only stays powered on when connected to a charger then the battery is failing and should be replaced. I know you say software tells you your battery is ok but that is not always accurate. If you have a device with a failing battery they can start doing odd things. So how can you trust the software is correct when your phones shuts off at random charge levels. This to me points even more to a failing battery. Especially after the steps you’ve taken​ to try and diagnose a software battery calibration issue. So I do recommend replacing the battery.