UPDATE (1 June): Android M Developer Preview root available for Nexus 6 and Nexus 5
UPDATE (30 May): SuperSU seems to be not working on Android M. Do not try this, as it creates boot loop.
Here is what Chainfire says about Android M preview root.
The Android M system images, which are live for Nexus 5, 6, 9 and the Nexus Player, allow users to install a preview version of the latest Android platform meant for testing purposes. By configuring the Nexus device with the respective system image, you would be able to install and test the app to see its performance on the next Android version.
These preview system images, according to the release note in the Android Developer site, are not stable releases and might contain errors and defects which can result in damage to your device. Also, the preview system images are not subject to the same testing as the factory OS and can stop the functioning of your device and apps.
If you have installed the developer preview on any of the Nexus devices and wish to root it to establish a more stable version, following is a guide. The guide uses SuperSU file to root the Android M preview build MPZ44Q and installs recovery (for Nexus phones).
- The following root method is applicable to Nexus 6, 5 and 9 running Android M preview build MPZ44Q.
- You need to unlock the bootloader of your Nexus device.
- Ensure that you have created a back of all the data of your phone, as the root method is likely to wipe out everything.
- Rooting will void the manufacturer's warranty of the device.
IBTimes UK will not be held liable for any damage to the device during the process or after. Proceed at your own risk.
Root Nexus 6 and 5 on Android M developer preview build MPZ44Q
Steps-1: Download Android SDK, install it and set it up with downloading platform-tools and USB drivers package in SDK
Steps-2: Enable USB debugging mode on your Nexus phone
Steps-3: Download Fastboot according to OS your PC is running and extract it in android-sdk-windows platform-tools directory
Steps-4: Download SuperSU v2.46 on your PC
Steps-5: Connect and mount Nexus phone USB memory on the computer through USB cable. Transfer the SuperSU root package to your phone's storage. Ensure that the downloaded package is in the SD card root
Steps-6: Switch off your phone
Steps-7: Download recovery for the Nexus device and save it in the android-sdk-windows platform-tools directory on your PC
Note: You can use either CWM or, TWRP recovery. The following guide uses the available recovery for the Nexus models.
Steps-8: Enter Fastboot or, Bootloader mode on your Nexus phone. Press Volume Down and Power keys together for a few seconds, until some text appears on the phone's screen. This is the Bootloader mode
Steps-9: Navigate to android-sdk-windows platform-tools directory and open Command Prompt (Shift + Right Click >> Open Command Prompt)
Steps-10: Execute the following command and press Enter
fastboot flash recovery openrecovery-twrp-188.8.131.52-shamu.img (for Nexus 6)
fastboot flash recovery recovery –clockwork-touch-184.108.40.206-hammerhead.img (for Nexus 5)
Steps-11: Choose RECOVERY from the Fastboot menu and enter recovery mode
Steps-12: Install the root package. In the recovery menu, select flash zip from sdcard>> choose zip from sdcard, then navigate to the UPDATE-SuperSU-v2.46.zip, select it using the Power button and confirm installation on the next screen
Steps-13: When the installation is completed, reboot the phone
How to root Nexus 9 Android M preview
Step-1: Download CF-Auto-Root
Step-2: Extract the downloaded zip
Step-3: Enable Developer Options on Nexus 9 by tapping Build Number under About Device menu in Settings
Step-4: You should notice a tab pop up in Settings named Developer Options. Click it and check the Enable OEM Unlock and USB Debugging
Step-5: Enter Bootloader mode on your tablet by pressing Shift + Right click in the tools folder. Click on Open a command window here from the menu. Execute the following command
adb reboot booatloader
Step-6: Execute the root-windows.bat, which is extracted in step-2
When the command windows finishes, your Nexus tablet will reboot.
You should be now able to enjoy root on your Nexus phone or tablet.