How to install Android Marshmallow on your Nexus device

BY GreenBot Staff

Published 5 Oct 2015

The big 6.0 release of Android, named Marshamllow, will bring a whole host of new features enhancements. If you have a recent Nexus device, you can download an image from flash your phone to run the OS right now. Or, if you’re patient, just wait for the over-the-air update (it should roll out to all Nexus devices within a few weeks of general availability—figure mid-October at the latest). 

Installing the Android Marshmallow image takes a little comm-line know-how. And as is the case with any pre-release software, you may encounter unforeseen problems, so install Android 6.0 on a secondary device that you don’t rely on, or be prepared to risk losing your data.

Getting started

Since installing the Marshmallow factory image will require you to wipe your phone, you’ll want to back it up before you begin. You’ll also want to update to the newest non-beta version of Android available—Android llipop 5.1.1 as of this writing—if you haven’t done so already. Updating now may save you headaches later on in this process.

Next, take a few minutes to download install ’s Android Studio developer tools if you don’t already have them installed. The installation process is pretty straightforward, provides step-by-step instructions that explain how to do it. (If you don’t have va installed on your computer, you’ll need to download install that as well.)

roid m preview devices

Make sure you get the right version of the Android M preview for your device.

Once you have the developer tools installed, go ahead download the Android Marshmallow factory image from . Note that provides different preview builds for each device, so make sure you get the one made specifically for your device. You can get builds for the Nexus 5, Nexus 6, Nexus 9, Nexus ayer. The 2013 version of the Nexus 7 is supported, too.

Double-click the file you downloaded to unzip the image files. Keep these files in a safe place—we’ll come back to them in a few minutes.

epping your phone

Installing Marshmallow requires you to turn on Developer Mode on your phone. The process varies slightly depending on the version of Android you’re running, but on Android llipop, pop open the Settings app, scroll down, then tap About one. Scroll down to the Build number tap it 7 times to unlock the developer options.

Now return to the main Settings screen, then scroll down tap Developer options. Finally, toggle the switch for B debugging to the on position confirm when requested.

roid debugging mode

Before you install the Android M preview, you’ll need to turn on B debugging.

Next, find the folder containing the adb fastboot tools that come with the Android developer tools. On OS X, these tools are tucked away in the hidden brary folder for your user account: To get to it, select Go to Folder… from the Finder’s Go menu, type ~/brary/Android/sdk/platform-tools/ into the text field, then press Go.

On ndows, you’ll find the folder on your C drive. The filename path will look something like C:adt-bundle-windows-x86_64-20131030adt-bundle-windows-x86_64-20131030sdkplatform-tools, though the names may vary slightly depending on which version of the developer tools you have installed. Your best bet may be to go to your C drive poke around a bit.

Track down the image files you unzipped earlier, move them to the folder containing adb fastboot (it streamlines the process some by reducing the number of terminal comms you need to execute).

roid m move image files

Move (or copy) the files you downloaded into the same folder as the adb fastboot tools. You can delete them later.

Now, we’ll make sure your computer can find your phone. Go ahead plug your phone into your computer using a B cable, confirm the connection on your phone if prompted. To check for devices, open a Terminal or Comm ompt window (if you don’t know where to look, use your operating system’s search function to find the Terminal or Comm ompt).

Type cd followed by the filename path listed earlier into terminal then press enter—for example: cd ~/brary/Android/sdk/platform-tools/. The cd comm is the same on both OS X ndows; only the filename path format is different. Once you do that, type “adb devices” press enter. You’ll see something like “0ae33abd02ba3467     device.” If you see that (the big string of letters numbers will vary), you’re good to go. If not, go back make sure you have B debugging enabled on your Android device.

roid m preview adb devices

If you see something like this after running the adb devices comm, you’re on the right track.

(Note: If you’re using OS X you get an adb comm not found message, try adding “./” in front of the comms you type—for example, ./adb devices. This tells the Terminal to look in the current folder for the adb tool. This applies to all comms mentioned in this article.)

Once your setup passes the adb devices test, type adb reboot bootloader press enter: Your phone will now reboot into fasboot mode.

roid m fastboot

Fastboot mode on a Nexus 5.

Take a look at your phone’s screen: If it says “locked state: locked,” you may need to unlock the phone’s bootloader first. Run the comm fastboot oem unlock, then confirm on your phone that you want to unlock the bootloader. Note that doing so will erase all data on your phone, so be absolutely sure that this is necessary before you run this comm.

Installing Android Marshmallow

Now that your bootloader is unlocked, it’s time to install the Marshmallow image on your phone. Type flash-all.bat (on ndows) or (on OS X) to run the installation script, then press enter.

(Note: If running the script results in a string of comm not found messages on OS X, you’ll actually have to open the script in a text editor—Textit works—then add “./” in front of all instances of “fastboot” in the script, just as you did with terminal comms you entered. Save your changes then quit your text editor, then try again.)

The flashing process takes some time, so be patient: Your phone will restart when the flashing process is complete. If all goes right, your phone will spring back to life with Android M installed. It may take your phone a while to boot back up the first time you restart, so don’t panic if your phone is stuck on the boot screen for several minutes.

roid m lock screen

Success! Say hello to the Android Marshmallow lock screen.

If you unlocked your bootloader, you may want to lock your bootloader again for security reasons, so reenable developer options B debugging, then boot into fastboot mode using the adb reboot bootloader comm, then run the fastboot oem lock comm: Depending on your device, you may lose your data again. ess your power button to restart your phone one last time.

You’re all finished. Go have fun exploring Android Marshmallow!