Restore Android Factory Image In Nexus 7 2013 In Linux

Restore stock android factory image in Nexus 7 2013 in Linux

The other day I installed Ubuntu Touch in Nexus 7 2013. Since it’s quite unstable and I was kind of missing Android games, I decided to restore Android back in Nexus 7 2013. I plan to dual boot Android and Ubuntu Touch, may be sometime soon.

In this tutorial we shall see how to restore Android factory image in Nexus 7 2013 in Linux. Let’s take a look at prerequisites first.

  • Nexus 7 2013 with unlocked bootloader. See this article to learn how to unlock Nexus 7 2013 bootloader.
  • USB cable
  • A computer with internet connection running on Linux, preferably Ubuntu or Ubuntu based Linux distributions.

Install Android factory image in Nexus 7 2013:

When you have all things ready, lets see the steps install Android factory image:

Step 1: Get Android factory image

First thing that you need is to get the correct Android factory image. You can get the factory images from Google here. It is important to get the correct image. Nexus 7 2013 is codenamed Razor (and not Razorg which is for 3G version).

Step 2: Extract the image and go in the directory

Once you have downloaded the correct image, extract it and go in the directory, in terminal. I presume that you know how to move around in directories in Linux terminal.

Step 3: Install the Android image to Nexus

Now is the time to install the image. Boot in to the bootloader with the following command:

adb reboot bootloader

By this time you shall see the Nexus device has been booted in the bootloader. While in the extracted directory, run a file namedย using the following command:

sudo ./

It will not take a lot of time for the image to be installed. But once the image is flashed to Nexus, you’ll see that it has booted in Android and four colored balls are bouncing. have patience as it will stay like this for some time. Afterwards, you’ll be provided with options to choose your language, Google account etc like you did for the first time you used Nexus.

Possible troubleshooting:

While flashing the image, if you see an error like this:

checking product…

Device product is ‘flo’.
Update requires ‘deb’.

It is an indication that you downloaded the wrong image. It’s a sort of protection to prevent you from installing the wrong image in Nexus. Check again and download the right image.

I hope this article helped you to restore stock Android factory image in Nexus 7 2013 in Linux. Any question or suggestion is always welcomed.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! Youโ€™ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.