# [Guide] Ultimate Galaxy Nexus Guide (Unlock/Root/Flash Roms/FAQ)



## Jubakuba (Sep 8, 2011)

*Unlocking The Bootloader And Obtaining Root*
*This part of the tutorial is geared towards Windows users. I have a windows machine and will post instructions only on methods I personally have tested. This guide will assist other users. Once we unlock and root your device: this guide will be relevant to everyone.*
Time required:
20-40 minutes.

*Setting up ADB for our device:*
Cyanogenmod has a guide that you can follow to set up ADB.
Or...you can use this page to download the "ADB for Dummies AIO App."
This will automatically install ADB for you to your C:\ directory. It's very very simple this way.
Now, place this fastboot.exe file in your C:\android-sdk-windows\platform-tools (or possibly simply called tools, if you set up ADB ages ago) folder.

Now you have ADB installed! Congratulations.

*Unlocking the Bootloader:*
***NOTE***
This will perform a factory reset on your device. You'll lose all applications. You'll lose everything. Even the data on your SD Card! Backup your SD to your computer BEFORE performing this. There is a method for backing your applications up, detailed HERE.

Get the driver:
Samsung's website has a download here under "Manuals & Downloads > Software."
PDAnet's drivers may work if the above option doesn't. Simply install PDAnet (after uninstalling any previous attempted driver installations) to get the drivers.
While that is downloading, on your Galaxy Nexus: turn USB debugging on.
This can be found in Settings>Developer Options>USB Debugging
Once the drivers are installed, navigate to the C:\android-sdk-windows\platform-tools folder on your computer.
Hold shift and right click. Select "Open Command Window Here."
On your phone: turn USB Debugging On. This can be found in Settings>Developer Settings.
Plug your phone into the computer. Now in this command window type:

```
<br />
adb reboot bootloader<br />
```
(Hit Enter)
Your phone should now boot into a screen with a green android with his chest exposed.
Type this:

```
<br />
fastboot oem unlock<br />
```
(Hit Enter)
_If your Command Prompt displays the message "waiting for device" your driver wasn't successfully installed.
Close the Command Prompt window and open Device manager while your phone is still plugged in. (Search for it using the search option)._
_Right Click the "Android" option and select Update Driver. Choose to "Browse My Computer" and "Let Me Pick From A List." Pick the Samsung driver with the newest date and install it. Now retry the code above._
Your phone will ask if you want to unlock it. Select "Yes" by using the volume keys and use power to select it.
Now, navigate to "Recovery Mode" with the volume keys. Use power to select.
A screen with another Android will pop up. Press Volume Up, Volume Down, and Power all at the same time.
Select Factory Reset. This process may take a few minutes. Be patient and let it work.
Once finished, select "Reboot."
Your phone is now unlocked!

*Obtaining Root Access and Custom Recovery:*
Download the following:
SuperUser
ClockworkMod Recovery
Place the recovery-clockwork-5.5.0.2-maguro.img file into your C:\android-sdk-windows\platform-tools folder.
Put the Superuser-3.0.7-efghi-signed.zip on your phone.
Open another Command Prompt if it isn't still open. (Navigate to C:\android-sdk-windows\platform-tools and shift + right click. Select "Open Command Window Here.")
With your phone plugged in type:

```
<br />
adb reboot bootloader<br />
```
(Hit Enter)
And wait for your phone to boot into the android again.
Now type:

```
<br />
fastboot flash recovery recovery-clockwork-5.5.0.2-maguro.img<br />
```
(Hit Enter)
CDMA RECOVERY
For Verizon Phones
Change the code above to the correct file name. All other instructions are the same.
Once that is finised: select the "Recovery Mode" option again on your phone.
You should get a new recovery menu here. Select "install zip from sd card" and "choose zip from sd card."
Find the Superuser-3.0.7-efghi-signed.zip that you transferred earlier and select "Yes" to installing.
Navigate back to "Reboot" and reboot your phone.
You're now rooted!
However, ClockworkMod Recovery won't continue to load after this.
To fix this, find "Rom Manager" from the market. (The free version is fine.) Use the "Flash ClockworkMod Recovery" option.

Congratulations!
Your phone is now unlocked, rooted, and has a custom recovery!
Continue reading the next posts for info on getting custom roms, kernels, tweaks, and more!

***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***

Thanks:
Google, for making Android a reality.
VanillaTbone, for the ADB AIO app.
DrMacinyasha, for the updated SuperUser .zip.
Droid-Life, for a previous guide that I used as an outline while writing this one.
ClockworkMod team, for being a part of making our phones as awesome as they are.
The assorted developers who continue to push out amazing material for us to use.
The awesome community: for endlessly supporting both Android itself and its users.


----------



## Jubakuba (Sep 8, 2011)

*Installing Custom Roms Kernels and Tweaks*
All of the instructions below require you to be rooted. Please follow the guide above and return here when you're done.

*Backing Your Files Up**:*
Time required:
15-25 minutes.

Making a Nandroid
The first thing you're going to want to do is back up your phone's entire system. This is done by making a "nandroid."
To do this, boot into ClockworkMod Recovery. To accomplish this: Turn your phone off. Once it is completely off: hold both volume buttons and the power button until the Android with his chest exposed is displayed. Navigate to the "Recovery Mode" option and select "backup."
This will take some time. Be patient and let it finish. This process is important! You should always have a recent nandroid available on your device.

Backing Your Applications Up
Install Titanium Backup from the market.
Open Titanium Backup. A Superuser request should pop up. Allow it. Note: if Titanium Backup then says it failed to obtain root access; press the menu button and select more>reload application.
Press menu>batch. Select "Backup all User Apps." Select all and "Run the Batch Operation."
Let the process complete. This may take quite some time: depending on how many applications you have installed.

Backing Your Contacts Up
Note: This process may or not be useful to you. The Google servers should automatically import any contacts you have stored back whenever you install a new rom. Also note that Facebook/Google+/etc contacts will need to be synced again through their respective applications.
Open the Contacts application.
Press the Menu button.
Select import/export.
Export to storage.

Miscellaneous Backups 
Bookmark / SMS / Call Log backup applications can be found on the Android Market. I don't personally use them. But those who do have had varying success with imported data displaying in the wrong order or not working at all. Use them if you'd so desire. Just know that they may or may not work as you intended.

*Installing A Rom (Or Kernel/Radios/Tweaks/Themes/etc.)*
Time Required:
5-10 minutes.

Note:
Follow the guide above about backing your phone up before attempting!
This guide will also work for flashing kernels/radios/themes/tweaks/etc. Simply ignore the part about wiping data and wipe whatever the thread says you should.

Find a Rom You'd Like To Try:
Here are a few options (you can use whatever you'd like throughout the forums):
Android Open Kang Project
Apex
GummyNex
CM9 Nightlies
Bugless Beast

Download the rom you'd like to try on your device.
Most roms also require you to install "gapps" as well.
You can find the correct ones for the rom you're using in the rom thread.
Make sure the Rom and Gapps are on your SD card.
Boot into ClockworkMod Recovery by turning your device completely off. Hold volume up, volume down, and power until the green Android with the open chest is displayed. Navigate to "Recovery Mode" with the volume buttons and select using the power button.
Remember to have a recent nandroid before continuing!
Navigate to "wipe data/factory reset" and select it. Select "yes."
Wait for the process to complete. This may take some time. Be patient!
Once complete: Navigate to "Install Zip from SD card" and "Choose zip from SD card."
Find the rom's .zip and install it. Once that completes install any applicable gapps' .zip.
Select the "Reboot" option.
Congratulations! Your phone should now boot into the custom rom!
Follow the prompts to re-activate your phone.

*Restoring Your Applications / Contacts* */ Nandroid*
Time Required:
5-15 minutes.

Restoring Your Applicaions
Install Titanium Backup. Note: you may want the pro key. If you have it, you won't have to manually click "install" on each application. The process is completely automated. Open Titanium Backup (grant root access. If titanium says it failed to obtain root access, press menu>more>reload application). Press menu>batch>restore missing apps with data. Now, here you have a choice to make. Do you want a completely clean install? Select "app only" and run the batch operation. Do you want all of your application data (saved games/settings/etc)? Select "app+data" and run the batch operation. This MAY cause you problems or it may not. Personally, I often restore application data and seldom run into any trouble. If you do find that restoring data caused problems, follow the guide above to re-install your rom and restore without data. This process will take some time. Be patient (I'd suggest turning your screen off so the screen doesn't burn, but that's just me.) It will vibrate upon completion.

Note:
Overclocking/CPU tweaking applications should never be restored with data. Simply deselect it from the list.
Facebook/Haxsync/Google+ may have problems restoring your contacts when installed through Titanium Backup. Simply uninstall and reinstall through the market (and be sure to log in and select to sync your contacts again).
Also, if you have NFC Task Launcher successfully launching Tasker tasks with your stickers: they may not immediately work.
Through my testing, it's as simple to fix as uninstalling NFC Task Launcher and Tasker. Restore Tasker first. Then restore NFC task launcher.

Restoring Your Contacts
If google fails to restore your contacts (not facebook/haxsync/google+/etc) you may import them manually if you backed them up.
Open the contacts application and press menu>import/export>import from storage.

Restoring A Nandroid
If your phone is acting funny or won't boot...restore a nandroid from a previous rom or working set-up.
You may also use a Nandroid to switch back to a previous rom if you decide you don't like the one you're on.
Do this by booting into ClockworkMod Recovery (hold volume up, volume down, and power while your phone is off and navigate to "Recovery Mode").
Simply select "restore" and find the most recent (or relevant) backup.
This process will take some time. Be patient and let it complete! Once done, select "Reboot."

Note:
Nandroids are stored in the clockworkmod>backup folder on your SD card. They take up quite a bit of space. ALWAYS have at least one recent one on your SD card. However, since these are huge files: you may like to delete old ones to save space.
Also note, these backup folders can be renamed if you want to keep track of them more easily. However, don't use any spaces or special characters as doing so will cause a "MD5 mismatch" error upon restoring. Only use the alphabet!

Important Notes About Restoration
I outline the method of using Titanium Backup above for a reason. Restoring system applications and data is the most common cause of problems on custom roms. For this reason, always ONLY restore "missing applications" from "user applications" that were backed up when restoring onto a new rom. Every time you restore system data or applications a narwhal sodomizes your favorite childhood cartoon. This is FACT.

Installing Alternate Custom Recoveries
If you find a custom recovery (such as the touch-recovery options) that came as a .img file:
Use these instructions to flash. Plug your phone into the computer. Open up ADB. Move the .img to the C:\android-sdk-windows\platform-tools folder.
Type the following:

```
<br />
adb reboot bootloader<br />
```
(Hit Enter)
You can also manually boot to the bootloader by powering off and holding volume down, volume up, power buttons until the green Android with his chest exposed is displayed.
Then type:

```
<br />
fastboot flash recovery FILENAME.img<br />
```
(Replace the file name with whatever the .img is called and Hit Enter).
Wait for the process to complete and reboot.

***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***


----------



## Jubakuba (Sep 8, 2011)

*FAQ*

Roms/Kernels

Q: What is the best rom?
A: The "best" rom is a matter of opinion. Do you like a certain customization and can't live without it? Use a rom that has that option.

Q: What is the best rom for battery life?
A: Roms themselves really shouldn't impact your battery all that much. They can have an impact, but if you're really looking for better battery I'd suggest swapping kernels or tweaking yours.

Q: What is the best rom for stability?
A: All of the roms out are "stable." They may have options that don't work correctly, but generally: this is user error. If you follow my advice on installing a rom, you'll end up with MUCH fewer bugs.

Q: What is the best kernel?
A: The best kernel is a matter of opinion. Some users may love one, while others swear by another. Find one you like and tweak it accordingly.

Q: How do I tweak a kernel for better battery?
A: Generally, you'll want to either change your governor and or undervolt and or underclock your kernel. This is done either by using SetCPU or similar apps, or with an option in your rom (usually labeled "performance" or something similar). Take note: extremely high/low voltages may cause instability. Never "set at boot" until you've thoroughly tested the options you've set. Testing includes low strain (like turning your screen off for an hour) and high strain (like playing a game for an hour) scenarios. To be extra safe: run the values for a couple days before setting them at boot. Follow the users ideas in the kernel's threads for some guidelines. However, remember that not all values will play nicely with all phones.

Miscellaneous

Q: Why does my phone perform so bad on benchmarking tests?
A: This depends on what you define as "bad." Does your phone feel fine? Ignore it. If your phone is really sluggish...you're running bad kernel settings or have bad data somewhere. That being said: our phones aren't going to be FANTASTIC with these benchmark tests. Sorry, but they aren't. We have a huge screen. And huge pixel density. And our GPU isn't the greatest of greats. This isn't bashing on the nexus at all. I'd rather have a phone that performs in every day use than a phone that gets a "FANTASTIC" benchmark but feels groggy when I perform simple tasks.

Q: Where can I get the latest Google Wallet (Verizon has blocked access for CDMA users)?
A: Scan THIS with any barcode scanner. Open the link with the "Play Store."

Q: Does my ass look good in these shorts?
A: Yes.

Panic Section! (Something is Wrong)

Q: My phone won't boot!
A: The easiest option is to get into recovery and restore a nandroid using the above guide (pull battery to put phone in an off-state if needed).
However, more advanced options are available if you don't have a nandroid available (You're naughty).

Do you have another rom .zip available on your SD card? If so, simply use the above guide for installing a rom to get you booting again.
If not, you can download one on your PC. Boot into fastboot (the green Android with open chest menu).
Move the .zip to the C:\android-sdk-windows\platform-tools folder.
Open ADB.
Change the NAMEOFZIP.zip below to the correct file name...and perform the action.

```
<br />
adb push NAMEOFZIP.zip /sdcard/<br />
```
(Hit enter)
Now get into recovery and follow the guide above for flashing a rom to get you booting again.

Did you install a tweak that modified only a file or two on your phone? (Find this out by opening the .zip and looking in the folders (ignore META-INF). Good news! We MAY be able to recover you completely. If this doesn't work...you'll have to follow another method.
Get your phone into fastboot (the boot-menu that allows you to select recovery/reboot/etc). Start up ADB. Pull the files that were modified out of the stock rom's .zip (using whatever tweak you were installing as reference to find what was changed) that you're on into the C:\android-sdk-windows\platform-tools folder. Now we're going to push these files onto your phone...replacing the tweaked ones and hopefully getting you booted again. Use this code, but change the values of the file name and where it should reside. This is only an example!

```
<br />
adb push framework-res.apk /system/framework/framework-res.apk<br />
```
(Press enter after each file that you need to replace).
Note: This last option probably won't work. I'd just skip over it unless you're absolutely adamant about restoring your current setup and want to try everything possible.

Q: My phone gets really sluggish and often turns off or reboots on its own.
A: Without knowing anything about your situation...I'd say you either have severely bad data somewhere or some bad kernel tweaks. Use the rom install guide above, paying close attention to the part about backing up and restoring if you haven't already. In the case of a kernel problem, you're likely undervolting too low. Restore the stock kernel values and see if your problems subside.

Q: My phone screen won't turn on! This requires a battery pull to fix.
A: This is called a "Black Screen of Death" or BSOD. This is generally due to using a governor such as InteractiveX or HotplugX or possibly undervolting your device too low. Change governors or up your slots a bit.

Q: My phone is doing really weird things. Regardless of kernel/rom and even if I don't restore any data at all! Either that or I simply cannot boot up! My phone is possessed no matter what I do!
A: Razorloves has made a wonderful guide on restoring your phone back to stock. You can find it Here.
Evostance made one for the GSM users, found Here.

Neat Ideas / How to Show Off the Galaxy Nexus
-Get some NFC stickers. Tagstand has them available.
You can use these to make your phone perform certain tasks when you touch the sticker. Use NFC Task Launcher to define the tasks. These are capable of doing simple things like muting your volume to the more complex like turning on Tasker tasks that do things like auto-reply to text messages while you're at work.

-Do you have any suggestions? Submit them below!

***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***


----------



## ScooterG (Jan 1, 2012)

I was worried about my ass. Thanks for that.

Sent from my Galaxy Nexus using RootzWiki


----------



## Pathology (Feb 6, 2012)

Nice guide! I found this whole searching for some help using Tasker and decided I should give props where props are due!

---------------------------
Sent from the the voices in my head.


----------



## Jubakuba (Sep 8, 2011)

Take note, that you'll need to be using CyanogenMod's method for setting up ADB to do this. The ADB AIO application installs an older SDK without this functionality. First, get your drivers installed (detailed in post one). Input this after running the "adb reboot bootloader" command.

Type this:

```
<br />
adb backup -apk -noshared -all -nosystem -f C:\backup.ab<br />
```
(Hit Enter)
Your phone will ask for a password. Input one and remember it.
Once the process completes: continue with unlocking and rooting your phone.

Upon unlocking and rooting your phone: open up ADB again.
Enter this code:

```
<br />
adb restore C:\backup.ab<br />
```
(Hit Enter)
Input the password you saved to this file earlier, and wait for the restore to complete.


----------

