How to unlock a Bootloader and flash a Factory Image on a Nexus Devices

Technik
von Gerhard Petermeir
Veröffentlicht am: 11.08.2013 18:04, zuletzt aktualisiert am: 29.11.2014 19:35

Google Nexus devices are great for devices when it comes to updates or resetting the devices after something went wrong. The factory images are zip files containing all you need to recover your nexus phone or tablet back pure stock android.

But first: I am not responsible for bricking your phone or tablet. Please read these instructions carefully. You also may void your warranty by unlocking your phone/tablet. To proceed, at your own risk, just follow some easy steps for Windows users:

Note: The fastboot commands within the flash-all.bat file as well as the factory image files may differ from device to device. This is due to the fact that some devices need more or less files than other (e.g.: 3G/LTE vs. WiFi only). Always chose the right files, the correct factory image and run the commands from the flash-all.bat file in the exact order. If you do not understand what they do at all, please go fishing. It's at your own risk. Nexus Devices currently include:

  • Nexus S
  • Galaxy Nexus
  • Nexus 4
  • Nexus 7
  • Nexus 10
  • Nexus 7 (2013)

The Set-Up

  1. Download and install the Android SDK
  2. Download the factory image for your phone or tablet. Make sure you chose the right one for your devices
  3. Run the Android SDK as an administrator and install the Google USB Driver as well as the Platform Tools
  4. Go to the settings of your phone or tablet and check if you got access to the developer options. If not: go to "About phone" and press the Build-Number multiple times. Now you should see the developer options in your overall settings.
  5. Go to settings, developer options and enable USB-Debugging
  6. Now plug in your phone or tablet and wait for the drivers to install
  7. Go to your SDK folder, e.g.: C:\Program Files\Android\sdk\ and open the folder platform-tools. You should now see two .exe files (fastboot.exe, adb.exe) and a bunch of other files.
  8. Now hold the shift key and right click anywhere in this folder. By doing to, there appears a new option in the context menu: "Open command prompt here". Click this option
  9. With the command prompt open in the platform-tools folder, you can now check if your phone is detected. Just enter: adb devices and press enter. You should now see a list of detected android devices. If not: something went wrong with the drivers!

adb-devices

Unlock your bootloader

  1. Now we need to reboot to the bootloader, just enter: adb reboot-bootloader
  2. Check if fastboot detected your device by typing: fastboot devices
  3. (Caution: in the next step you will lose all your data) If your device appears, type: fastboot oem unlock and confirm the action on your device. Your device is now unlocked
  4. Now wait and reboot your phone. If it doesn't reboot on it's own, you may type: fastboot reboot
  5. After the reboot, go back to fastboot mode: adb reboot-bootloader

Install the image

  1. Now unzip the factory image you downloaded at the beginning
  2. You will find a file called flash-all.bat. This is a batch command file for Windows. Right click on this file and open it with the code editor of your choice
  3. Here are all commands you need to run in order to update your device. In our example we are installing Android 4.3 on the Nexus 7 (2012 version). Enter all the commands in your command prompt, line by line. As we already unlocked our device, we can start at the second command, earasing our boot, cache, recovery, ...
  4. Please do not forget to add the path to your files, when flashing the bootloader, radio or the image itself: fastboot flash bootloader C:\YOUR_PATH_to_the_downloaded_files\bootloader-grouper-4.23.img
  5. Run ALL commands, after the last one, in our case fastboot -w update C:\YOUR_PATH\image-nakasi-jwr66v.zip, the device may reboot, if not you may enter fastboot reboot.
  6. Please note that the device may take longer than usual to boot but after that you will be praised with an almost new nexus device.
:: note: do not run this line if already unlocked
fastboot oem unlock
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
:: do not forget to change YOUR_PATH to the full file path
fastboot flash bootloader YOUR_PATH\bootloader-grouper-4.23.img
fastboot reboot-bootloader
:: this will simply make you wait 10 seconds
ping -n 10 127.0.0.1 >nul
:: do not forget to change YOUR_PATH to the full file path
fastboot -w update YOUR_PATH\image-nakasi-jwr66v.zip
exit

If you like this guide, please share and press the +1 button.



Permalink: https://to.ptmr.io/1oY7Mp8