How to root the Android M Preview

AndroidPIT Android 6 0 Marshmallow teaser
© NextPit

If you’ve got your hands on the Android M (Android Marshmallow) Developer Preview 3 but haven’t rooted your device, we’ve got good news for you: it’s easy to do on both the Nexus 5 and Nexus 6. Read on to discover how to root the Android M Preview.

NextPit Logo white on transparent Background
android 6 marshmallow 4
If you've got the Android Marshmallow preview on your Nexus 5 or 6, rooting couldn't be simpler. / © ANDROIDPIT

As with any major bit of tinkering, make sure you have a backup of anything important, including settings, and that your phone is fully charged before you start. We can't stress this enough. Rooting is almost always a straightforward and happy experience, but Murphy’s Law means that if you don’t take precautions, disaster will strike.

How to root the Android M Preview: what you need

First of all, you need a Nexus 5 or Nexus 6. Developer DespairFactor has found a way to make the SuperSU root package work on those devices. In addition, you’ll need to download the following onto your PC:

Once you’ve got the files you need, put the SuperSU package and the appropriate DespairFactor kernel on your Nexus. The easiest way to do that is to connect your device to your PC and drag and drop the files into the download folder.

Using TWRP to flash your device

One your PC, locate the TWPR.img file you downloaded from Team Win, right-click on it and selected Open Command Window Here. This opens an MS-DOS window with a blinking prompt. At the prompt, type: fast boot flash recovery TWRP.img (where TWRP.img is the filename of the TWRP file you downloaded). After a short pause you should see a message that says 'finished. total time' and however long the process took. Great! Time to get rooting.

AndroidPIT Nexus 6 TWRP Recovery factory reset complete
TWRP is a really useful tool to put on your phone. / © ANDROIDPIT

Rooting Android M Preview on a Nexus 5 or Nexus 6

The next step is to boot your phone into Recovery Mode. To do that, press the volume up, volume down and power buttons simultaneously. When you see the options appear, use volume down to navigate to Recovery and the power button to confirm your choice. Your Nexus should now boot into the TWRP app. If you haven’t already made a backup, despite our warnings earlier, do that now by tapping the big grey Backup button.

Now we’ve taken precautions we can get to the good bit and put the custom kernel on your Nexus. To do that, tap the big Install button and point it to wherever you stored the DespairFactor kernel – if you followed our advice earlier it’ll be in your Downloads folder. Choose the kernel, confirm that it’s the one you want to use, and it will be installed.

AndroidPIT Nexus 6 TWRP recovery install 2
TWRP's install button – you've guessed it! – installs the things you want to install. / © ANDROIDPIT

Once the kernel has been installed, the next step is to install SuperSU. That means another visit to the Install button, but this time the file you’re locating is the SuperSU download, which should be in the same place you put the DespairFactor kernel. Locate it, confirm it, let it install and then reboot your phone when it’s done.

If everything’s gone according to plan, your phone should now boot into Android M with SuperSU installed and root access ready for your inquiring fingers.

Have you rooted Android M on your device or would you rather wait for the final version of Marshmallow to ship? Does the preview of Android M give you enough control to make rooting unnecessary? Let us know in the comments!

Liked this article? Share now!
Join the discussion

Latest articles

Recommended articles


Write new comment:
All changes will be saved. No drafts are saved when editing
Write new comment:
All changes will be saved. No drafts are saved when editing

  • James Dablo Sep 22, 2015 Link to comment

    Yup, you can still update your OS for the latest version.Some android rooting software have the features that you can root and unroot your Android device. I am an Android root user by One Click root its guaranteed safe and fast. You can download there software at

  • YOTOPRULES Aug 23, 2015 Link to comment

    If I root my phone will I be able to update to later versions of android by flashing it without losing anything? Will I be able to reroot it after the upgrade and get my root stuff back including multi rom?