HOWTO: Flash GSM Galaxy Nexus to Google Factory Image on Mac

I recently bought an unlocked Galaxy Nexus from Amazon (for various reasons, I decided to stick with AT&T despite my unsavory experiences with them over the years). It came with ICS and right after first boot, the phone upgraded itself to Android 4.0.2

However, since then Google has put out 4.0.3 and 4.0.4 but they haven’t been pushed to my device yet. I don’t know if this has anything to do with the fact that this phone was purchased in Europe and is not “officially” supported by AT&T. Either way, I decided to upgrade manually. This guide documents that process.

Step 1: Download the Android SDK

The SDK is available for download on the Android developer website. Once downloaded, follow the installation instructions.

Next, use the ‘android’ utility to download/upgrade platform tools. The screenshot below shows what you need.

Android SDK Manager

Step 2: Enable USB debugging

You need to enable USB debugging on the Galaxy Nexus to allow the developer tools access to the phone. This can be done via Settings -> Developer Info. Screenshots below have details:

Step 3: Verify that the computer recognizes your phone


$ cd /path/to/android-sdk/platform-tools

$ ./adb devices

# you should see an entry for you galaxy nexus in the output

Step 4: Unlock OEM boot loader if required

WARNING: this WILL wipe out your phone. Carefully follow the on-screen instructions to complete this process.

You only need to do this step if you haven’t unlocked the boot loader before.


$ ./fastboot oem unlock

Step 5: Download factory image

Google is publishing the GSM Galaxy Nexus images here. Download the latest image (4.0.4 as of this writing) and extract the tgz using untar.

Step 7: Flash device

Thankfully, Google has started bundling a shell script with the factory image that makes this really simple. I assume that you’ve extracted and moved all files from the factory image into the “platform-tools” directory.


$ ./flash-all.sh

Now, just wait and watch. Be patient as the phone will power cycle a few times and the bootloader will reboot at least twice. But in around a minute or so, the phone should boot up into the freshly flashed image.

All done!

9 comments

  1. joe

    Hi

    When I do ./flash-all.sh
    I got this
    ./flash-all.sh: line 17: fastboot: command not found
    ./flash-all.sh: line 18: fastboot: command not found
    ./flash-all.sh: line 20: fastboot: command not found
    ./flash-all.sh: line 21: fastboot: command not found
    ./flash-all.sh: line 23: fastboot: command not found
    any idea?

  2. Ally

    Hey, looks like you need to set up the directory for PATH. Basically, the shell script can not find the ‘fastboot’ file in order to run it.

    • Caleb

      What directory should I be on? When I enter ./flash-all.sh I end up with this
      ./flash-all.sh: line 17: fastboot: command not found
      ./flash-all.sh: line 18: fastboot: command not found
      ./flash-all.sh: line 20: fastboot: command not found
      ./flash-all.sh: line 21: fastboot: command not found
      ./flash-all.sh: line 23: fastboot: command not found
      ./flash-all.sh: line 24: fastboot: command not found
      ./flash-all.sh: line 26: fastboot: command not found

  3. Jose

    run from a terminal

    example:
    export PATH=${PATH}:/home/you user/android-sdk-linux/platform-tools
    export PATH=${PATH}:/home/you user/android-sdk-linux/tools

    Change (you user)

  4. Joe

    Everything went smoothly, but when it was finin=shed, the phone is now stuck in a Google splash screen loop. Any ideas how to get my phone working again?

  5. John

    worked smoothly. I finaly got jelly bean ota
    Tnx a lot!

    @Step 4 you should mention that to unlock the bootloader you must boot your phone into fastboot mode (press and hold both the volume-UP and volume-DOWN buttons and then press the power button)

Leave a Reply