To start off, remember you can always download the factory stock images for the GSM Galaxy Nexus directly here:
Factory Images for Nexus Devices
For the purpose of this guide currently, we want the "takju" 4.2 (JOP40C) image.
This will completely wipe your device, including /sdcard. Backup any data you wish to save by copying to your computer, uploading to Dropbox/Google Drive, or whatever your preferred method is.
Here are the GENERAL INSTRUCTIONS TO RESTORE THE STOCK IMAGES. Make sure you know how to do it for your computer/setup and that ADB and fastboot is set up on your computer. In addition, make sure you know how to type the commands in for your specific setup. For example, if you're using a superboot folder for Mac, you need to make sure you understand what your "version" of the "beginning" of the command is (usually "./fastboot-mac" if you're using that r3-superboot folder). For Ubuntu, be sure to put "sudo" before any and all fastboot commands.
[INFO]
First, download the 4.2 JOP40C image files to your computer. These specific files are found here.
Second, extract the files from that downloaded file. Place those files in an easily accessible location, like your desktop or your downloads folder.
Third, turn your phone off. Then, hold down volume up, volume down, and the power button at the same time to boot you into the bootloader. It should say "FASTBOOT MODE" in weird (red?) lettering on the screen. Make sure the phone is connected (by USB cable) to your computer.
Note - you can also to do this in the terminal with an ADB command; make sure USB Debugging is checked (Developer Options) and your phone is plugged in. Simply type:
Fourth, open up a terminal/command prompt on your computer.
Fifth, using the command line, you need to "cd" or "change directory" to where your files are. This might be different depending on what computer you're on. If you are on Ubuntu and they are on the Desktop, do this:
If they are in your Downloads folder, then try this:
Then, "cd" or "change directory" again to the folder that you extracted (takju-jop40c I believe). So, it would be
or
(Double check this, because I do not have my folder in front of me at the moment)
Sixth, once at the folder containing the goods, you need type in the following commands. Each command will flash a different component/image required to go to stock. You can copy and paste each command, but if they don't work type them in. There's a general "language" that's being spoken here, so as long as you understand that language you'll be able to get the general jibe of what's going on. Also, make sure each command is COMPLETE before going to the next.
Check to make sure your computer recognizes your phone by typing:
If you're currently on a custom ROM or have unlocked your bootloader, skip this next step.
If you are currently stock, and have yet to unlock your bootloader, then unlock your bootloader (again, this will completely wipe your device!):
You will be prompted to accept the unlock on the screen. Select "Accept". Then reboot:
Now we get to the fun part, actually flashing the device. Again, in the command line:
Wait 10 seconds
Wait 10 seconds
And you're done! Boot up and sign into your Google Account. Enjoy Jelly Bean 4.2.[/INFO]
[INFO]If you're restoring your device for a warranty replacement, or want to relock the bootloader, follow steps 7 and 8. (remember, locking the bootloader is not necessary to receive OTA updates, and if you ever want to flash the device again, you'll completely wipe the device again by unlocking.):
Seventh, let the phone reboot COMPLETELY to the "Welcome" screen. Then turn the device off and get back to the bootloader (see the third step). Also, don't close the terminal/command prompt window, you still need it!
Eighth, lock the device by using the following command in the terminal/command prompt, and then reboot the bootloader:
You should now see "LOCKED" at the bottom of that bootloader screen on your device. If so, reboot the device:
[/INFO]
Credit for this guide goes out to dmmarck for his fantastic guide for the Verizon Galaxy Nexus, found here.
Factory Images for Nexus Devices
For the purpose of this guide currently, we want the "takju" 4.2 (JOP40C) image.
This will completely wipe your device, including /sdcard. Backup any data you wish to save by copying to your computer, uploading to Dropbox/Google Drive, or whatever your preferred method is.
Here are the GENERAL INSTRUCTIONS TO RESTORE THE STOCK IMAGES. Make sure you know how to do it for your computer/setup and that ADB and fastboot is set up on your computer. In addition, make sure you know how to type the commands in for your specific setup. For example, if you're using a superboot folder for Mac, you need to make sure you understand what your "version" of the "beginning" of the command is (usually "./fastboot-mac" if you're using that r3-superboot folder). For Ubuntu, be sure to put "sudo" before any and all fastboot commands.
[INFO]
First, download the 4.2 JOP40C image files to your computer. These specific files are found here.
Second, extract the files from that downloaded file. Place those files in an easily accessible location, like your desktop or your downloads folder.
Third, turn your phone off. Then, hold down volume up, volume down, and the power button at the same time to boot you into the bootloader. It should say "FASTBOOT MODE" in weird (red?) lettering on the screen. Make sure the phone is connected (by USB cable) to your computer.
Note - you can also to do this in the terminal with an ADB command; make sure USB Debugging is checked (Developer Options) and your phone is plugged in. Simply type:
Code:
[SIZE="2"]adb reboot bootloader[/SIZE]
Fourth, open up a terminal/command prompt on your computer.
Fifth, using the command line, you need to "cd" or "change directory" to where your files are. This might be different depending on what computer you're on. If you are on Ubuntu and they are on the Desktop, do this:
Code:
[SIZE="2"]cd Desktop[/SIZE]
If they are in your Downloads folder, then try this:
Code:
[SIZE="2"]cd Downloads[/SIZE]
Then, "cd" or "change directory" again to the folder that you extracted (takju-jop40c I believe). So, it would be
Code:
[SIZE="2"]cd foldername[/SIZE]
Code:
[SIZE="2"]cd takju-jop40c[/SIZE]
(Double check this, because I do not have my folder in front of me at the moment)
Sixth, once at the folder containing the goods, you need type in the following commands. Each command will flash a different component/image required to go to stock. You can copy and paste each command, but if they don't work type them in. There's a general "language" that's being spoken here, so as long as you understand that language you'll be able to get the general jibe of what's going on. Also, make sure each command is COMPLETE before going to the next.
Check to make sure your computer recognizes your phone by typing:
Code:
[SIZE="2"]fastboot devices[/SIZE]
If you're currently on a custom ROM or have unlocked your bootloader, skip this next step.
If you are currently stock, and have yet to unlock your bootloader, then unlock your bootloader (again, this will completely wipe your device!):
Code:
[SIZE="2"]fastboot oem unlock[/SIZE]
You will be prompted to accept the unlock on the screen. Select "Accept". Then reboot:
Code:
[SIZE="2"]fastboot reboot-bootloader[/SIZE]
Now we get to the fun part, actually flashing the device. Again, in the command line:
Code:
[SIZE="2"]fastboot flash bootloader bootloader-maguro-primelc03.img[/SIZE]
Code:
[SIZE="2"]fastboot reboot-bootloader[/SIZE]
Wait 10 seconds
Code:
[SIZE="2"]fastboot flash radio radio-maguro-i9250xxlh1[/SIZE]
Code:
[SIZE="2"]fastboot reboot-bootloader[/SIZE]
Wait 10 seconds
Code:
[SIZE="2"]fastboot flash system system.img[/SIZE]
Code:
[SIZE="2"]fastboot flash userdata userdata.img[/SIZE]
Code:
[SIZE="2"]fastboot flash boot boot.img[/SIZE]
Code:
[SIZE="2"]fastboot flash recovery recovery.img[/SIZE]
Code:
[SIZE="2"]fastboot erase cache[/SIZE]
Code:
[SIZE="2"]fastboot reboot[/SIZE]
And you're done! Boot up and sign into your Google Account. Enjoy Jelly Bean 4.2.[/INFO]
[INFO]If you're restoring your device for a warranty replacement, or want to relock the bootloader, follow steps 7 and 8. (remember, locking the bootloader is not necessary to receive OTA updates, and if you ever want to flash the device again, you'll completely wipe the device again by unlocking.):
Seventh, let the phone reboot COMPLETELY to the "Welcome" screen. Then turn the device off and get back to the bootloader (see the third step). Also, don't close the terminal/command prompt window, you still need it!
Eighth, lock the device by using the following command in the terminal/command prompt, and then reboot the bootloader:
Code:
[SIZE="2"]fastboot oem lock[/SIZE]
Code:
[SIZE="2"]fastboot reboot-bootloader[/SIZE]
You should now see "LOCKED" at the bottom of that bootloader screen on your device. If so, reboot the device:
Code:
[SIZE="2"]fastboot reboot[/SIZE]
Credit for this guide goes out to dmmarck for his fantastic guide for the Verizon Galaxy Nexus, found here.
Last edited: