How to install Android M Developer Preview (Nexus 5, 6, 9 required)5
The Android M Developer Preview is out and you can download and install it if you have a Nexus 6, Nexus 5, Nexus 9, or the Nexus Player. Currently, you cannot install the developer preview on any other device.
So how do you do it?
Android M Developer Preview requires you have ADB toolsLuckily, the process is very simple and straightforward, especially to those who have tried flashing a custom ROM before, but even to newbies, it will all work out easily if you follow the simple steps below. As with anything new, we recommend you don't rush to install it - the process itself takes a few minutes, but downloaded the Android M Developer Image and all the required tools (if you don't have them) takes time, so you might want to get a window of around one hour so that you can do it all calmly and even have some time to play around with Android M once you've installed.
All the rest of the how to install Android M tutorial is right in the slides below, follow it and let the force be with you.
source: Google Developer