Factory images are very important, especially for Android phones. It can be used to restore your Android phone to a factory state. It can also be use as a recovery tool for bricked Android device. Once flashed, your phone will be good as new. Factory images can be flashed via Fastboot mode; also called Bootloader mode. Mostly the ones which come in zip formats.

Factory image for an Android device is the firmware that comes pre-loaded as an OEM. These files are available for several reasons. For some reason, you don’t receive update via FOTA protocol, then you can settle for factory images. Rooted Android phones with a custom TWRP recovery won’t receive OTA. So you will have to settle for factory images. Bricked Android phones can be recovered or restored by flashing factory images.

Here is a simple guide on how you can flash the factory images on your Android device. This usually works for Android phones running stock Android OS and which have factory images. These devices include, Google Pixel, Nexus series, Android One series, Essential Phone, Motorola, OnePlus One, OPPO, etc.

How to Flash Factory Images On Android Devices Using Fasboot?

Before you proceed, here are some preparations and requirements.

  1. Make sure you gave the factory image only and not the stock firmware. Usually, stock firmware and Fastboot images are different things. Get the latest Factory image for your device.
  2. Enable OEM unlock and  USB Debugging from Developer Settings. To find these dettings, go to Settings > About Phone > Tap on the Build Number several times until you get a new Developer Options.
  3. Setup ADB and Fastboot from here for windows OS and for iOS, Linux, Chrome OS.
  4. Install latest Android USB device drivers on your PC for a better connection.

Note: Backup everything. This is because flashing factory images will wipe all data, apps, images, media, etc. It will perform a clean flash.

Factory Image flashing instructions:

Step 1: Download the Factory Image or Fastboot image for your device. Transfer the file to your PC where you can easily locate it.

Step 2: Extract the factory image zip file and enter the folder.

Step 3: Make sure to enable USB debugging and setup ADB and Fastboot on your PC. Trust the connection when when you plug in the device for the first time.

Step 4: Plug in Android to PC and open a command prompt or terminal in the extracted folder. Type “cmd” in the address bar and hit Enter key.

Alternative: Hold shift key and right click any where within the folder. Select ‘Open command window here’.

Step 5: Time to reboot into the Bootloader or Fastboot mode. To do so, issue the following command via cmd or terminal:

adb reboot bootloader

Alternative: Turn off your device and then press and hold volume down + power button simultaneously for a few seconds. You will either enter recovery mode or Bootloader/Fastboot mode. If in recovery mode, select Factboot or Bootloader option.

Step 6: Now, while the folder with the factory image is open, launch a command prompt or terminal window. Issue the following command to test Fastboot connectivity

fastboot devices

Step 7: Now, usually the factory image would have the flash-all.bat file. This file will flash all the files withing Fastboot automatically. If your factory image folder has this file then simply run flash-all.bat for Windows PC and flash-all.sh file from Macbook or Linux. 

This will flash all the fires automatically without entering any code manually. Reboot to system once done.

Manually flashing factory image files.

Step 8: If no such file is found, then flash each and every file like system, boot, recovery, etc.) Issue the following commands to flash it.

Note: flash each and every file with proper file name and extension and the partition which you are flashing it on.

fastboot flash system system.img

fastboot flash system boot.img

Follow this pattern:

fastboot flash <partition name> <file name>.<extension>

Step 9: Likewise, flash every file. Once done, reboot.

Once the operation completes, you can now enjoy your new firmware. Alternatively, while, on Linux or Mac OS, you can issue “./fastboot flash system system.img” command to flash the file.

 

That’s it. Enjoy your brand new phone.