Google Nexus devices are always exciting in terms of development. The best part about a Nexus is the ease with which it can be rooted and a custom recovery loaded on it. With Google already taking preorders for the Nexus 7, let's discuss how your new tablet can be set up for development.
As always, you must have the Android SDK setup and the proper drivers installed. For those who don't have the SDK, head here and download it. Once it's downloaded, run the installer_r20-windows file and walk through the install. When prompted for the install location, be sure to select C:\ADB. As the install finishes, a box will be checked to run the SDK Manager for the first time. Selecting “Next” with the box checked will open up a new window:
By default the boxes for the Android 4.1 API's may be checked; if so feel free to leave them that way. For our purposes, the boxes that need to be checked are the “Tools”, “Android SDK Tools”, and “Android SDK Platform Tools”. Once they're checked, hit the “Install” button. Once the packages are installed, close the SDK Manager.
Now that the Android SDK is installed, you need to download the Superuser package and Clockworkmod Recovery. Head here for SuperSU, and here for CWM. Be sure to save these to C:\, which is the root of your hard drive so that they will be more manageable later on. With SU and CWM downloaded, we now need to unlock your device.
Plug the Nexus 7 into your PC. Open a command prompt and type cd c:\ADB\platform-tools. Push the SU package we downloaded earlier to your device with adb push C:\SuperSU.zip /sdcard. Now type adb reboot bootloader and once rebooted fastboot oem unlock. Note: this will erase all user data on your tablet, so be sure to back up any data that you do not want to lose. Since the device's bootloader is unlocked we can now load recovery.
To flash the Clockworkmod Recovery downloaded earlier, type (still in the same window as before) fastboot flash recovery C:\CWM-grouper-recovery.img. Now at this point, recovery is still not permanent. In order to make it permanent, first boot into the CWM recovery and type from command prompt:
my recovery-from-boot.p recovery-from-boot.bak
What the above commands do is prevent a file present in the Android system partition from deleting your custom recovery upon every reboot. This leads to the last step in the process, which involves installing superuser to ensure you have root access. Remember the SuperSU package we pushed to your SD partition? Reboot to recovery and select the option to flash a .zip from SD. Choose SuperSU.zip and flash it. Reboot the phone, and presto: you now have a fully unlocked and rooted Nexus 7 and you're ready for custom ROMs!