How To Flash Android 6.0 Marshmallow

How To Flash Android 6.0 Marshmallow

Today, Google made the factory images for Android 6.0 Marshmallow available for Nexus devices. If you want to play it safe and wait for the OTA, you’re probably going to be waiting weeks.

Flashing an Android image is super easy, especially on a Nexus device. You can use this tutorial for installing the image on your Nexus or for flashing any other image on any other phone.

  1. Download the Android SDK here. You don’t need Android Studio unless you’re actually developing an app. You can download where is says “SDK Tools Only”.
  2. Start downloading the file that corresponds to your device. You have to extract the compressed file twice, which Windows doesn’t do natively since you don’t get a zip file until the end. I use Extractor RT, but there are tons of options.
  3. Once you have extracted the file twice, you should be left with a zip file along with a few other files. Highlight them and copy them.
  4. In your C drive, go to Program Files\Android. You should see the SDK Manager there. Open it.
  5. Make sure that Platform-Tools and Google USB Driver are installed. If you’re flashing an image on a non-Nexus device, you might need a different driver and we’ll tackle how to find out if you need that in a bit.
  6. Inside the Android folder, you’ll now see a Platform-Tools folder. Paste the files inside of it.
  7. Next, extract the zip file inside the same Platform-Tools folder. You might not need them, but you might, so just do it.
  8. While holding shift, right click either on or inside of the Platform-Tools folder and click “Open Command Window Here”.
  9. Plug your Android device into your PC via USB.
  10. On the device, go into Settings -> About and find your build number. Depending on the device, you might have to go to a separate software category.
  11. Tap the build number seven times (not joking). This opens up developer options.
  12. Go into Settings -> Developer Options and turn on USB Debugging. If there’s a setting there that asks if you want to allow the bootloader to be unlocked, make sure you can do that.
  13. Type in the command window adb devices. Your device should show up in the list. If it does not, you may need to confirm that you want to trust the computer from the device. If a window doesn’t pop up asking you to trust the computer, you don’t have the right driver installed. If you’re certain that you do have the right driver installed (for example, if you have a Nexus and you installed Google USB driver through SDK Manager), go into Device Manager on your PC and manually install the driver for that device.
  14. Once you’ve confirmed that the Android SDK recognizes your device, we need to reboot into fastboot mode. You can do this by typing the command adb reboot bootloader.
  15. Next, we want to unlock the bootloader. How to do this varies by device and most third party devices require you to contact them to get a code, but for a Nexus, type fastboot oem unlock.
  16. Now, your bootloader is unlocked and it’s time to flash the image. If you’re flashing a Nexus image, this should be easy. Type the command flash-all. You’re good to go.
  17. Now, you might have gotten an error there. I certainly have. You also might not be flashing to a Nexus, so you need these instructions as well. If you’re using a Nexus, this is why I had you unzip the file. Type the following commands.
    • fastboot erase userdata
    • fastboot erase boot
    • fastboot erase cache
    • fastboot erase recovery
    • fastboot erase system
    • fastboot erase vendor
    • fastboot flash boot boot.img
    • fastboot flash cache cache.img
    • fastboot flash recovery recovery.img
    • fastboot flash system system.img
    • fastboot flash vendor vendor.img
  18. Note that if you’re flashing a non-Nexus device there’s an additional step, which is fastboot erase bootloader and fastboot flash bootloader <bootloader file name>. This isn’t necessary with a Nexus because the error occurs after the bootloader is flashed, but feel free to do it if it makes you feel better.
  19. Also note that fastboot erase userdata performs a factory reset. In theory, if you skip that step you’ll be able to upgrade your device without losing your personal data, but I’ve never gotten that to work without having problems after booting up.
  20. You’re all set. Time to reboot your device on Android 6.0 Marshmallow!
About the author
Rich Woods

Being a computer programmer wasn't enough to fulfill his love of technology. In 2013, Rich founded For the Love of Tech and has been writing about his love of tech ever since.