[Samsung Galaxy Nexus] efrant:
EDIT: November 14, 2012: As of today this is applicable to all three versions of the Galaxy Nexus: maguro (GSM/HSPA) and toro (Verizon CDMA/LTE) and toroplus (Sprint CDMA/LTE). I have also updated the adb and fastboot files to the latest versions as of today.

I have created this thread to give a step-by-step on how to flash the latest yakju/takju (or mysid for toro users) build available on Google's developer site. (These are full ROMs. See this thread for updating to latest OTA build using incremental updates.)

This method works for earlier builds as well, and is essentially a "return-to-stock" method.

You can easily convert ANY GSM/HSPA (i.e., maguro) device to stock yakju (or takju) from any non-yakju build (yakjuxw, yakjuxs, yakjuux, yakjusc, yakjuzs, yakjudv, yakjukr, yakjujp, yakjuxe, etc.).

For toro and toroplus devices (i.e., Verizon and Sprint devices), this will return your device to stock.

I will no longer be be providing support in the previous thread here, as it has over 1,000 replies and a lot of confusing information/misinformation.

Note: There are other methods that are abbreviated and/or faster, but I wanted to spell out each step in the process for the purposes of learning. I'm a big believer in doing things manually before using a "toolkit", much the same way that, in school, we are taught to do math first, before being allowed to use a calculator. I will continually add to this post to make it clearer as we go along.

So, without further ado:

How to flash yakju/takju on your GSM/HSPA Galaxy Nexus (or how to flash mysid on your Verison CDMA/LTE Galaxy Nexus and mysidpr on your Sprint CDMA/LTE Galaxy Nexus)

Step-by-step

Notes:

1) For the n00bs: read the entire post before proceeding;

2) This method is EXACTLY the same as a "return to stock" method. If you follow this (including the optional steps in part D), you will be fully stock.

3) yakju is a generic build, meaning no specific localizations. There are reports that yakju does NOT contain certain dictionaries (such as Norwegian, Swedish, Danish, and possible others). So, if you currently have these dictionaries, and want to keep them, do not flash yakju or takju.

4) MacOS-specific instructions: a) replace fastboot in the steps below with ./fastboot-mac and b) no drivers required.

A. Install the drivers

1) Do not install the Samsung drivers or the pdanet drivers, or any other driver you come across. If you have, and you are SURE they are working properly, fine, leave them. Otherwise uninstall them if you are unsure;

2) Download the drivers from here;

3) Install the drivers. This step is the only part of the entire process that is not easy to explain, and may cause users some issues, depending on what drivers they had installed previously, what OS they are using, etc. etc. Bourne-nolonger has put together a very detailed step-by-step on how to install them. If you don't know how to install them, have a look at his post here. Note that the driver has to install twice: once when your device is booted normally (not required for this tutorial) with USB Debugging enabled in Settings, and once when your device is booted in fastboot (i.e., bootloader) mode (which is required for this tutorial). If you are using Windows 8, you will need to do this before installing the drivers.

B. Backup your data

1) Backup all your personal data (e.g., photos, music, etc.) OFF of your device and onto your computer by using whatever method you want that works for you, e.g., MTP, ADB, email, Dropbox, Box.net, whatever.

2) This method will wipe your entire device, including the /sdcard folder, so once you do this, you will not be able to retreive anything that was on your device previously.

3) Once you have backed up your data, you may want to back up your current build (not required). If so, follow the instructions in this thread.

C. Download the required files to your computer and extract them

1) All of the files that are required, need to be in one (i.e., the same) directory. It does not matter what it is called, but all the files need to be in there, with NO subfolders. EVERYTHING needs to be extracted into this one directory;

2) Download the platform-tools-v16.zip attachment from this post and extract the contents to the directory created in step 1.

3) Download the version of Android you want from here. So, let's say you want the yakju JRO03C image, go to the JRO03C link that is under the heading Factory Images "yakju" for Galaxy Nexus "maguro" (GSM/HSPA+). Older versions are no longer available on that site; however, oldblue910 has provided a mirror on his site: Random Phantasmagoria.

4) Download the appropriate version (for your computer) of 7-zip from here and install it.

5) Extract the files from within the .tgz file which you downloaded in step 3 using 7-zip, not WinZip or WinRAR or whatever.

6) Make sure you have extracted ALL the files (including extracting any files in any archives inside the .tgz file). You should have six (6) files (or seven for toro and toroplus devices) ending with .img in the directory you created in step 1. The other files you extracted from the .tgz are not necessary;

7) Reboot your device into bootloader mode (by turning it off, hold volume up and volume down, and press and hold power) and plug it into your computer;

8) Open a command prompt in the same directory (i.e., make sure you are in the same directory as your files are located) and do the following:

D. Type in the commands into the command prompt

1) Make sure your computer recognizes your device by typing: fastboot devices

2) Unlock your bootloader (if you have not already done so): fastboot oem unlock

3) You will see a prompt on your device. This will wipe your entire device (including the /sdcard folder). Accept. Note: you use the volume keys to change the option and the power button to accept. You cannot use the touch screen.

4) Reboot by typing: fastboot reboot-bootloader

5) Flash the bootloader: fastboot flash bootloader bootloader-maguro-primela03.img (or whatever the name of the bootloader image that you downloaded).

6) Reboot (not required if you did not do step 5): fastboot reboot-bootloader

7) Flash the radio: fastboot flash radio radio-maguro-i9250xxla02.img (or whatever the name is of the radio image that you downloaded).

8) Reboot (not required if you did not do step 7): fastboot reboot-bootloader

8a) Verizon and Sprint devices only -- flash the LTE radio: fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img (or whatever the name is of the radio image that you downloaded).

8b) Verizon and Sprint devices only -- reboot: fastboot reboot-bootloader

9) Flash the system partition: fastboot flash system system.img

10) Flash the data partition: fastboot flash userdata userdata.img Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked. See note 5 below for optional items.

11) Flash the kernel/ramdisk: fastboot flash boot boot.img

12) Flash the recovery partition: fastboot flash recovery recovery.img

13) Erase the cache partition: fastboot erase cache

15) Reboot: fastboot reboot

16) Done! The first boot will likely take quite a bit longer than you are used to, as Android builds the Dalvik cache.

E. Optional -- Root

1) After finishing this process, if you want to root, see here.

Notes on optional items and other issues:

1) This note is NOT for n00bs. To be on a "yakju" (or takju) build, all you need is the system and data images. If you want to flash the newer bootloader, radio, kernel (boot image) or recovery, go ahead. If you want to flash a different ones go right ahead, that is fine also.

2) Yes, you will receive the OTA update notification (when it is available) for the next update, regardless of which bootloader, radio, kernel or recovery you are running.

3) BUT, being on yakju or takju does NOT mean you will get the OTA notification immediately when it is announced/available. It could still take minutes or months (yes, months) following the first person who got it, before you get it. The advantage of yakju and takju , is that the updates are available before the other builds, so you can manually install them yourself. See here.

4) WHEN you get the update notification, IF you want it to install automatically, you will need to ensure that that you are using the corresponding boot, radio and recovery images for the .tgz package you downloaded. Otherwise, the update will not install automatically, but it will install using a custom recovery like CWM. See this thread for details.

5) This note is NOT for n00bs. There has been a lot of uncertainty and questions around stock ROMs and losing/wiping data. You CAN flash a stock ROM WITHOUT losing the data stored in /sdcard (and possibly even all apps and app data, although this depends on which apps you have installed). This can be done by skipping step 10 in part D. However, if your device goes into a boot loop, you will need to boot CWM, and wipe data <-- this will wipe your apps and app data, but not /sdcard.

6) Jelly Bean requires a newer bootloader. I would not flash anything earlier than LA03, or you may have issues.

Notes on the bootloader:

1) Do NOT re-lock your bootloader after you are finished. The is no need.

2) Having an unlocked bootloader does not affect anything related to the ROM/GoogleWallet/OTAs. Nothing at all.

3) If your bootloader is locked, you CANNOT use fastboot commands. This is pretty much the only thing it affects.

4) If your bootloader is locked, and you need to unlock it, it will wipe everything, including /sdcard. This is the major drawback of re-locking your bootloader.

5) ONLY re-lock your bootloader if you need to return your device to the store. The command is: fastboot oem lock

6) As of June 2, 2012, a method has been found to unlock the bootloader without wiping (but root is required), and segv11 put it together in an app for us. See here. So, if you have root, there is no issue with re-locking the bootloader if you want -- just make sure you don't lose root, or you will have to wipe to unlock it again.