Install Android M Preview on Nexus via Windows
In this article
This guide walks you through installing the Android M Developer Preview on a compatible Nexus device using a Windows PC. The preview gives you early access to new features, but it is a developer build, so expect bugs and instability. You will need a Nexus 5, 6, 9, or Player, a Windows computer, a USB cable, and about 30 minutes. Unlocking the bootloader wipes your device, so back up everything first.
What You'll Need
- A compatible Nexus device (Nexus 5, Nexus 6, Nexus 9, or Nexus Player) with at least 50% battery
- A Windows PC (Windows 7 or later) with USB drivers installed for your Nexus
- The official Android M Preview system image for your device from Google's developer site
- Google's USB driver package (if not already installed)
- ADB and Fastboot tools (part of the Android SDK Platform-Tools)
- A USB cable that supports data transfer
Step-by-Step
- Back up your data. Unlocking the bootloader erases everything on the device. Use Google's backup or a third-party app to save photos, contacts, and app data to your PC or cloud.
- Download the Android M Preview image. Go to the official Android Developer website, find the M Preview page, and download the system image for your exact device model. The file is a ZIP archive.
- Install ADB and Fastboot. Download the Android SDK Platform-Tools from the official Android developer site. Extract the ZIP to a folder like
C:\adb. That folder now containsadb.exeandfastboot.exe. - Install USB drivers. If Windows does not recognize your Nexus in fastboot mode, download the Google USB Driver from the same developer page and install it via Device Manager. Right-click the unknown device and choose "Update driver" > "Browse my computer" > select the driver folder.
- Enable Developer options on your Nexus. Go to Settings > About phone and tap "Build number" seven times until you see "You are now a developer."
- Turn on USB debugging. In Settings > Developer options, enable "USB debugging." Connect your Nexus to the PC with the USB cable.
- Open a command prompt in the ADB folder. In Windows Explorer, navigate to the folder where you extracted ADB (e.g.,
C:\adb), hold Shift, right-click an empty area, and choose "Open command window here" or "Open PowerShell window here." - Verify ADB sees your device. Type
adb devicesand press Enter. You should see a device listed as "device." If it says "unauthorized," check your phone and allow the debugging prompt. - Reboot into the bootloader. Type
adb reboot bootloaderand press Enter. The phone will restart into a screen with an Android robot and menu text. - Unlock the bootloader. In the bootloader, type
fastboot oem unlock(for Nexus 5/6/9) orfastboot flashing unlock(for Nexus Player) and press Enter. On the device, use the volume keys to highlight "Unlock" and press the power button to confirm. This wipes all data. - Extract the system image ZIP. Once the bootloader is unlocked, extract the downloaded ZIP to a folder. Inside you will find files like
image-...andflash-all.bat. - Run the flash script. In the same command prompt, navigate to the extracted folder (e.g.,
cd C:\Users\YourName\Downloads\m-preview). Typeflash-all.batand press Enter. The script will flash the bootloader, radio, and system, then reboot. Wait until the device boots to the setup screen. - Set up your device. After the reboot, go through the initial setup. You may need to re-enable Developer options and USB debugging for future use.
Common Mistakes
- Not backing up before unlocking the bootloader – data loss is permanent.
- Using the wrong system image for your device model (e.g., Nexus 5 image on Nexus 6).
- Forgetting to install USB drivers, causing fastboot to not detect the device.
- Running the flash script from the wrong folder – the script must be in the same directory as the image files.
- Interrupting the flash process (unplugging the cable or closing the window) – this can brick the device.
Tips
- Keep the USB cable plugged in and avoid touching the device during flashing.
- If the command prompt shows "waiting for device," check your drivers and try a different USB port (preferably USB 2.0).
- Make sure your PC's power settings don't put the USB ports to sleep during the process.
- After flashing, the device may take several minutes to boot the first time – be patient.
- If you want to revert to the stable Android version later, download the factory image for your device from the same developer site and flash it using the same steps.
Troubleshooting
If the process fails, try these in order:
- Device not detected in fastboot. Reinstall the Google USB driver, try a different cable, and ensure you are in fastboot mode (the screen says "fastboot" at the top).
- Flash script errors. Check that you extracted the ZIP completely and that the script is in the same folder as the image files. Run the script as administrator.
- Boot loop after flashing. Reboot into the bootloader (hold Power + Volume Down for a few seconds) and run
fastboot flashallagain. If that fails, manually flash each partition using the commands in the script. - Stuck on Google logo. Wait at least 10 minutes – the first boot after a flash can be slow. If it never finishes, reflash the image.
- ADB says "unauthorized." On the phone, revoke USB debugging authorizations in Developer options, then reconnect and accept the prompt.
- Windows cannot find adb/fastboot. Make sure you are in the correct folder in the command prompt, or use the full path like
C:\adb\fastboot.exe.
If none of these help, the Android developer community forums and the official Google issue tracker are good resources. Do not attempt to use unofficial tools or modified images – they can brick your device.
Frequently Asked Questions
Will installing the preview void my warranty?
Unlocking the bootloader and flashing a preview image typically voids the manufacturer warranty, but Google's developer previews are intended for testing. Check Google's support pages for your specific device.
Can I go back to the stable Android version?
Yes. Download the official factory image for your device from Google's developer site and flash it using the same fastboot method. This will wipe your data again.
Do I need to unlock the bootloader every time?
No. Once unlocked, the bootloader stays unlocked. You only need to unlock it once, though flashing a factory image may re-lock it depending on the script.
Will the preview receive OTA updates?
During the preview period, Google may push OTA updates to preview builds, but you can also manually flash newer preview images. After the final release, you'll need to flash the stable version to get regular updates.
Is it safe to use the preview as my daily driver?
No. The preview is for developers and may have bugs, poor battery life, and app compatibility issues. Use a spare device if possible.
What if my Nexus is not listed as compatible?
Only Nexus 5, 6, 9, and Player are officially supported for the M Preview. Do not attempt to flash it on other devices – it will not work and could damage the device.