Android L Developer Preview DSC06020

How to flash the Android Lollipop factory image on the Nexus 5

While many Nexus owners are waiting for the Android 5.0 Lollipop OTA, Google has posted the official factory images. These images are essentially the same thing you’ll get in an OTA, but if you know what to do you can flash them immediately. A few of you asked us how to do this. It can be a little tricky if you’ve never done it before, but if I can do it so can you. Let’s do get started.

*Phandroid is not responsible for any problems you have. Proceed at your own risk.

First and foremost we need to download the factory image. You can find download links for most Nexus devices here. This guide will be for the Nexus 5.

We’re going to be using a a program that will install ADB and fastboo drivers for you. It’s very quick and easy to use. Follow the links below to download the program for your desktop OS.

Note: Mac users will have to write “./” before every command listed in this guide.

Okay, now we’re going to extract the factory image. First you’ll extract the factory image a couple of times until you get the files below.

At this point we should note that you need to have an unlocked bootloader. If for some reason yours isn’t you can find out how to unlock it here.

There are two methods to complete the process. This first method is easier, but it hasn’t been working for a lot of people. You can give it a try to see if you’re lucky.

  1. Power off your phone.
  2. Boot it in fastboot by pressing and holding Power Button + Volume Down at the same time.
  3. Connect your phone to your PC through your USB cable.
  4. Execute the flash-all.bat script (for Windows) or flash-all.sh(for Mac and Linux) in the folder where you extracted the factory images
    • Remember, for Mac you’ll have to edit the flash-all.sh, and add “./” before every command.
  5. After everything finished, go to your phone and select “Recovery” using the volume buttons.
  6. When a small dead Android appears, press Power Button + Volume UP.
  7. Select “Wipe data/factory data reset”
  8. Reboot

If you see a “missing system.img” error after step 4 don’t fret. Most people have encountered this error (including me). The solution requires a little extra work, but it’s not a big deal.

We’ll need to extract the “image-hammerhead” .zip file into a new folder. Then move the “bootloader-hammerhead” and “radio-hammerhead” .img files into that same folder. I suggest renaming the bootloader and radio files so you get something like this:

Now all we’re going to do is flash all the .img files manually one-by-one. It’s a piece of cake. Open up the command prompt and change to the directory with all your .img files. Input the following commands in order. Allow each one to finish before moving on.

fastboot flash bootloader .img

fastboot flash radio .img

fastboot reboot-bootloader

fastboot flash recovery recovery.img

fastboot flash boot boot.img

fastboot flash system system.img (this one will take the longest)

To perform a full wipe do this:

fastboot flash cache cache.img

fastboot flash userdata userdata.img

That’s it. Now run command “fastboot reboot” and your phone will restart. The boot animation will last a little longer than usual, but eventually you’ll get the “Android is upgrading” message and you’re on your way to Android 5.0 Lollipop! That wasn’t so hard, was it? Let us know if this works for you!

Exit mobile version