Like many people I've Nexus 7 tablet which is already 7 months old. And as a technical person I wish to be able to change anything in my device - not only parts. This howto is for people who has some technical background - ordinary users usually have no need to use root.
I wish to install firewall. Firewall require root. Root is normally achieved after changing recovery. Recovery cannot be replaced till device is locked. So lets start w/ unlocking it.
Howtos already present in the net seem to omit details required for understanding the process step by step. The most time wasting option was using windows 7 and the program 'Nexus Root Toolkit'. It supposed to do do all the work - just install one of 3 possible driver packs and press software buttons then. Unfortunately for me it was a waste of time and it was not clear why. I lost two evenings trying different drivers. The problem in my OS/hardware combination was that the tablet was invisible for software installing drivers when being in bootloader mode. But the procedure for any windows OS require two driver installs - one in normal mode, one when the tablet is in bootloader prompt. Windows way is not transparent to find a reason of failure in following Nexus Root Toolkit howto.
After all I've quickly succeeded with Linux. It took less than 30 minutes including searching the net for a recipe, downloading huge files, unpacking them and running commands.
So, the entire process of unlocking should look like this:0.
Some technical info in English about what is adb & fastboot: http://forum.xda-developers.com/showpost.php?p=29638315&postcount=2
Or some similar technical info in Russian to get a clue on what is adt, adb, fastboot and may be more:http://www.4tablet-pc.net/reviews-a-articles/143-program-adb-installing-and-configuring-the-system-user.htmlhttp://www.4tablet-pc.net/reviews-a-articles/1036-what-is-it-clockworkmod-recovery-complete-manual.html1.
Get an adb an fastboot which are included in the Android SDK .
For Linux you should get 32 or 64 bit file from 'Download for other platforms'.
I've downloaded adt-bundle-linux-x86_64-20130219.zip, so the instructions are exactly for it, but should be similar for other files.
It may look like overkill, but I just like to have all tools available. Even those that are not needed right now.
All comands below are made by uid 0 (root) in a terminal. You may use 'su -' to become root or use a 'sudo ' prefix for all your user commands.
'#' is a root prompt below.2.
Extract it someware. I've choosed /opt/android-sdk.3.
Ensure that you have correct permissions. Mine are:
[root@sunrise platform-tools]# pwd
[root@sunrise platform-tools]# ls -l
-rwxrwx---. 1 root root 1122758 Feb 13 19:33 aapt
-rwxrwx---. 1 root root 1226659 Feb 13 19:33 adb
-rwxrwx---. 1 root root 269818 Feb 13 19:33 aidl
drwxrwx---. 2 root root 4096 Feb 13 19:33 api
-rwxrwx---. 1 root root 444481 Feb 13 19:33 dexdump
-rwxrwxr-x. 1 root root 2603 Feb 13 19:33 dx
-rwxrwx---. 1 root root 176550 Feb 13 19:33 fastboot
drwxrwx---. 2 root root 4096 Feb 13 19:33 lib
-rwxrwx---. 1 root root 24867619 Feb 13 19:33 llvm-rs-cc
-rw-rw----. 1 root root 467531 Feb 13 19:33 NOTICE.txt
drwxrwx---. 4 root root 4096 Feb 13 19:33 renderscript
-rw-rw----. 1 root root 37 Feb 13 19:33 source.properties
[root@sunrise platform-tools]# 4.
Backup all you think is important from your tablet - the unlocking procedure does factory reset that wipes all user data.
I've saved all my data from windows. In linux you may use 'mtpfs /path/to/mount_point', but in my distro it looks like broken somehow.
Other things were saved by Google (use google account for backup, you may enable it in settings).
Note that it doesn't wipe files on a filesystem - only settings within installed programs.5.
Unhide developer settings: click 7 times on your 'build number' in 'About tablet' in settings.6.
Turn ON usb debugging in developer settings.7.
# cd $your_sdk_platform_tools_dir8.
Now you may omit './' for sdk platform tools. 9.
Connect your tablet to usb port.10.
# adb devices
This will 1st start a server process, it's OK.11.
Allow access from your OS in your tablet - the pop-up window will arrive at 1st access from PC. Check 'Always allow from ..' checkbox.
The hash tag describing accessing computer differs for different OS. Take in mind that anyone will be able to hack into your tablet device from your computer with similar tools once you've _always_ allowed it (Precisely - from hardware/OS pair that is always allowed). The permission dialog is hidden by a device lock screen. So you may configure your device to be locked by timeout.12.
# adb devices
Now you should see your device, if c
It may fail for some reason. Just pull out usb and push back.Also this fails if you
Ensure you have correct cable. Only some of all my micro-usb cables were OK. Recomendations are USB2.0 port and original cable.
If you can't reboot the tablet to bootloader with adb command - the bad cable may be the problem.13.
# adb reboot bootloader
This will reboot your device to bootloader prompt.
If this fails - try replace cable. Also changing a USB port may help.
After successful boot you will see a repair-android picture with a few lines of text, last one describing boot tells that it's locked.14.
# fastboot oem unlock
This is hidden option - it's absent in program help message. There're chances that it will wait after printing 'waiting for device'. If so - unplug/plug usb cable.On success the message arrives on your tablet describing warning and a choice.
If you can't success - replace usb cable. I had this issue: 'adb devices' shows device, but after 'adb reboot bootloader' fastboot did not show any device. Other fustboot commands told just 'waiting for device'. Also when replacing bootloader I had once an error while flashing recovery - that is also was a cable problem. I've replaced a cable with usb 2.0 and after that the device become visible for fastboot.
Also if 'fastboot devices' once showed device and later it doesn't - try reboot into bootloader again. Remember - fastboot works only when device is in bootloader mode. 15.
Press power button on 'Unlock' choice.16.
The device will unlock and than proceed to factory reset.17.
You're done with unlocking bootloader . Now your tablet will proceed to initial configuration dialog.18.
Repeat step 5 and 6 - become a developer and enable usb debugging.
Now it's time to replace the recovery. I wrote separate howto post for this: http://grey-olli.livejournal.com/697453.html
If this howto looks too hard or boring for you - you may consider to use this software package that claims to do all the work in a menu driven manner:
# wget galaxy-nexus-linux-toolkit.googlecode.co
There is an easy howto in Russian for it: http://www.4tablet-pc.net/reviews-a-articles/2369-root-unlock-all-google-nexus-devices-on-linux-install-cwm-recovery.html