Google has just released the factory images for the Nexus 4. This means you can now flash the new Kitkat factory images to your device and get that delicious stock Android experience a little sooner.

Whether you want to get the latest and greatest version of Android just that much sooner, or simply want to start fresh after rooting, or trying out a custom rom, this guide will show you how.

The upside, you get a fresh vanilla Android experience. The downside? It wipes your data in the process, so make a back-up before continuing.

If you’re already on stock android and haven’t rooted your better off flashing the OTA update.

What This Guide Is Great For:

  • Unbricking a soft-bricked device
  • Restoring your device to factory condition
  • getting Android updates before the OTA is available
What You Need

  • Nexus 4
  • MicroUSB Cable
  • Windows Mac or Linux computer.
  • Factory Image
  • Android SDK
A Note About Drivers
Windows users will need to download an install usb drivers for their device.
Well known developer Koush has developed a universal ADB driver for windows.
Download the driver here.

Disclaimer: I can not be held responsible for anything that goes wrong in the process of following this tutorial. Using your device in the ways described can void your warranty, soft-brick and or completely damage your device. Proceed at your own risk.

Getting Set Up
In order to flash the factory images we need two files from the Android SDK called ADB and Fastboot.

  1. Download and extract the Android SDK to your desktop.
  2. Navigate to the platform-tools folder under sdk
  3. Copy the “adb” and “fastboot” files to a new folder on your desktop.
  4. For this tutorial I am naming the folder “android-utils
  5. Download the Kitkat factory image for your device.
  6. Extract the zip file and copy the contents of the file to the “android-utils” folder on your desktop.
  7. On your computer open a terminal or command prompt.
  8. Navigate to the the “android-utils” folder your created on your desktop using the following command.
cd ~/Desktop/android-utils/

Put Your Nexus In Fastboot Mode
Before you can push any files to your device you need to put it in fastboot mode. To do this:

  1. Shutdown your Nexus, and start it by hold down the volume up+down+power buttons all at the same time. An android on its back with the word “start” above it should appear.
  2. Connect your nexus to your computer using the Micro USB cable.
  3. In the terminal execute the following command:

Mac / Linux

./fastboot devices


fastboot devices

If your Nexus was connected correctly the terminal should show text similar to the example below:

04e6d93619d722d8 fastboot


Unlock The Bootloader:

Img 1. Unlock Bootloader
Img 1. Unlock Bootloader

If your device is rooted, or you have installed a custom ROM this step can be skipped as your bootloader has already been unlocked.

If you haven’t rooted your device or flashed a custom ROM, you will need to unlock your bootloader. While this won’t void your warranty it will need to be relocked for the warranty to remain intact. There are instructions for relocking the bootloader at the end of this tutorial.

  1. Connect your device to your computer using the microUSB cable, ensuring that the device is in the Fastboot mode described above.
  2. In the terminal execute the following command.
./fastboot oem unlock

The device’s screen will change. Use the volume keys to select “Yes” and the power button to confirm.


Flash the Factory Image

  • a bolded part of a command is a place where the tab key will complete the command for you.
  • The commands shown here are specific to the Nexus 4 Android 4.4 factory image. If applying this guide to a future update use the “tab” key to auto-complete the file name

Execute the following commands to flash the factory image.

Step 1. Flash the bootloader:

Mac / Linux

./fastboot flash bootloader bootloader-mako-makoz20i.img
./fastboot reboot-bootloader


fastboot flash bootloader bootloader-mako-makoz20i.img
fastboot reboot-bootloader

The device will reboot back into the bootloader.

Step 2. Flash the Radio files:

Mac / Linux

./fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
./fastboot reboot-bootloader


fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
fastboot reboot-bootloader

The device will reboot back into the bootloader again.

Step 3. Flash the System Images.

Mac / Linux

./fastboot -w update


fastboot -w update

Once it completes it should reboot.
Stuck On The Boot Animation?
If the device fails to boot, or gets stuck on the boot animation, the cache may not have been cleared. A factory reset should fix your problem.

  1. Shutdown the device and boot back into Fastboot mode.
  2. Use the volume keys to select “recovery” and press the power button confirm.
  3. Briefly press the volume up, down and power buttons at the same time to bring up the recovery menu.
  4. Select Factory Reset


Optional: Lock The Bootloader
In order to completely reset your nexus to factory condition it’s necessary to lock the bootloader.

Unless your planning to return your device under your warranty I wouldn’t recommend locking the bootloader. Unlocking it again will wipe your data.

  1. Put your device in fastboot mode
  2. Ensure it is connected via the microUSB cable
  3. On the computer execute the following command

Mac OSX / Linux

./fastboot oem lock


fastboot oem lock


If You Run Into Trouble
If for some reason this doesn’t work consult the xda-developers forum for a solution. I will attempt to answer any questions you may have but understand I am not a developer.

For this reason if you have any questions or concerns regarding this how-to please contact me at [email protected].


  • Helder Stackhouse

    Excellent tutorial! Thanks. 😀

  • Zubin Lakra

    thank you so much. this worked like a charm.

  • Paresh Koli

    great guide. Thanks.

  • handijk

    Good tutorial!

  • will falshing all the three files also replace custom recovery ? ..please reply asap

  • Amit Singh

    Excellent tutorial.. Thanks