Difference between revisions of "Nexus Howto"
| Line 1: | Line 1: | ||
In order to do anything with a Nexus phone, the first thing you'll need is a working [[Android | android development framework]]. This guide is the only one I've found geared toward doing this in a Linux environment, which seems sort of ridiculous, since Android is a linux based platform. | In order to do anything with a Nexus phone, the first thing you'll need is a working [[Android | android development framework]]. This guide is the only one I've found geared toward doing this in a Linux environment, which seems sort of ridiculous, since Android is a linux based platform. | ||
<br><br> | <br><br> | ||
| − | [[Setting Developer Options]] | + | In order to perform any advanced tasks on your Nexus, you'll need to first [[Setting Developer Options | enable developer options]]. |
Revision as of 23:47, 10 January 2013
In order to do anything with a Nexus phone, the first thing you'll need is a working android development framework. This guide is the only one I've found geared toward doing this in a Linux environment, which seems sort of ridiculous, since Android is a linux based platform.
In order to perform any advanced tasks on your Nexus, you'll need to first enable developer options.
Once into the bootloader, you'll need to unlock it. THIS WILL WIPE ALL OF THE DATA ON THE NEXUS PHONE. So have all of your goodies backed up before you do this, or better yet, make this the first thing you do when you take your Nexus out of the box.
$ fastboot oem unlock
Once you've issued the command, the phone should prompt you as to whether or not to proceed. Once you've chosen to do so, your phone will now be unlocked, and you can flash it with a custom recovery image.
Download the latest recovery image (or not) for your phone model. You can get them from the CWM site. Note, for my nexus for, the Mako recovery image (6.0.2.0) worked, while the Manta recovery image (6.0.2.3) did not. To flash the recovery image,
$ fastboot flash recovery /path/to/yourrecoveryimage.img
It should only take a few seconds to do this. Once completed, you should see a message similar to
sending 'recovery' (XXXX KB)... OKAY writing 'recovery'... OKAY
If you see a message saying FAILED, it's probably because you haven't unlocked the bootloader.
You should now have an unlocked phone with a custom CMW recovery image that you can use to perform nandriod backups. This only gets us halfway to our goal, however, which is achieving root access to the device. The next step is to download the SU package, or a package containing SU and Busybox (which contains all your favorite linux commands and allows you to use them in a shell on your phone). The best way to find this is by searching google, since it is usually hosted by an ever changing file cloud download service of some kind. It should be in a .zip file: once you've downloaded it, you'll need to use adb to push it to the sdcard on your Nexus.
$ adb push /path/to/SU.zip /sdcard/SU.zip
You should see something similar to
XXXX KB/s (XXXXXXXX bytes in X.XXX secs)
Now that the package is on the device, you can install it using your newly flashed recovery image. From the menu on your phone, use the volume up/down keys to select "Recovery mode", and use the power button to select it. You should notice that the initial Google screen should now have a symbol of an unlocked padlock in the bottom middle.
Once in the recovery menu, select "install zip from sdcard", then "choose zip from sdcard". If you copied the SU zipfile correctly, you should see it in the root of your sdcard and should be able to select it. If you don't, you'll need to go back to the previous step. There is an option from the main menu "mounts and storage", if you still can't seem to find the SU zip on your sdcard, you can select "mount sdcard" and trying the push process again. There seems to be some sort of abstraction with newer Nexus models that makes this more difficult than it should be.
After you've installed the binary, choose "+++++Go Back++++++" until you're back at the main menu. At this point, it would be a good idea to wipe the phone's caches and any data, which may give you problems during bootup. In the main menu, you'll want to choose "wipe cache partition" and "advanced" then "wipe davlik cache". At the main menu, choose "wipe data/factory reset". This will completely virginzie the phone.
Finally, choose "reboot system now". This should bring you up to the initial greeting screen. You should see the Android loading screen, and the prompts to set up your phone for the first time.
Congratulations! You now have a rooted Nexus, as you should.