Today we will give you a simple guide on how to perform the flash of a Factory Image released by Google for its Android devices.This procedure is useful if you have used the Android open-source Project or you have installed custom builds on your Android device, and you wish to return it to the factory state.
Before the installation you will have to make some preliminary actions. You should download the right version for your Nexus or Pixel device from the given link at the end of the tutorial, and then decompress it in an easily accessible folder. The system images are available from the developer’s page and are broken down by Android version.
Read also: How to Boot Android Phone into Recovery Mode
Note: Installing the factory image will erase all data from your device, so we recommend that before proceeding, ensure that you backed up all your data to your Google Account.
Having done this, you can proceed with the installation:
- Connect your Android device to your computer using an USB cable.
- Turn off the device and turn it on in fast boot mode using one of the fallowing methods:
- Using the ‘’ adb tool’’ by executing ’’ adb reboot bootloader’’ command with the device powered on.
- Using a key combination, by holdingthe relevant key combination depending on your device model. For example if you have a Nexus 5 device, to turn it on into fastboot mode, press and hold Volume Up + Volume Down + Power buttons.
- If your device does not have the bootloader unlocked, you will have to unlock it, resulting in data loss.
- To unlock the bootloader, you can open a command window and run the command ” fastboot flash unlock ” or ” fastbootoem unlock” depending on your device’s version
- YourAndroid device will show confirmation screen
- Now open a terminal and go to the unzipped system image directory.
- Run the ‘’flash-all’’ script, which installs the bootloader,baseband firmware and operating system.
- Wait for the installation to complete and the device will automatically restart.
That’s all, when the device reboot,you will have the new factory image issued directly by Google.
It is optional but for your device’s security, you should now lock the bootloader:
- Turn on your device in fast boot mode again, as mentioned above.
- Execute the command: ‘’fastboot flashing lock’’ or ‘’fastbootoem lock’’ depending on your device’s version.
Download Android factory Images for Nexus and Pixel models from here .
Also Read: How to install TWRP Recovery in Google Pixel