[How To] Return your Galaxy Nexus to 100% Stock, Locked Bootloader

jntdroid

Super Moderator
Premium Member
Joined
Nov 18, 2009
Messages
6,436
Reaction score
312
Location
TX
For an easier Script to do the same thing (and more), scroll down to the asterisk line, and read below that.

Download this file [mirror] - appx 190mb - and unzip it to your desktop (contains all the files you'll need: image/zip system files, adb, and fastboot).


Thanks droid-life

[Make sure you use 7zip and not winrar - thanks GeLopez - see post #7]

Three quick notes... First, this will wipe your phone, internal storage included. Second, #6 took a few minutes for me, so don't panic - all the others went quickly. Second, if you just want to wipe your phone clean and start with a completely clean factory slate, but maintain the unlocked bootloader, stop after #8.

Now for the adb/fastboot commands... (plug your phone into your computer and make sure you have USB Debugging enabled)

Ok... if it's [blue, italicized and in brackets, it's not a part of the commands]
  1. adb reboot bootloader
  2. fastboot flash bootloader bootloader-toro-primekk15.img
  3. fastboot reboot-bootloader
  4. fastboot flash radio radio-toro-i515.ek02.img
  5. fastboot reboot-bootloader
  6. fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img [this one takes the longest - possibly a couple minutes]
  7. fastboot reboot-bootloader
  8. fastboot -w update image-mysid-icl53f.zip [If it doesn't reboot, #9 and #10 will work. If it does reboot, log in, enable usb debugging, and for #9 use "adb reboot bootloader" instead, then proceed to #10. Also, stop after #8 if you want to maintain the unlocked bootloader]
  9. fastboot reboot-bootloader
  10. fastboot oem lock
Now restart by highlighting "Start" and pressing the lock/power button.

That's it!

******************************************************************

Here's an easier/better script method from Mr. ZoSo, in this post (thanks!):


Here's a modified script that will allow you to choose between 4.0.1 and 4.0.2. (as long as you have either image or both) It also has the option to re-lock the bootloader, without the need to have the full Android SDK on your system.
I'll also update it when the official 4.0.3 images are released.
I don't take no credit for what was already done, I just modified it ;)

gnexrestore.jpg


Prerequisites:
--------------
Windows PC running XP, Vista, or Windows 7
USB and ADB drivers must be installed and working properly.
Google Images (You only need the one you want to flash to, having both is optional):
4.0.1 - https://dl.google.com/android/aosp/mysid-itl41d-factory-516b56c2.tgz
4.0.2 - https://dl.google.com/android/aosp/mysid-icl53f-factory-65895fa8.tgz


Instructions:
==========
1- Extract folder with contents of this package.
2- You will need the Google Factory image for the version you want to restore, or both if you want.
3- Extract the image files to the same folder in step one. Image files should not be in a seperate folder!
So you should have, in one folder, the above files contained in this package plus:

image-mysid-xxxxxx.zip (xxxxxx= pertains to what version)
radio-tor-i515.xxxx.img
radio-cdma-tor-i515.xxxx.img
flash-all.sh
bootloader-tor-primexxxx.img

4- Enable USB debugging in Developer options on phone.
5- Dbl click on GNexRestore.bat and follow the prompts.


Optional:
---------
If you do have the Android SDK installed, just copy the image files and GNexRestore.bat to the platform-tools folder.
fastboot.exe will also be needed, if you don't have it already, just copy the one in this package to the same location.
Then run GNexRestore.bat

Download:
Multiupload.com - upload your files to multiple file hosting sites!
 
Last edited:
OP
jntdroid

jntdroid

Super Moderator
Premium Member
Joined
Nov 18, 2009
Messages
6,436
Reaction score
312
Location
TX
Restore Stock Recovery

This is about as simple as it gets... one reason this phone is great! Also, I'm not sure if this is necessary or not... the steps above MIGHT already put the stock recovery in place.

In order for CWM to "stick", you had to rename or remove a file in /system - recovery-from-boot.p - this file erased CWM and put the stock recovery back on your phone after a reboot. If that file is in place, and is named correctly, and the permissions are set correctly (644 - see here), all you have to do is reboot and the stock recovery will be back. So if you simply renamed it to "disable" it, that's all you have to do... rename it back, set the correct permissions, reboot.

If you deleted it, download it here: download. Using Root Explorer (or whatever root file system explorer you use), put it back in /system, make sure it's named appropriately, long-press on it to change the permissions as stated, and reboot.
 
Last edited:
OP
jntdroid

jntdroid

Super Moderator
Premium Member
Joined
Nov 18, 2009
Messages
6,436
Reaction score
312
Location
TX
Thanks, this one deserves a sticky :)

already used it once... works great

feel weird stickying my own thread though... ;) though I guess it's more DL's, I just relayed the info...

ok, cleaned up a bit, made sure I tested everything myself and added a few notes... now stuck.
 
Last edited:

lifebeginsfriday

New Member
Joined
Sep 6, 2010
Messages
3
Reaction score
0
I'll end up using this eventually. I'm sure of it! Lol

Sent from my Galaxy Nexus using Tapatalk
 

BenLand150

Premium Member
Premium Member
Joined
Nov 29, 2010
Messages
1,813
Reaction score
103
Location
Lincoln, NE
Thanks! I'll be using this probably Tuesday or wed once my screen protector comes in. Have to return the phone, (battery lasts 5hrs.. has a small scratch in it from just being in my pocket..)
 

GeLopez

Member
Joined
Nov 29, 2009
Messages
683
Reaction score
6
Location
Dallas TX
i just want to add my 2 cents on this:

make sure you use 7zip and NOT winrar.
with 7zip youwill get to the folder and to all the files with full names
 
OP
jntdroid

jntdroid

Super Moderator
Premium Member
Joined
Nov 18, 2009
Messages
6,436
Reaction score
312
Location
TX
i just want to add my 2 cents on this:

make sure you use 7zip and NOT winrar.
with 7zip youwill get to the folder and to all the files with full names

ah, thanks for that - did not know that, always used 7zip...
 

mach330

Active Member
Joined
Nov 8, 2009
Messages
762
Reaction score
48
Location
The OC
did this as well. I was stupid and pulled out the battery after unlocking the bootloader then reboot. I didn't think it was that fast to unlock the bootloader and didn't think the reboot was necessary and I got impatient. STayed up til 3 am the other day. I'm glad I got it back now, fully rooted with the only ROM and wifi tether working. This is a beast!!!
 

1FZFE

Member
Joined
Dec 24, 2010
Messages
205
Reaction score
3
Location
City of Medicine
I successfully rooted and unlocked the phone and now realize that my screen is clearly defective and has been since day one. I need to return the phone for a replacement. Is it the general consensus that I need to return to a locked, unrooted state before returning the phone? This is clearly an unrelated issue to unlocking the phone, but didn't know if they would give me grief.

If so, its not a big deal because I need to become more familiar with ADB anyway. I have installed the SDK and I am trying to get ADB to recognize the phone. I have tried every driver imaginable with no luck. With the samsung drivers installed the computer recognizes the hardware normally, but ADB returns no devices when asked. I realize that this may not be necessary for this restore method, as the device pops up with "fastboot devices" when in fastboot mode. Not sure why it would be recognized in fastboot mode and not when powered up with debugging. For now, will this suffice to restore?
 

captdroid

Senior Member
Joined
Jun 30, 2010
Messages
1,797
Reaction score
17
I successfully rooted and unlocked the phone and now realize that my screen is clearly defective and has been since day one. I need to return the phone for a replacement. Is it the general consensus that I need to return to a locked, unrooted state before returning the phone? This is clearly an unrelated issue to unlocking the phone, but didn't know if they would give me grief.

If so, its not a big deal because I need to become more familiar with ADB anyway. I have installed the SDK and I am trying to get ADB to recognize the phone. I have tried every driver imaginable with no luck. With the samsung drivers installed the computer recognizes the hardware normally, but ADB returns no devices when asked. I realize that this may not be necessary for this restore method, as the device pops up with "fastboot devices" when in fastboot mode. Not sure why it would be recognized in fastboot mode and not when powered up with debugging. For now, will this suffice to restore?

Yes return the phone to factory ROM and locked before returning your phone for replacement.
 

1FZFE

Member
Joined
Dec 24, 2010
Messages
205
Reaction score
3
Location
City of Medicine
Sounds good. I am on the stock ROM just rooted and unlocked. It seems like it would be easy to lock the phone back up with a "fastboot oem lock". It is getting rid of the root that I am working on. Is it as easy as deleting the superuser.apk and uninstalling busybox?
 

1FZFE

Member
Joined
Dec 24, 2010
Messages
205
Reaction score
3
Location
City of Medicine
OK. Rebooted my system again and now ADB recognizes the phone when on and in fastboot. Go figure.

Since I have ADB working now, do I need the fastboot/adb zip listed in the OP? If not, do I just place the images in my c:\android-sdk-windows\tools folder?

Edit: It looks like c:\android-sdk-windows\platform-tools contains some of the same files as the fastboot/adb.zip. Guess I'll try there. I assume I have to direct the command prompt there before pushing the files in fastboot?
 
Last edited:

captdroid

Senior Member
Joined
Jun 30, 2010
Messages
1,797
Reaction score
17
I would just follow the OP instruction... haven't done it myself
 

1FZFE

Member
Joined
Dec 24, 2010
Messages
205
Reaction score
3
Location
City of Medicine
Yep, I ended up using the adb-windows folder in the zip that the OP suggested, since I didn't know for sure which SDK folder was correct.
 
Top