How to flash Samsung Galaxy Nexus with the latest factory imageI was running CyanogenMod on a Google/Samsung Nexus Galaxy and decided to go back to the stock Google image from the Factory Images for Nexus Devices page. The latest factory image for the Galaxy Nexus is 4.3 (JWR66Y).
Make sure to download the correct image for your Nexus phone. In my case it's "yakju" for the Galaxy Nexus "maguro" (yakju-jwr66y-factory-09207065.tgz).
I downloaded the yakju archive and extracted the .tgz with 7za:
curl -k -O https://dl.google.com/dl/android/aosp/yakju-jwr66y-factory-09207065.tgz
7za x yakju-jwr66y-factory-09207065.tgz
7za x yakju-jwr66y-factory-09207065.tar
I wanted to see if I had the Samsung driver installed on my Windows 8.1 laptop: Go to Device Manager:
So, no clearly I didn't have the driver for the phone yet: Device Manager shows the Nexus phone as "Unknown USB Device (Device Descriptor Request Failed)".
At this point, I decided to put the phone into fastboot anyway and see if I could flash the factory image without the Samsung driver (hint: no, it didn't work):
To use adb.exe and fastboot.exe, I just used the Android SDK in my Android Studio installation. I added the sdk/platform-tools folder to my PATH and put the device into fastboot mode:
adb reboot bootloader
Now the phone is in fastboot mode (while in "fastboot mode" you can "flash" the Android firmware, i.e. modify the system image / operating system):
However, as I feared, fastboot.exe couldn't see the phone, because the Samsung driver wasn't installed, i.e. when I ran "fastboot devices" no devices were listed. While in fastboot mode, Device Manager now shows the phone as "Other Devices" -> "Android 1.0":
I downloaded Samsung_USB_Driver_for_Mobile_Phones_v220.127.116.11.exe from Samsung's website.
During the process of installing the Samsung USB driver I had to reboot my Windows 8.1 a few times (and I also had to take the battery out of the phone once to get it out of fastboot mode because the phone seemed to hang).
I right-clicked on the "Android 1.0" device and clicked "Update Driver Software...". Then I selected "Let me pick from a list of device drivers on my computer" and then selected the "SAMSUNG Android Phone" from the list:
And on the next screen I selected "SAMSUNG Electronics Co., Ltd." -> "SAMSUNG Android ADB Interface":
Windows confirms that the Samsung driver is installed OK:
After updating the "Android 1.0" device's driver to "Samsung Android ADB Interface", Fastboot now shows the device:
C:\temp\yakju-jwr66y> fastboot devices
Now run flash-all.bat from the downloaded factory image folder. That's it! That batch file runs fastboot.exe a few times to install the new factory image. Now Android 4.3 is installed successfully on the Nexus phone.