Flashing a new OS onto a tablet requires a computer and and USB cable so it doesn’t require a lot. All the stock images from Google are freely available to download.
This is provided as a guide only and no responsibility will be taken by anyone. Proceed at your own risk.
Install the SDK https://developer.android.com/sdk/index.html
I downloaded Android Studio so the rest of the guide will use that.
Run the Android Studio installer.
Start Android studio and do what you need to do for the importing the settings (I didn’t have any).
On the Android Studio Setup Welcome screen go to Configure.
A new window will appear with a list of items that are installed or installable. Scroll down to the bottom and tick Google USB Driver.
Press Install n packages where n stands for the number of ticked items (only USB drivers are needed but other installs will not harm the setup). Follow the on screen instructions to install it.
Now move to the Nexus Device.
Go to Settings > About Device.
Tap on the build number 5-10 times. Eventually it will count down and a message appears saying Developer options are enabled.
Go back to the main settings page and go to the Developer Option.
Scroll down and tick the USB debugging option. A warning will appear but accept it.
Go back to the main settings page and go to Security.
Tick Unknown sources. Again a warning will appear but accept it to go on.
The device must be rooted so go to https://towelroot.com/ and click on the pi image to download the apk file.
Once downloaded, install the Apk. Once complete you’ll have an app called Towelroot.
Run the app and there is only one option which is a button that says make it ra1n. Click on the button to root it.
Find the SDK folder from the SDK install. By default it’s installed in C:\Users\[username]\AppData\Local\Android\Sdk\.
Plug in the Nexus 7 via USB cable.
Go to Device Manager in Windows. There will be a Nexus 7 device which has an issue. Update the driver for this device and go to your SDK directory\extras\google\usb_driver
Next add SDK Directory\platform-tools to your environment path. If this has been configured correctly open a command prompt and type in adb and press enter. If the result is command not found then the environment path is not set right. Otherwise a bunch of help will come up.
This comes to the end of the preparation stage!
Go to the Factory Images for Nexus Devices and download the correct image for your device. For mine it was razor-lrx22c-factory-a9c6e55f.tgz. Extract the file into SDK directory\platform-tools
Open a command line at SDK directory\platform-tools
With the tablet connected to the PC, type in the command prompt:
adb reboot bootloader
This will reboot the device into recovery mode. Check if it’s been locked. This is the last line on the tablet. If it is run the following command to unlock it:
fastboot oem unlock
Run the flash-all.bat file to flash the new images onto the device:
flash-all.bat
If you get a “missing system.img” message go to the section below. Otherwise when it’s complete lock the bootloader again:
fastboot oem lock
Reboot back into Android:
fastboot reboot
Rebooting into the new version may take a while (approx 5 minutes) but don’t give up and leave it going.
I got this issue and I’m not sure why. Fortunately the workaround is fairly easy but time consuming hence the script which should’ve done it for you. Find the zip file included with the factory image. Mine was called image-razor-lrx22c.zip extract it into the SDK directory\platform-tools folder.
There should be 6 .img files for the Nexus 7 Android 5.0. In the following order install the images:
fastboot flash bootloader bootloader-flo-flo-04.04.img
fastboot reboot-bootloader
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
Once complete, go back to the step above to lock the bootloader:
fastboot oem lock
Now reboot back into the Android:
fastboot reboot
It’s fairly easy to install and even easier if the batch file to upload all the image files worked. You have total control as to what firmware image you put on so long as the booloader version is supported. One major down side is every new firmware that you flash onto the device will wipe all the data.
Factory Images for Nexus Devices
Running Into The Dreaded “missing system.img” Error Flashing Android 5.0 Factory Images? Here’s How To Get Around It
Android developer site