Sunday, December 18, 2011

Galaxy Nexus : how to get the 4.0.2 update on the GSM/HSPA+ "yakju" / "maguro" model, NOT for Verizon's CDMA/LTE "mysid" / "toro" model

There are different methods out there on how to bring your GSM/HSPA+'s Galaxy Nexus (« yakju » / « maguro » model) to 4.0.2 if you can't wait for the OTA update :
According to Jean-Baptiste M. "JBQ" Queru, a software engineer working on Android Open-Source Project (AOSP) at Google, the factory image contains a flash-all.sh script. Here is the script that can be found in the yakju-icl53f factory image (just expand the archive to see the contents) :

fastboot flash bootloader bootloader-maguro-primekk15.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-maguro-i9250xxkk6.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-yakju-icl53f.zip

Notice the « -w » in the last script line « fastboot -w update image-yakju-icl53f.zip ». This command line option ask fastboot to "erase userdata and cache" partitions aka wipe out the "userdata and cache" (Android Partitions Explained: boot, system, recovery, data, cache & misc).

In the instructions given in the article HOWTO Manual update to 4.0.2 using factory imgs, w/o wiping phone, the « -w » has been removed from the last script line :

fastboot flash bootloader bootloader-maguro-primekk15.img
fastboot reboot-bootloader
(wait for bootloader to reboot)
fastboot flash radio radio-maguro-i9250xxkk6.img
fastboot reboot-bootloader
(wait for bootloader to reboot)
fastboot update image-yakju-icl53f.zip

As stated by Jean-Baptiste Queru in his post about the Factory images available for Galaxy Nexus,
Don't forget that after flashing back to a factory state, your bootloader is still unlocked. Don't forget to lock it back in order to secure your device ("fastboot oem lock").

Unlock the Galaxy Nexus bootloader
For both procedures, before manually updating to 4.0.2, your bootloader will have to be unlocked first. The procedure can be found here HOW-TO OEM unlock the Galaxy Nexus.

As stated in Building for devices from the « Android Open Source Project » reference site,

The procedure must be confirmed on-screen, and deletes the user data for privacy reasons. It only needs to be run once.

On Nexus One, the operation voids the warranty and is irreversible.

On Nexus S, Nexus S 4G, Xoom, and Galaxy Nexus, the bootloader can be locked back with

The ClockworkMod Recovery
The procedure to manually install the OTA requires to install the latest version of the ClockworkMod Recovery for the GSM/HSPA+ "maguro" Galaxy Nexus.

Here is a rather complete guide on the « ClockworkMod Recovery » : What Is ClockworkMod Recovery And How To Use It On Android [Complete Guide]. Here is the pitch on « ClockworkMod Recovery » :

All Android devices ship with a recovery console that is basically a partition on the device’s internal memory and can be booted into. The stock recovery of almost all Android devices provides a few basic yet handy options that allow you to factory reset your device and also to recover its operating system using an official ROM in zip format, but that’s all you can do with it. That’s where a custom recovery comes handy.

A custom Android recovery basically replaces the stock recovery with one that lets you do all you can do with the stock recovery, plus a plethora of more options to give you a lot more control on your device. With a custom recovery, you can install official and unofficial ROMs as well as other updates including apps, themes, kernels etc. using zip files, wipe not just user data but pretty much every partition on your device, mount the storage card for USB mass storage access without leaving recovery, partition your SD card, wipe Dalvik cache and battery stats, fix permissions, perform, manage and restore backups and so on.

In most cases, the simplest method to install the « ClockworkMod Recovery » on your device is provided in How To Install ClockworkMod Recovery On Your Android Phone. If it does not work, alternative method can be found in What Is ClockworkMod Recovery And How To Use It On Android [Complete Guide]

By the way, here are other useful resources about Android :