If you would like to update your Nexus 4 to official Android 5.0 Lollipop (Build: LRX21T) manually, here is an easy to follow guide. However, keep in mind that, installing the factory image will wipe everything on your phone, so before flashing the firmware, backup any important files (contacts, SMS, etc.)
Installation Instruction:
- Before you get start with, make sure your nexus 4 has unlocked bootloader
- Download [HERE] Android 5.0 Lollipop factory image (LRX21T) for Nexus 4 and extract the file (occam-lrx21t-factory-51cee750.tar). You will get below files. a. radio and bootloader image b. flash-all.bat c. flash-all.sh d. flash-base.sh e. image-hammerhead-lrx21o.zip
- Install ADB, Fastboot, and driver on your computer (Read this super easy method).
- Copy all the firmware files to the same folder as the ADB and Fastboot
- Now, boot your Nexus 4 into fastboot mode. To do so, switch off your phone and press and hold Power + Vol up for a few seconds.
- Connect your Nexus 4 to PC via original USB cable
- If you are on Windows PC, run the “flash-all.bat” file from the files you extracted in Step 2 (on Mac, run the file “flash-all.sh” using Terminal and on Linux, run the file “flash-all.sh”.) It will take some times to complete the process. Once the installation process is completed, your Nexus 4 will automatically reboot to Android 5.0 Lollipop. (Source)