Return to Stock – Nexus 5x

It’s not a secret that I was running Cyanogenmod on my Nexus 5X, but I have to admit, it’s time to revert to stock due to various random issues which are getting me mad. So here’s a small howto to do so.

First of all, get the Factory Images for Nexus Devices from Google, available at https://developers.google.com/android/nexus/images and the adb and fastboot tools from the Google Android SDK. If you got those, you usually unpack the zip file and give the batch script supplied with them a spin. But as this didn’t work for me, here’s the way to do it manually by unpacking the images and flashing them one by one:

fastboot flash bootloader C:/image-bullhead-XXXXXX/bootloader.img
fastboot reboot-bootloader
fastboot flash radio C:/image-bullhead-XXXXXX/radio.img
fastboot reboot-bootloader
fastboot flash system C:/image-bullhead-XXXXXX/system.img
fastboot flash vendor C:/image-bullhead-XXXXXX/vendor.img
fastboot flash userdata C:/image-bullhead-XXXXXX/userdata.img
(Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.)

This installs the base stuff like bootloader and radio images. Keep in mind to reboot the bootloader after every cycle to make sure you have a clean environment for every flash. After that, let’s proceed with android itself:

fastboot flash boot C:/image-bullhead-XXXXXX/boot.img
fastboot flash recovery C:/image-bullhead-XXXXXX/recovery.img
fastboot erase cache
fastboot flash cache C:/image-bullhead-XXXXXX/cache.img

Finally – reboot your phone now and enjoy your stock experience.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *