How to flash Android 6.0.1 factory image on your Nexus device without wiping data

BY

Published 8 Dec 2015

NSFW AI Why trust Greenbot

We maintain a strict editorial policy dedicated to factual accuracy, relevance, and impartiality. Our content is written and edited by top industry professionals with first-hand experience. The content undergoes thorough review by experienced editors to guarantee and adherence to the highest standards of reporting and publishing.

Disclosure

Android 6.0 Marshmallow

Yesterday, Google started rolling out the Android 6.0.1 update for its Nexus devices. Beside brining support for over 200 new emojis, the update also introduces some other minor but meaningful changes and bug fixes, including the double tap power button to open camera app shortcut on older Nexus devices.

Despite Google’s announcement, the OTA update does not seem to have commenced since no Nexus owner has reported receiving it. Nonetheless, Google uploaded the Android 6.0.1 factory images on its website yesterday itself, which means that impatient Nexus users (like me) have the option of flashing the image right away to get the very latest version of Marshmallow running on their device.

The problem with flashing factory images, however, is that they also wipe your device clean of all data including your installed apps, and with Android not having any complete backup and restore solution like iTunes, setting up the device again can be a tedious and cumbersome process. Thankfully, if you already have the bootloader of your Nexus device unlocked, you can flash the Android 6.0.1 factory image without erasing user data. Wondering how? Follow the steps below to find out.

Note: While the below steps will not touch your installed apps and their data in anyway, it is still recommended that you create a backup just in case things go wrong. The below guide also assumes that the bootloader of your Nexus device is already unlocked and the handset is otherwise running a complete stock build of Android.

Step 1: Download the Android 6.0.1 factory image from Google’s website and extract all its content inside a folder called “marshmallow” on your desktop. Also, extract the contents of the ZIP file whose file name starts with “image-device codename.” inside the same folder. This ZIP file will contain the image files of the system, recovery, data and other partitions of the device.

Step 2: You will now need to set up ADB and Fastboot on your PC. Mac users can follow this guide, while Windows users simply need to download the 15-second ADB installer and follow the instructions. Make sure to install the necessary ADB drivers on your Windows PC as well, if you have not already done so.

Step 3: If you are on Windows, Shift + right click on the ‘marshmallow’ folder and select the ‘Open Command prompt window here’ option to open up a new command prompt window.

Mac users need to open Terminal and then navigate to the ‘marshmallow’ folder using the “cd” command — Simply type “cd”, drag ‘n’ drop the folder in the terminal window and press enter.

Step 4: Proceed to boot your Nexus device into bootloader mode. For this, you need to switch off the device first and then press the following key combination:

  • Nexus 5: Volume Up + Volume Down for a few seconds and then press Power button.
  • Nexus 5X: Volume down + Power button.
  • Nexus 6: Volume Down for a few seconds and then press the Power button.
  • Nexus 6P: Volume down + Power button.
  • Nexus 7 (2013): Volume Down + Power button.
  • Nexus 9: Volume Down + Power button.

Step 5: Once your Nexus device has entered into bootloader mode, connect it to your PC. To make sure that your PC is detecting the handset, you will need to run the following command in fastboot. Simply copy-paste the command in the command prompt or terminal window that you had opened in Step 3.

fastboot devices

If your device is successfully detected by your PC, you will get a response with its Android ID. If you get an error, try reinstalling the drivers on your PC as well as restarting it.

Step 6: Depending on your Nexus device, you will have two image (.img) files in your ‘marshmallow’ folder containing “radio” and “bootloader’ in their names. For simplicity’s sake, rename them only to “radio” and “bootloader” and then run the following commands one by one:

fastboot flash bootloader bootloader.img

fastboot flash radio radio.img

Step 7: Now proceed to run the below commands one by one:

fastboot flash system system.img

fastboot flash boot boot.img

fastboot flash recovery recovery.img

Do not flash the userdata image file otherwise you will lose all your installed apps and their data.

Once the image files have been successfully flashed, reboot your device. You can use the volume keys to select the Reboot system option and then confirm it by pressing the power button. Depending on the number of apps you have installed on your Nexus, the first boot can take its own time so be patient.


Despite flashing the factory image, you will continue to get future OTA updates of Android directly from Google.

If you run into any issues during the above process, drop in a comment and I will help you out.