How to install Android Marshmallow on your Nexus device

Can’t wait to try out Google’s next sweet mobile OS treat? Just follow these instructions—as long as you have a Nexus phone or tablet.

The big 6.0 release of Android, named Marshamllow, will bring a whole host of new features and enhancements. If you have a recent Nexus device, you can download an image from Google and 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 command-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 Lollipop 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 and install Google’s Android Studio developer tools if you don’t already have them installed. The installation process is pretty straightforward, and Google provides step-by-step instructions that explain how to do it. (If you don’t have Java installed on your computer, you’ll need to download and install that as well.)

android 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 and download the Android Marshmallow factory image from Google. Note that Google 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, and Nexus Player. 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.

Prepping 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 Lollipop, pop open the Settings app, scroll down, then tap About Phone. Scroll down to the Build number and tap it 7 times to unlock the developer options.

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

android debugging mode

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

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

On Windows, you’ll find the folder on your C drive. The filename path will look something like C:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\platform-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 and poke around a bit.

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

android m move image files

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

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

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

android m preview adb devices

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

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

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

android 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 command 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 command.

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 Windows) or flash-all.sh (on OS X) to run the installation script, then press enter.

(Note: If running the script results in a string of command not found messages on OS X, you’ll actually have to open the script in a text editor—TextEdit works—then add “./” in front of all instances of “flash-all.sh” in the script, just as you did with terminal commands you entered. Save your changes then quit your text editor, and 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.

android 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 and USB debugging, then boot into fastboot mode using the adb reboot bootloader command, then run the fastboot oem lock command: Depending on your device, you may lose your data again. Press your power button to restart your phone one last time.

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

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags Android Marshmallow

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Nick Mediati

IDG News Service
Show Comments

Cool Tech

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Breitling Superocean Heritage Chronographe 44

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?