Here is the complete guide to Flash factory images on Nexus devices. With this method you can install the fresh copy of Stock rom, Unroot your nexus devices. This guide will work on any nexus devices like Nexus 4, Nexus 5, Nexus tablets. If you have the rooted device and want to unroot it or facing some problem with your Phone, a factory image can solve all these types of problem. The process isn’t difficult, but does require a few adb and fastboot commands. Here you will find all the files and drivers to complete the task on your nexus. This process will wipe your phone completely. Backup your storage before you continue.
Read all the instruction very carefully and follow all the step one by one on your PC and Nexus. I am also not responsible if anything goes wrong. Lets take a look how to flash the stock rom on nexus phone and tablets. In this guide we are using the Nexus 5 phone and Flashing the Android 4.4.4 factory image.
Flash Factory Image on Nexus
Step 2. Download the Factory image for your nexus here.
Step 3. Extract the Factory image on your desktop and you will see lots of the file in the folder.
Step 4. Now copy all the file and paste them to the ADB folder that you created on the step 1.
Step 5. Enable the USB Debugging mode on your device, Go to the Settings » select About device » Scroll to the bottom and tap on “Build number” seven times to enable developer options. Now the developer option is visible on your phone settings. To Enable USB Debugging again go to Settings » select Developer options » Tick the “USB debugging” checkbox (under Debugging section).
Step 6. Connect your phone to the PC with USB cable.
Step 7. Open the ADB folder and open command window inside the folder. Press “Shift + Right click” on any empty white space inside the folder and then select “Open command window here” option from the context menu.
Step 8. In the Command prompt windows type the command adb devices and hit enter. You will see your device attached and the ADB drivers are worrking fine. In case the devcie is offline, restart both phone and PC and try again.
Step 9. Now boot your into the bootloader/fastboot mode. Type adb reboot bootloader and hit enter and your device will boot in bootloader mode.
Step 10. Now type the fastboot devices command and hit enter.
Step 11. Unlock your bootloader (In case you haven’t already, Leave this step if you already unlocked the bootloader ).
To do this type fastboot oem unlock and you will see the warning message on your nexus device to confirm whether you really want to unlock the bootloader of your device or not. Accept the bootloader unlocking request by selecting Yes using the Volume button and then press the Power button to confirm.
Step 12. Now the next step is to flash the factory image. To do this open the ADB folder in which you moved the Factory images file on step 4.
From here run the flash-all.bat script (for Windows) or flash-all.sh(for MAC and LINUX). Now the flashing process will start on your phone and this will take some time.
Once the process is done, you phone will be rebooted and your device is running on the Stock ROM.
Check out the Video guide below:-