One of the fascinating things about Android is that it lets you unleash your adventurous self. If you are just a basic or average user, you could explore millions of apps in the Play Store to make the most of your device. However, if you are even a little passionate about the phone or tablet you own and have rooted it, the possibilities are immense. You can try and experiment custom ROMs and mods that can be easily found around the web if Googled.
Rooting lets you enjoy some really good apps and ROMs that help you get better battery life, capability to tweak and optimize your device, and option to customize your device in a plethora of ways. As you know, any adventurous feel involves the element of risks too. You might root your Android device, try a mod or kernel, or might go for a custom ROM, but there might be certain situation when you would either wish to return to the stock firmware of your device, or be forced to flash stock ROM as the ultimate resort to recover your device to normal state in case its is caught into bootloop.
The reason why I decided to write this tutorial is a little mishap that took place yesterday when I was going to install a ROM. I copied the ROM and GApps file to phone, backed up the old ROM, and then while wiping data, cache and system, I also selected internal SD card. The result was catastrophic and it was by flashing the factory image back that I cold recover my Nexus 5.
While not all Android OEMs provide stock firmwares of their device for public download, there are a few like Google and Motorola who have been pretty good at making them available to users. So, if you own a Nexus 5 and wish to restore it to stock firmware by flashing the official factory image, you can follow our detailed tutorial below and do it within minutes. Though this guide is meant for Nexus 5, it can be used on any Nexus device. The only important thing is, you must have the appropriate image file.
Disclaimer
The procedure described below has been well tested but its success depends on how good you are while following it. The method is pretty easy to follow but it involves a few ADB and Fastboot commands.Read all steps a couple of times, make all preparations and do them carefully.
Preparations:
- Download the latest Nexus 5 factory image from the official site: Click Here to Download
- Download and setup Android SDK on your computer. To do this, download the SDK zip and extract its contents to the following path: C:/Program Files/Android (create this folder first). If you use Windows 8, extract the SDK files to Program Files (x86). Then run the SDK Manager.exe as administrator, check the Google USB Drivers and install it. Skip this step you have already done it. To get ADB and Fastboot working properly, read our guide.

- Enable USB Debugging option on your phone: Settings> Developer options> USB Debugging. If you do not find the developer options, you’ll have to make it visible manually. See the instructions here.
- Download and install the latest Google USB Driver on your Windows PC. Since the USB drivers is not an executable file but a zip, it requires special steps to install it. Download and extract the zip on your desktop. Connect your device to computer. Press Windows+X keys on the keyboard and click on Device Manager option. Now click on the “Other Devices” expander button. Right click on Nexus 5 (with yellow triangle sign) and select “Update Driver Software”. Then click on “Browse My Computer for Driver Software”. Locate the “latest_usb_driver_windows” folder and select Install option. When the driver is installed, you device should show in device manager as “Android Composite ADB Interface”.



















Pingback: Install Highly Functional Firefox OS on Nexus 5
Pingback: Download USB Drivers for Android: Samsung, Motorola, Sony, LG, HTC, ASUS, Huawei
Pingback: Download Android 4.4.3 KitKat OTA Packages for Nexus and GPe Devices
Pingback: Super Guía para tu Nexus: Rootear, Instalar CWM, Custom ROM, etc.