After downloading the image for your device:
- Make sure you have a Moto Pure Edition or a Developer Edition device.
- Make sure you download the corresponding recovery image from the above portal.
To flash, put the phone in fastboot mode:
- Power OFF your device
- Then Power ON + Volume Down
Alternatively, you can reboot into fastboot mode if you have adb:
$ adb reboot bootloader
Next flash the images using fastboot:
$ fastboot flash partition gpt.bin
$ fastboot flash bootloader bootloader.img
$ fastboot reboot-bootloader
$ fastboot flash logo logo.bin
$ fastboot flash boot boot.img
$ fastboot flash recovery recovery.img
$ fastboot flash system system.img
$ fastboot flash modem NON-HLOS.bin
$ fastboot erase modemst1
$ fastboot erase modemst2
$ fastboot flash fsg fsg.mbn
$ fastboot reboot
You also have the option to erase all the data on your device with
$ fastboot erase userdata
$ fastboot erase cache
After performing this sequence, you can relock your device with
$ fastboot oem lock