Digital Electronics

Restore Nexus 5 to stock and Flash factory images (Win/ Mac/ Linux)

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, the capability to tweak and optimize your device, and the 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 it 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 could recover my Nexus 5.

While not all Android OEMs provide stock firmware 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 images from the official site.

Download and set up the Android SDK platform-tools 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 an administrator, check the Google USB drivers and install it. skip this step you have already done it.

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.

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 the 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 the install option. When the driver is installed, your device should show in the device manager as “Android Composite ADB Interface”.

Restore Nexus 5 to Stock: The Steps

Having made the required preparations and downloaded the correct factory image for your Nexus 5, you can now proceed to flash it. here are the steps to restore Nexus 5 to stock firmware:

Unzip the downloaded factory image file with .tgz extension. Please note that downloaded with some browsers, the factory image file is saved to your computer as a .tar file. in that case, you should change the file extension to .tgz so that you might extract it.

Open the extracted factory image folder. You would find a zip file inside. Unzip it too.

Now copy all the contents of the image directory to the Platform-tools directory under C:/Program Files/Android/sdk.

Also, copy the contents of the zip file to the same directory. See the screenshot below to get a clearer idea of the path of the files and also the image files that need to be flashed using fastboot commands.

Now it’s time to turn off your device and boot it into Bootloader/Fastboot mode. You can do it by holding the volume Down+Power buttons for 2-3 seconds.

Connect your Nexus 5 to the computer using a USB cable.

Now open the platform-tools folder where you have copied the factory image files and launch a command window. You can do this by pressing the Shift+Right-click on the mouse at an empty spacenull

Leave a Reply

Your email address will not be published. Required fields are marked *