Ubuntu: Flash Galaxy Nexus with Google Firmware

Jelly Bean Logo

Android Jelly Bean logo

Some days ago I realized that Galaxy Nexus was shipped with different Firmware’s from Samsung and Google (see this post on xda). And because my Phone has Samsung’s Firmware, my Android Version is still on Jelly Bean 4.1.2. This how-to shows how to do this on Ubuntu. This procedure will clean your phone, you need to backup all data before you start! (photos, videos, music, sms…)

Install the Android utility fastboot

This utility usually comes with Android Developer Tools. But in this package only a 32-Bit version is available. Since Ubuntu 12.10 you can get fastboot directly from the repository (there are PPA’s for other Ubuntu versions, see this blog post):

$ sudo apt-get install android-tools-fastboot

If you plan to develop for Android anyway, you can use fastboot which comes with Android Developer Tools. In order to make this fastboot version running on a Ubuntu 12.10 64-Bit installation you have to install the ia32-libs:

$ sudo apt-get install ia32-libs
$ unzip android-sdk_r21.0.1-linux.tgz
$ cd adt-bundle-linux-x86_64
$ export PATH=${PATH}:{$PWD}/sdk/tools:${PWD}/sdk/platform-tools

At that point, the command fastboot should work.

Note: You can also install android-tools-fastboot from Ubuntu repository (since 12.10) or from a PPA (see this Blog post).

Unlock the Bootloader

Android Bootloader

Android Bootloader

Google describes the procedure in detail for all their devices. For the Galaxy Nexus it boils down to

  1. Shutdown your Phone
  2. Press and hold both Volume Up and Volume Down, then press and hold Power
  3. Now you should see Android with an open belly
  4. List detected devices (running as root)
    # fastboot devices
    <SERIALNUMBER> fastboot
  5. Since the devices shows up, you can unlock it
    # fastboot oem unlock
  6. Confirm the message on your display

Flash the Android Image

Google has a download page for all the official Firmware’s. I downloaded the “yakju” 4.2.1 release for Galaxy Nexus. This package contains a bash script which uses fastboot to flash your Android device. All you have to do is call this script…

$ tar xvzf yakju-jop40d-factory-279cdc5d.tgz
$ cd yakju-jop40d/
$ sudo su
# ./flash-all.sh

sending 'bootloader' (2308 KB)...
OKAY [ 0.312s]
writing 'bootloader'...
OKAY [ 0.299s]
finished. total time: 0.611s
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.007s
sending 'radio' (12288 KB)...
OKAY [ 1.618s]
writing 'radio'...
OKAY [ 1.379s]
finished. total time: 2.998s
rebooting into bootloader...
OKAY [ 0.007s]
finished. total time: 0.007s
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: PRIMELC03
Baseband Version.....: I9250XXLH1
Serial Number........: <SERIALNUMBER>
--------------------------------------------
checking product...
OKAY [ 0.007s]
checking version-bootloader...
OKAY [ 0.008s]
checking version-baseband...
OKAY [ 0.008s]
sending 'boot' (4400 KB)...
OKAY [ 0.579s]
writing 'boot'...
OKAY [ 0.268s]
sending 'recovery' (4900 KB)...
OKAY [ 0.651s]
writing 'recovery'...
OKAY [ 0.324s]
sending 'system' (425775 KB)...
OKAY [ 55.922s]
writing 'system'...
OKAY [ 37.458s]
erasing 'userdata'...
OKAY [ 0.301s]
formatting 'userdata' partition...
Creating filesystem with parameters:
 Size: 14539534336
 Block size: 4096
 Blocks per group: 32768
 Inodes per group: 8144
 Inode size: 256
 Journal blocks: 32768
 Label: 
 Blocks: 3549691
 Block groups: 109
 Reserved block group size: 871
Created filesystem with 11/887696 inodes and 97200/3549691 blocks
sending 'userdata' (137559 KB)...
writing 'userdata'...
OKAY [ 29.531s]
erasing 'cache'...
OKAY [ 0.013s]
formatting 'cache' partition...
Creating filesystem with parameters:
 Size: 452984832
 Block size: 4096
 Blocks per group: 32768
 Inodes per group: 6912
 Inode size: 256
 Journal blocks: 1728
 Label: 
 Blocks: 110592
 Block groups: 4
 Reserved block group size: 31
Created filesystem with 11/27648 inodes and 3566/110592 blocks
sending 'cache' (8832 KB)...
writing 'cache'...
OKAY [ 2.917s]
rebooting...

finished. total time: 128.019s

Thats it!

Leave a Comment