Despite the big announcement that Android Marshmallow is officially here, most people will still have to wait quite some time before the update arrives. However, if you have a rooted Nexus you can flash the Android 6.0 SDK onto your handset without too much hassle and enjoy all the benefits that Android Marshmallow has to offer ahead of the rest. Nevertheless, be aware that you could easily brick your device if you make a wrong move during this process so pay close attention. This tutorial is only for Nexus devices.
Download the Android M installer for your handset. Then install ‘Minimal ADB and Fastboot’ from the XDA Developers website onto your computer. Next extract the installer files using a file archiver.
Make sure the files are TAR files. Move them to the same place that ‘Minimal ADB and Fastboot’ is saved. Tap Build number in your About phone settings seven times. Then open Developer options, enable USB debugging and OEM unlocking.
Connect your phone to your PC and download the Google USB Driver. Extract the ZIP file, press Start>Devices>Printers, select your phone, choose Properties> Hardware>Device Functions>Properties. Enable USB debugging and tap Okay.
Back up your mobile then launch ‘Minimal ADB and Fastboot’. Type adb reboot-bootloader and hit Enter. Then type fastboot oem unlock and press Enter again. Choose Yes, type flash-all and press Enter. Reboot and you should now have Marshmallow.