Pages

Something terribly went wrong during Android 5.1.1 Over The Air (OTA) update. The Nexus 4 mobile phone stuck in the boot loop after update. Perhaps the update failed to download the files or the device ran out of disk space. For those of you who like to debug such problems, I captured some logs for analysis with 'adb logcat' here (1,2,3,4).

Caution: Flashing a new factory image deletes all user data. Be certain to first backup any personal data such as photos.

Restart udev service.Connect the Nexus 4 device to computer with USB cable and see fastboot can access it.

$ sudo service udev restart
$ sudo fastboot devices

Unlock the Nexus 4 phone (Optional step). The phone will reboot and follow the instructions on the phone screen to unlock the phone.

$ fastboot oem unlock

Let's put the Nexus 4 in recovery mode so that we can flash the new factory image. You can use 'adb' command or press hold volume up + volume down + power buttons during the phone bootup.

$ adb reboot bootloader

Download the Nexus 4 factory image from developers.google.com/android/nexus/images. I have downloaded the Android 5.1.0 (LMY47O) factory image. Uncompress it the downloaded file and excute the 'flash-all.sh' script to flash the factory image.