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
- Nexus 4
- MicroUSB Cable
- Windows Mac or Linux computer.
- Factory Image
- Android SDK
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.
- Download and extract the Android SDK to your desktop.
- Navigate to the platform-tools folder under sdk
- Copy the “adb” and “fastboot” files to a new folder on your desktop.
- For this tutorial I am naming the folder “android-utils“
- Download the Kitkat factory image for your device.
- Extract the zip file and copy the contents of the file to the “android-utils” folder on your desktop.
- On your computer open a terminal or command prompt.
- Navigate to the the “android-utils” folder your created on your desktop using the following command.
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:
- 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.
- Connect your nexus to your computer using the Micro USB cable.
- In the terminal execute the following command:
Mac / Linux
If your Nexus was connected correctly the terminal should show text similar to the example below:
Unlock The 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.
- Connect your device to your computer using the microUSB cable, ensuring that the device is in the Fastboot mode described above.
- 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.imgfastboot 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.imgfastboot reboot-bootloader
The device will reboot back into the bootloader again.
Step 3. Flash the System Images.
Mac / Linux
./fastboot -w update image-occam-krt16o.zip
fastboot -w update image-occam-krt16o.zip
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.
- Shutdown the device and boot back into Fastboot mode.
- Use the volume keys to select “recovery” and press the power button confirm.
- Briefly press the volume up, down and power buttons at the same time to bring up the recovery menu.
- 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.
- Put your device in fastboot mode
- Ensure it is connected via the microUSB cable
- 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].