Android OS Forum banner

[How-To][VZW] Return to Factory State (Unroot and Relock)

116K views 142 replies 78 participants last post by  zer0ed77 
#1 · (Edited by Moderator)
Performing these steps will return your Verizon Galaxy Nexus to factory software/firmware. Just like it was when you pulled it out of the box.
This means the sdcard partition will be erased, so backup if you need to.

If you are bootlooping or soft-bricked and cant figure out how to fix the problem, doing these steps should bring it back to life.

DOWNLOADS:

NOTE: The file you download will be a compressed archive, so you will need to extract it. This is explained in the instructions below.

Download the version you want to flash from here https://developers.g...us/images#mysid

INSTRUCTIONS:

NOTE: These instructions require that you have adb and fastboot already setup and ready to use. They are the same things used when you unlocked and rooted the phone. If you don't have it setup, let me know and I'll provide instructions.

1. Download the factory image archive you want to flash to your phone and save it to your desktop. OPTIONAL: When it's done downloading verify the md5. You can use MD5 Check to do that.

2. Extract the factory image archive to the folder that you have adb and fastboot in. Normally your adb and fastboot are located in the "C:\android-sdk\platform-tools folder" on your hard drive. You can use 7-zip to do the extracting.

NOTE: If on Windows, you can put the phone into bootloader mode and run the flash-all.bat batch file and it will do all the flashing commands for you and take you to step 5 of this guide.

NOTE: If on Linux or Mac, you can put the phone into bootloader mode and run the flash-all.sh script and it will do all the flashing commands for you and take you to step 5 of this guide.

3. When you're done extracting those files into the same folder that has adb and fastboot, open a command prompt window by holding the shift key, then right click in the window with your adb and fastboot and factory image files, then choose "Open command window here".

4. Ensure USB Debugging is enabled on your phone and connect it to your PC, then type the following commands, one at a time, into the command prompt window:

Note: The first command listed below will reboot your phone into bootloader mode. If your phone is soft-bricked or bootlooping, that command might not work. So, if you're phone is not booted up, just manually put your phone into bootloader mode by powering off your phone, then hold the volume up + volume down + power buttons, until it vibrates. Now it's in bootloader mode and you can skip the first command.

WARNING: Be careful not to move your phone around or mess with the usb cable while doing the following commands. You don't want to accidentally disconnect it. That might end up bad.

Use these commands for flashing the files:
(Reminder: As stated above, you can run the flash-all.bat file (for Windows) or the flash-all.sh file (for Linux or Mac) to perform all these flash commands for you. If you'd still like to do it manually, continue.)
Note: replace the ? symbols with the actual file name you're flashing. They are different depending on which factory image you downloaded.
Code:
adb reboot bootloader<br />
fastboot flash bootloader bootloader-toro-primel???.img<br />
fastboot reboot-bootloader<br />
fastboot flash radio radio-toro-i515.????.img<br />
fastboot reboot-bootloader<br />
fastboot flash radio-cdma radio-cdma-toro-i515.????.img   (Note: This one takes a couple minutes. Be patient)<br />
fastboot reboot-bootloader<br />
fastboot -w update image-mysid-??????.zip
Note: After you enter the last command listed above (fastboot -w update image-mysid-??????.zip), your phone will be busy for a several minutes. It will also reboot a couple times. Just be patient and it will finish.

5. If you want to leave your bootloader unlocked, you are done. Your phone now has all the factory software/firmware installed. If you want to relock the bootloader, continue to step 6.

6. Your phone will now be at the Welcome screen to begin setting up android. After you finish doing the initial setup of your device, go into Settings-Developer Options and enable USB Debugging. Then type the following commands into your command prompt window to lock the bootloader.

Code:
adb reboot bootloader<br />
fastboot oem lock
7. Now just press the power button and your phone will reboot. ALL DONE.
 
See less See more
#3 ·
Quick question... I thought I'd read somewhere (or saw a screenshot of the warning the phone displays when you unlock the bootloader) that a flag is permanently set, ostensibly to create a permanent record on the device that you'd unlocked it at some point. Did I just imagine this, or is there really some indicator left on the device even if you totally restore it that will show that you'd unlocked it at some point?
 
#20 · (Edited by Moderator)
it's a little different on MacOS. Try this:
  1. open Terminal.app
  2. type sudo emacs ~/.bash_profile
  3. emacs should open up with the terminal's profile document in the buffer(window).
  4. look for a line that begins 'export PATH', if you don't see it then go to the head of the file and add this:
    1. export PATH=[path-to-sdk-platform-tools-directory]:$PATH
  5. if you already do have a PATH statement, just tack it on the the end of the list of directories just before the $PATH and end it with a colon:))
    1. example: export PATH=/opt/local/bin:~/android-sdk-macosx/platform-tools:$PATH
  6. press ctrl+x, then ctrl+s to save it.
  7. press ctrl+x, then ctrl+c to close emacs.
  8. Quit Terminal.app and restart it.
  9. you should be in business now. :)
 
#22 · (Edited by Moderator)
I had the touch bootloader on my phone, now that I have reverted back to stock, when i enter the bootloader i just get the dead android with red triangle. Do i need to reflash the stock bootloader again? I thought that the prime115k.img would have done this.

Edit: I had to mess with the buttons in the recovery screen to get to the options. Thanks for the flash revert. I have a sim card error i believe and have to get everything buttoned up for the store visit.
 
#23 ·
hey razor loves (or anyone that can help)
im about to get a new galaxy nexus from verizon because my old one keeps getting a "no service" sign at on the lockscreen when i reboot my phone.
do you think i need to unroot and relock my phone before i send it in?
and if it is the case can you provide the information provided in the op about how to install the adb and fastboot files? i think i might of deleted them.
 
#25 · (Edited by Moderator)
Code:
adb reboot bootloader<br />
fastboot flash bootloader bootloader-toro-primekk15.img<br />
fastboot reboot-bootloader<br />
fastboot flash radio radio-toro-i515.ek02.img<br />
fastboot reboot-bootloader<br />
fastboot flash radio-cdma radio-cdma-toro-i515.ek05.img   (Note: This one takes a couple minutes. Be patient)<br />
fastboot reboot-bootloader<br />
fastboot -w update image-mysid-icl53f.zip
It Fails after each attempt

Everywhere I've look I'm not seeing the answer to my issue.

I fully understand how to use adb but this time I'll at a stand still. Recovery only shows a blank screen I can only access Fastboot.

http://imageshack.us/photo/my-images/254/capture1cv.jpg/
 
#27 ·
thanks bro these instructions were perfect, I had ADB already set up so it was a breeze
 
  • Like
Reactions: razorloves
#32 ·
i am getting an error that says the files can't be loaded. i get the error on each file. I have all the files in my platform-tools folder and i get the error when i run the flash-all script (im on OS X) and when i manually type in each command. Anyone else getting this issue?
 
#35 ·
Hoping to get some quick feedback as I need to return this device for a warranty claim. I was able to get through all of the commands to get the stock OS reloaded. I'm now trying to re-attach to the device so that I can lock it back up. I am unable to attach to the device through adb, though. USB is connected and debugging is turned on. I keep getting the following...

c:\android\android-sdk\platform-tools\adb shell
shell@android:/ $ adb reboot bootloader
adb reboot bootloader
error: device not found
1|shell@android:/ $

What am I missing??
 
#38 ·
Does anyone know of a way to accomplish this procedure without a working USB port? My USB port is messed up, confirmed with weird charging connections and no PC connection. I tried Wifi Sync Manager, but it seems i can only use it to transfer photos/media/audio, and can't access it like I need to be able to. Basically, I need a program that lets me access my phone via wireless sync so that I can issue the appropriate fastboot commands that way, if it's even possible. Thanks!
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top