In this article you are going to learn how to unroot and flash a factory image to Nexus 6. Before continuing with the procedure make sure to backup you data because flashing a Factory Image will wipe your device. There are many ways to backup your phone but the most useful and well known tools are:
Installing Necessary Desktop Tools
- Download Android SDK from here. Scroll down to the bottom of page, download for other platforms > SDK Tools Only
- Extrcact the zip and place the Android-sdk-windows folder on your desktop.
- If you have downloaded the full sdk, go into the Android-sdk-windows folder and run SDK Manager.exe.
- Install the following packages, there are 4 in total:
-Tools > Android SDK Tools, Android SDK Platform-tools
-Extras > Android Support Library, Google USB Driver.
- Only if you downloaded the full sdk, go back to the Android sdk-windows directory. You should see a new folder named platform-tools. If you don’t see this new folder, repeat the step above.
- To confirm that it is working, open a command prompt and enter the folowing command.
cd Desktop/android-sdk-windows/platform-tools adb version
- If it displays ‘Android Debug Bridge Version x.x.xx’ it is working. In case it gives and error saying that adb is not a recognized command, it has not been succesful. Repeat the steps above to make this work. When you are done close command prompt.
- Download Nexus 6 (shamu) factory images from here
Extract the zip file you downloaded. It will look like something like this:
Unlock Bootloader. To unlock bootloader follow this guide.
How To Flash Factory Image On Nexus 6
Extract the image-shamu-xxxxxx.zip somwhere where you can easily access it. In the same folder, from the original archive extract ‘bootloader-shamu-moto-xxxxx.img and rename it bootloader.img. Also rename ‘radio-shamu-xxxxx.img’ to simply radio.img. You will see files like in the picture below.
- Turn off your phone.
- Boot in fastboot/bootloader mode by pressing and holding Power Button + Volume Down at the same time.
- Connect your phone to PC through an USB cable.
- Open a CMD window and type the following command, in this order. If you have a different folder change the path.
fastboot flash bootloader C:/image-shamu-XXXXXX/bootloader.img fastboot reboot-bootloader fastboot flash radio C:/image-shamu-XXXXXX/radio.img fastboot reboot-bootloader fastboot flash system C:/image-shamu-XXXXXX/system.img fastboot flash userdata C:/image-shamu-XXXXXX/userdata.img (Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.) fastboot flash boot C:/image-shamu-XXXXXX/boot.img fastboot flash recovery C:/image-shamu-XXXXXX/recovery.img fastboot erase cache
- Wait for everything to finish and then select ‘Recovery’ using the Volume buttons.
- When a small Android logo appears, press the Power Button + Volume Up.
- Select “Wipe data/factory reset”
- Go back to main screen and select reboot.
- Wait for the phone to reboot.
- That’s all. Your Nexus 6 is running a stock factory image.