Nexus S 4G Return to Stock Google Firmware

This procedure explains how to get your Nexus S 4G back to stock Google firmware. This procedure should be very similar for the Nexus S and Galaxy Nexus phones.

An important thing to note is the stock Google firmware is different than the stock carrier (Sprint, AT&T, etc) firmware. In my experience, the stock carrier firmware has a script that checks for a modified recovery partition and will forcefully rewrite a stock recovery. The Google firmware does not do this, and thus I prefer the Google firmware over the carrier firmware.

This procedure will wipe all software modifications to the phone and restore it to a fresh-from-factory out-of-the-box state. You can restore to either 2.3.7 “Gingerbread” or 4.0.4 “Ice Cream Sandwich” or 4.1.1 “Jelly Bean” – just pick which firmware you want to download from the Google Android Factory Image page here:

Open factory image zip and extract your radio .img file – in this particular case it was called “radio-crespo4g-d720sprkh1.img” but yours may be different. You can rename it to radio.img for simplicity or leave it. I left it as “radio-crespo4g-d720sprkh1.img” for consistency.

Open up the image zip from inside the factory image zip and extract your boot, recovery, system, and userdata images.

Put all five image files into the same directory as your fastboot.exe binary – if you installed the Android SDK, this could be in one of the following directories depending on what version of Windows you have installed and what installer options you selected:

C:\Program Files\Android\android-sdk\platform-tools
C:\Program Files (x86)\Android\android-sdk\platform-tools 

Open up a command window in this directory by going to C:\Program Files\Android\android-sdk\ and then shift-right-click the “platform-tools” directory, and then selecting “Open command window here” – you will now be dropped into the Windows shell prompt in the same directory as your five image files and the fastboot.exe binary.

Now, boot your Nexus S into recovery mode by turning it off, then holding the volume-up button and pressing the power button.


Unlock the OEM bootloader:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe oem unlock

OKAY [ 8.078s]
finished. total time: 8.078s
C:\Program Files\Android\android-sdk\platform-tools>


Now flash the boot image:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe flash boot boot.img
sending ‘boot’ (2936 KB)…
OKAY [ 0.375s]
writing ‘boot’…
OKAY [ 0.438s]
finished. total time: 0.813s
C:\Program Files\Android\android-sdk\platform-tools>


Flash the system image:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe flash system system.img
sending ‘system’ (206191 KB)…
OKAY [ 26.282s]
writing ‘system’…
OKAY [ 23.625s]
finished. total time: 49.907s
C:\Program Files\Android\android-sdk\platform-tools>


Flash the recovery image:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe flash recovery recovery.img
sending ‘recovery’ (3176 KB)…
OKAY [ 0.406s]
writing ‘recovery’…
OKAY [ 0.453s]
finished. total time: 0.859s
C:\Program Files\Android\android-sdk\platform-tools>


Flash the userdata image:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe flash userdata userdata.img
sending ‘userdata’ (18796 KB)…
OKAY [ 2.391s]
writing ‘userdata’…
OKAY [ 2.094s]
finished. total time: 4.484s
C:\Program Files\Android\android-sdk\platform-tools>


Flash the radio image. Make sure you use the actual filename:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe flash radio radio-crespo4g-d720sprkh1.img
sending ‘radio’ (15232 KB)…
OKAY [ 1.969s]
writing ‘radio’…
OKAY [ 15.360s]
finished. total time: 17.328s
C:\Program Files\Android\android-sdk\platform-tools>


Relock the bootloader:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe oem lock

OKAY [ 0.047s]
finished. total time: 0.047s
C:\Program Files\Android\android-sdk\platform-tools>


Always a good idea to clear the cache:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe erase cache
erasing ‘cache’…
OKAY [ 1.688s]
finished. total time: 1.688s
C:\Program Files\Android\android-sdk\platform-tools>


Reboot the phone:

C:\Program Files\Android\android-sdk\platform-tools>fastboot.exe reboot

finished. total time: 0.000s
C:\Program Files\Android\android-sdk\platform-tools>


You’re all set now. Your phone should now boot up with the stock firmware, with the stock kernel, and with the stock bootloader and radio with no root or superuser. You should clean up the five restore images in the “C:\Program Files\Android\android-sdk\platform-tools\” – now go enjoy your stock phone!

Did you find any of the information useful? Have I helped you save a bit of money / time / frustration? I've spent a lot of time taking pictures and meticulously documenting everything to post it here. I'd really appreciate it if you could send me some money via Paypal! This helps defray the cost of running this website and also provides me with beer to continue writing these articles. Thanks!

1 Comment

  1. Hi,
    Can you please send me the instructions for a Nexus S and MacOSX.
    I would really appreciate. I have been looking on the web for a week now for directions like you just gave above.
    My Nexus S, is completely stuck. I just got the Google logo at start up.
    Please help.
    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *