Deploying M Preview factory image is simple and requires only three steps
1. Download image image, unzip and unzip.
2.
ADB reboot bootloader
FastBoot OEM Unlock
3. command line into the extracted directory, execute batch command
Flash-all
But the old version of the FastBoot have bugs, will error: unable to find system.img and so on. In fact, the file exists in a ZIP archive in the directory. The new FastBoot official claims to have solved the problem.
http://www.ibtimes.co.uk/android-m-new-fastboot-update-patches-missing-system-img-error-adds-new-flashing-commands-1506790
I downloaded and updated the latest version of BUILDTOOLS.23.R2, executed the above command, and the result encountered a new error:
Zip:unable to truncate file to 1046915228:file too large
Failed to extract ' system.img ': I/O Error
Press any key to exit ...
The final solution is to manually extract all the files required by Image-hammerhead-mpz44q.zip Manual (note that the first 2 file names are for NEXUS5, other devices such as NEXUS6 may be different):
FastBoot Flash bootloader bootloader-hammerhead-hhz12h.img
[Enter]
FastBoot Flash radio Radio-hammerhead-m8974a-2.0.50.2.26img
[Enter]
FastBoot Reboot-bootloader
[Enter]
FastBoot Flash Recovery recovery.img
[Enter]
FastBoot Flash Boot boot.img
[Enter]
FastBoot Flash System system.img
[Enter]
FastBoot Flash Cache Cache.img
[Enter]
FastBoot Erase UserData
[Enter]
FastBoot Flash UserData userdata.img
[Enter]
FastBoot reboot
Every step of the patience to wait for the operation to complete, finally reboot, you can see the style of Android M.
[Troubleshooting] How to install Andorid M Preview to Nexus series machines