Google’s Nexus Devices offer users the purest android experience. Nexus devices are designed by Google and manufactured by an original equipment manufacturer partner. They are excellently designed devices which offer users android experiences free from bloatware with their software optimized for the given hardware.
As great as these devices are however, they are subject to the same software issues that any great mobile device will experience at some point during it’s lifetime. Many times your best option for solving a nagging software issue you are having is to flash the corresponding factory image to your device from your computer. So how exactly does on go about this? Don’t worry, I’ll show you how.
Please note that I’m using a PC running Windows 7 and a Google Nexus 5 running Android Marshmallow.
Before you actually get to the flashing, you will need to do a couple of things to ensure that you can successfully carry out this task. You must do the following:
- Obtain the latest version of the fastboot tool
- Correctly setup USB access for your Android device
You can obtain the fastboot tool from a compiled version of the Android Open Source Project or by installing the Android SDK Tools. We will install the Android SDK Tools as this method is a little less complicated. Download the Android SDK Tools by following this link and selecting the Windows package.
Go ahead and install the .exe. Make note of the installation location that you chose. In my case it was ‘C:\Program Files\Android\android-sdk’.
On completion, the default option is for the Android SDK Manager to launch unless you have uncheck this option.
Let the SDK Manager run after installation. Select Android SDK Platform-Tools in and hit install package.
After that process has been successfully completed you will have successfully installed fastboot to your machine.
We will cover what you actually need to do within the command prompt after we cover some more unfinished business.
Setup Android USB Connection
You will need to enable USB Debugging on your Android device and also ensure that the Google USB driver is installed.
By default, developer tools such as USB Debugging are disabled on Android devices. Therefore, if you haven’t already, you will need to enable these developer tools as well as enable USB Debugging. In order to enable developer tools you will need to access About phone in Settings on your device and tap Build Number seven times.
You will then be able to access Developer options.
Within Developer options make sure to select USB Debugging.
For the driver, go ahead and open the Windows Device Manager. Probably the easiest way to do this is to open the Start Menu and then right click Computer and select Manage.
The Computer Management window will pop up and from there select Device Manager. Connect your device to the computer and it will eventually appear under the list of devices. For me it is my Nexus 5.
Downloading and installing the SDK Tools means that you also downloaded the Google USB driver so now it is just a matter of installation. Right-click on the name of your device and select Update Driver Software. Then select Browse my computer for driver software. Browse to the directory to which you installed the SDK Tools to and the driver will be in the following directory: <installation-path>\extras\google\usb_driver\. Select the driver and follow the prompts until the driver has been successfully installed.
After completing this step you will finally be ready to flash your desired factory image to your device.
Flash Your Factory Image
Firstly, you should download the corresponding image file for your device from here. You should then place your device in bootloader mode. Make sure your device is connected to the computer.
It will be located in the following directory: <installation-path>\extras\google\usb_driver\.
To place your device in bootloader mode execute the following command: adb reboot bootloader.
You will then probably need to unlock your device’s bootloader. You can do this by running the following: fastboot flashing unlock. On older devices you will need to run fastboot oem unlock.
You will need to confirm your intention to carry out the process on your device. On some devices, carrying this out will mean that all of your data will be erased.
Navigate to the location where you placed the image file and unzip it. You will then need to run the flash-all script. You can do this by opening a command window from within the directory where the file is located by holding down shift while right clicking and then selection Open command window here.
Then type flash-all. This will run the script which will install the firmware on your device.
For security reasons you should relock your device’s bootloader after the flashing process is over. On newer devices you will need to execute fastboot flashing lock while on older devices you should execute fastboot oem lock.
So there you have it folks. That is how you can flash a factory image to your Google Nexus Device from your Windows Machine.