Did you choose to check out the latest version of Android with the Developer Preview and now want to flash a custom ROM or install root-only apps again? Easily root the Nexus 5 on Android M MpZ79M Developer Preview 2 by following the guide after the drop. Here’s everything you need:
- You must unlock the bootloader before starting.
- Use the guide on the Nexus 5 only and not a different Nexus device.
- The guide is only recommended for the Android M Developers Preview 2 with corresponding build number MPZ79M.
BEFORE WE BEGIN
- Download the Google USB Drivers from our downloads page.
- Enable USB Debugging Mode from your devices Settings menu.
HOW TO ROOT THE GOOGLE NEXUS 5 ON ANDROID M MPZ79M DEVELOPER PREVIEW 2
- Download the Android SDK package from the official developer’s website here .
- Learn how to set up ADB and Fastboot  on Windows if you don’t have it already.
- Download Fastboot for Windows here .
- Download the Despair kernel here . Transfer it to the root of the SD card on the Nexus.
- Download the SuperSU here . Transfer the SuperSU from the desktop of the computer to the root of the SD card so it’s not in any folder.
- Download the ClockworkMod Recovery image from here . Extract the custom recovery to the same folder where you have Fastboot.
- Completely power off the Nexus 5 by holding down the Power button until it’s off.
- Boot it up in the Fastboot Mode by holding the Volume Down + Power keys.
- Connect it to the Windows computer where you have ADB and Fastboot.
- Open the folder where you have Fastboot and the custom recovery and right-click the mouse on an empty white area and hold the shift key.
- You should get a new menu popping up which let’s you chose to open the Command Prompt. Do that.
- Type your first command:
fastboot flash recovery recovery-clockwork-touch-220.127.116.11-hammerhead.img
- Choose the Recovery option from the menu on your Nexus 5.
- Frm inside the recovery mode, install the Despair kernel and the SuperSu files one at a time by selecting the “Install” option from the menu.
Go back to the main menu and choose to reboot the system and you’re all set. Cheers!