Google is known for always upgrading its Nexus phones and tablets with a new version of Android before any other device. However, the roll out of a new update can take weeks or months to reach everyone — even with Nexus devices.

It takes a significant amount of time because updates always release on stages to allow the company to halt the rollout, so if something happens only a small number of users get affected.

Fortunately, Google allow tech-savvy users to install a new version of Android manually using the official factory image for supported devices. This means that you don’t have to wait weeks to upgrade your phone or tablet.

Additionally, you can use this process to restore (reinstall) the original factory firmware, when your phone or tablet is not working properly, or you installed a custom version of Android, and you want to go back to the factory defaults.

In this guide, you’ll learn the steps to install the latest (or original) version of Android using an official factory image on Windows 10.

Download and install these components before beginning

  • Download and install the Windows version of Java SE Development Kit 8.
  • Download and install 7zip to open the factory image file on Windows 10 and extract other files.
  • Download and install Notepad++ to edit configuration files throughout the process (if necessary).
  • Download the official Android SDK for Windows 10 from the “Get just the command lines tools” section. This is the file that you need: android-sdk_r24.4.1-windows.zip, but depending when you’re upgrading your device the version may be different.

How to flash a Nexus device using official factory image

To flash your Nexus device with a factory image to upgrade the operating system, do the following:

  • Use 7Zip to extract the android-sdk-windows folder with the Android SDK files.
  • Inside the android-sdk-windows folder, double-click the file to launch the SDK Manager.
  • On the SDK Manager uncheck everything except “Android SDK Platform-tools”. If you’re using a Nexus device, you can also select “Google USB Driver”.
  • Once you completed the installation, close the SDK Manager.
  • Depending on your Nexus device (e.g., HTC or Motorola), you may need to download the USB drivers from your manufacturer’s support website.
  • Download the latest factory image (e.g., Nougat or Marshmellow) for your Nexus device, including Nexus 6P, Nexus 5X, Nexus 6, Nexus 7, Nexus 9, or Pixel C.
  • Note: Avoid using Microsoft Edge, as it may download a “.tar” file instead of the original “.tgz” file compression extension. Use Google Chrome instead.
  • Open the “.tgz” file containing the factory image files with 7Zip, and extract the files one-by-one to avoid errors during extraction to the platform-tools folder inside the android-sdk-windows main folder.
  • Open Settings on your phone or tablet.
  • Select Developer options.
  • Turn on the USB debugging toggle switch.
  • Connect your device to your Windows 10 computer using a USB data cable.
  • Inside the platform-tools folder, press and hold the Shift key and right-click and select Open command window here.
  • Type the following command to reboot your device into the bootloader:
  • adb reboot bootloader
  • If your device is locked, you can unlock the device’s bootloader using the following command:
  • fastboot flashing unlock
  • On older devices, you may need to run the following command:
  • fastboot oem unlock
  • The device will show you a confirmation screen.
  • Inside the platform-tools folder, press and hold the Shift key and right-click and select Open command window here.
  • Type flash-all.bat and press Enter. Or simply double-click the flash-all.bat file. This script will install the bootloader, baseband firmware, a clean version of the operating system wiping out your system.
  • If your device was locked and you unlocked it, make sure to re-lock the device using the following command:
  • fastboot flashing lock
  • On older devices, you may need to run the following command:
  • fastboot oem lock

Once you completed the steps mentioned above, you’ll need to reinstall your apps and restore your data from backup.

Use 7Zip to extract the android-sdk-windows folder with the Android SDK files.

Inside the android-sdk-windows folder, double-click the file to launch the SDK Manager.

On the SDK Manager uncheck everything except “Android SDK Platform-tools”. If you’re using a Nexus device, you can also select “Google USB Driver”.

Once you completed the installation, close the SDK Manager.

Depending on your Nexus device (e.g., HTC or Motorola), you may need to download the USB drivers from your manufacturer’s support website.  

Download the latest factory image (e.g., Nougat or Marshmellow) for your Nexus device, including Nexus 6P, Nexus 5X, Nexus 6, Nexus 7, Nexus 9, or Pixel C.

Open the “.tgz” file containing the factory image files with 7Zip, and extract the files one-by-one to avoid errors during extraction to the platform-tools folder inside the android-sdk-windows main folder.

Open Settings on your phone or tablet.

Select Developer options.

Turn on the USB debugging toggle switch.

Connect your device to your Windows 10 computer using a USB data cable.

Inside the platform-tools folder, press and hold the Shift key and right-click and select Open command window here.

Type the following command to reboot your device into the bootloader:

adb reboot bootloader

If your device is locked, you can unlock the device’s bootloader using the following command:

fastboot flashing unlock

On older devices, you may need to run the following command:

fastboot oem unlock

The device will show you a confirmation screen.

Type flash-all.bat and press Enter. Or simply double-click the flash-all.bat file. This script will install the bootloader, baseband firmware, a clean version of the operating system wiping out your system.

If your device was locked and you unlocked it, make sure to re-lock the device using the following command:

fastboot flashing lock

fastboot oem lock

Wrapping things up

Google calls this installation process “flashing”, and it’s useful in a number of scenarios. Using the a factory image can help you to manually upgrade your Nexus phone or tablet to the latest version of Android without having to wait weeks or months.

It’s useful to do a clean installation of the operating system, when things are not working correctly, or when you’re ready to sell or give away your device without compromising your data. Or you can use this process to flash your Nexus device and restore the original version of the operating system, which may not be the latest, but it works for you.

Did you have any issues installing Android using a factory image? Tell us in the comments below.