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

Discussion in 'Galaxy Nexus Development' started by jntdroid, Dec 16, 2011.

  1. jntdroid
    Offline

    jntdroid DF Super Moderator Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    6,437
    Likes Received:
    292
    Trophy Points:
    83
    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 ;)

    [​IMG]

    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: May 18, 2012
  2. jntdroid
    Offline

    jntdroid DF Super Moderator Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    6,437
    Likes Received:
    292
    Trophy Points:
    83
    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: Dec 16, 2011
  3. czerdrill
    Offline

    czerdrill New Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    0
    Thanks, this one deserves a sticky :)
  4. jntdroid
    Offline

    jntdroid DF Super Moderator Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    6,437
    Likes Received:
    292
    Trophy Points:
    83
    Location:
    TX
    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: Dec 16, 2011
  5. lifebeginsfriday
    Offline

    lifebeginsfriday New Member

    Joined:
    Sep 6, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I'll end up using this eventually. I'm sure of it! Lol

    Sent from my Galaxy Nexus using Tapatalk
  6. BenLand150
    Offline

    BenLand150 Premium Member Premium Member

    Joined:
    Nov 29, 2010
    Messages:
    1,787
    Likes Received:
    75
    Trophy Points:
    48
    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..)
  7. GeLopez
    Offline

    GeLopez New Member

    Joined:
    Nov 29, 2009
    Messages:
    684
    Likes Received:
    8
    Trophy Points:
    0
    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
  8. jntdroid
    Offline

    jntdroid DF Super Moderator Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    6,437
    Likes Received:
    292
    Trophy Points:
    83
    Location:
    TX
    ah, thanks for that - did not know that, always used 7zip...
  9. mach330
    Offline

    mach330 Member

    Joined:
    Nov 8, 2009
    Messages:
    683
    Likes Received:
    0
    Trophy Points:
    16
    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!!!
  10. 1FZFE
    Offline

    1FZFE Member

    Joined:
    Dec 24, 2010
    Messages:
    205
    Likes Received:
    3
    Trophy Points:
    18
    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?
  11. captdroid
    Offline

    captdroid New Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    0
    Yes return the phone to factory ROM and locked before returning your phone for replacement.
  12. 1FZFE
    Offline

    1FZFE Member

    Joined:
    Dec 24, 2010
    Messages:
    205
    Likes Received:
    3
    Trophy Points:
    18
    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?
  13. 1FZFE
    Offline

    1FZFE Member

    Joined:
    Dec 24, 2010
    Messages:
    205
    Likes Received:
    3
    Trophy Points:
    18
    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: Dec 20, 2011
  14. captdroid
    Offline

    captdroid New Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    0
    I would just follow the OP instruction... haven't done it myself
  15. 1FZFE
    Offline

    1FZFE Member

    Joined:
    Dec 24, 2010
    Messages:
    205
    Likes Received:
    3
    Trophy Points:
    18
    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.
  16. jntdroid
    Offline

    jntdroid DF Super Moderator Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    6,437
    Likes Received:
    292
    Trophy Points:
    83
    Location:
    TX
    sorry... was absent for a bit (and will be more tonight)... yeah that folder has been a lifesaver - MUCH easier than messing with the sdk for the average user that just needs it for this stuff
  17. 1FZFE
    Offline

    1FZFE Member

    Joined:
    Dec 24, 2010
    Messages:
    205
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    City of Medicine
    Thanks for posting it. It worked like a charm. Now I just need to make it back to the store for a replacement.

    Sent from my Galaxy Nexus using Tapatalk
  18. tgyberg
    Offline

    tgyberg Well-Known Member

    Joined:
    Dec 18, 2009
    Messages:
    3,824
    Likes Received:
    239
    Trophy Points:
    63
    Location:
    Minneapolis, Minnesota
    This assumes that, since you've unlocked and rooted, you have fastboot/adb installed... if not, download this zip, extract it, and use it as your adb/fastboot "tools" directory.

    I am unlocked and rooted but how do I know if I have fastboot/adb installed? If not and I extract the zip, where does the "tools" directory go? Is it another drop it in to C: like the root folder was in Sbenson's root/unlock write up? I don't need this yet but I'm trying to understand everything in case I do! Thanks
  19. 1FZFE
    Offline

    1FZFE Member

    Joined:
    Dec 24, 2010
    Messages:
    205
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    City of Medicine
    It doesn't matter where you put the folder as long as you direct the command prompt there. I have it on my desktop.

    Sent from my NookColor using Tapatalk
  20. tgyberg
    Offline

    tgyberg Well-Known Member

    Joined:
    Dec 18, 2009
    Messages:
    3,824
    Likes Received:
    239
    Trophy Points:
    63
    Location:
    Minneapolis, Minnesota
    So is this fastboot/adb in that root folder from the rooting process? I'm not sure if I do have this or where to get it from? Thanks again!


    *edit, looked in that root folder and saw the adb and fastboot exe's so that's it! Open the command prompt from that folder and good to go!
    Last edited: Dec 22, 2011
Search tags for this page
flash galaxy nexus back to stock
,
galaxy nexus back to stock
,
galaxy nexus revert to stock
,

how to restore galaxy nexus to stock

,

how to return galaxy nexus to stock

,
how to take galaxy nexus back to 100% stock
,
lock galaxy nexus bootloader
,

restore galaxy nexus to stock

,

return galaxy nexus to stock

,
return to stock galaxy nexus
,
returning galaxy nexus to stock
,
verizon galaxy nexus back to stock