Android has a "jail" that limits user apps to claim its own user and group (one Linux user for one app). The default '/bin/su' program denies the access from these user apps. Thus we need to replace the default su by some 3rd party ones to get root access from apps(as well as adb). That is 'rooting'.
Many manufacturers don't like user to change their system (/, /system, etc.), so they employed a technique called 'BootLoader Lock' which will deny any unauthorized changes to the system partitions. Literally, the "Unlock" procedure will nullify the lock (by some means, be it official or exploiting). As we want to replace the 'su', we first need to unlock the machine.
Recovery is a small, in-memory Linux, which is designed for 'emergency' use (e.g. the main Android system broke down and cannot boot up). Many developers try to make use of the Recovery system, mainly for flashing custom roms, backing up and debugging. Therefore, we need a Recovery to flash the 'su' into the machine.
- sudo apt-get install android-tools-* (since 13.04 Saucy)
- or manually install from SDK.
- Download su from http://goo.gl/A2hfJ
- Download CWM Recovery from http://www.clockworkmod.com/rommanager.
- Use LTE version.
- (optional) Backup all the data from Nexus 7.
- Turn off the phone.
- Hold Vol- and Press Power.
- Plugin the USB cable.
- Issue the following command on PC terminal.
fastboot oem unlock
- Choose "Yes" on the Nexus 7.
WARNING: ALL DATA WILL BE DISCARDED AFTER UNLOCKING THE PHONE - Flash Recovery
fastboot flash recovery path/to/CWM-grouper-recovery.img
- Boot into recovery
Use vol- to select "Recovery mode" and press power to enter. - Install su
- install zip
- install zip from sideload
- issue
adb sideload path/to/UPDATE-SuperSU-v1.94.zip
on PC
- Reboot
- Test it