Before starting, make sure you have working adb (Android Development Bridge) tool on your PC. adb.exe is part of Android SDK, so if you have Android Studio, you should already have adb. If not, you can download Android Studio (or SDK only) from developer.android.com.
Warning: following instructions below will wipe all data on your tablet.
Step 1 - Unlock bootloader
- Enable USB Debugging on Nexus 7. Settings > Developer Options > USB Debbuging
Developers Options by default are disabled on all Android tablets. To enable them, got to Settings > About tablet and tap multiple times on Build Number
- Connect Nexus 7 to your PC with USB cable. When you get a prompt "Allow USB debugging" choose OK.
- Open command prompt and navigate to the location of adb.exe.
Exact path where the file is located depends on where you installed Android SDK. i.e. D:\sdk\platform-tools
- Run command adb reboot bootloader
Nexus 7 should reboot into FastBoot mode.
- Run command fastboot oem unlock. Accept a warring on the device.
- Nexus 7 should now have bootloader unlocked.
Step 2 - Install custom recovery
- Download custom recovery image. WinTeam Recovery v188.8.131.52 for Nexus 7 (2012) can be downloaded from here. Or check wrp.me for other versions and other devices.
- Put device into FastBoot mode again - adb reboot bootloader.
- Install custom recovery by issuing following command:
fastboot flash recovery "D:\twrp-184.108.40.206-grouper.img"
Where D:\twrp-220.127.116.11-grouper.img - path to your downloaded recovery image.
- Custom recovery should now be installed.
To verify, while still in fastboot mode, use volume up and down keys to find Recovery Mode option, then press Power Button to reboot into recovery. TeamWin Recovery should load.
Step 3 - Install custom OS
- Download you custom OS image. (i.e. CyanogenMod) and appropriate version of Google Apps.
- Copy both downloaded files to your Nexus 7.
- Reboot the tablet into Recovery Mode
Volume UP + Volume DOWN + Power, then choose Recovery Mode from the menu and press Power button again.
- In TamWin Recovery choose Wipe > Factory Reset
- Now choose Install, then find your custom OS image and confirm installation.
- Install Google Apps in exactly the same way.
If you are getting "Error Code 70 - Insufficient storage space available in system partition", you will need to download smaller Google Apps package, try nano version.