| || |
[GUIDE] Return Your GSM Nexus to Stock / Flash to "takju" (now Android 4.2)
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.
[HL]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.[/HL]
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.
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.
adb reboot bootloader
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
(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:
fastboot oem unlock
Now we get to the fun part, actually flashing the device. Again, in the command line:
fastboot flash bootloader bootloader-maguro-primelc03.img
Wait 10 seconds
fastboot flash radio radio-maguro-i9250xxlh1
Wait 10 seconds
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
And you're done! Boot up and sign into your Google Account. Enjoy Jelly Bean 4.2.[/INFO]
fastboot erase cache
[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:
Credit for this guide goes out to dmmarck for his fantastic guide for the Verizon Galaxy Nexus, found here.