Skip to content

Instantly share code, notes, and snippets.

@dephekt
Last active January 3, 2017 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dephekt/1a79bcfa63da7d97f01429e60943a46e to your computer and use it in GitHub Desktop.
Save dephekt/1a79bcfa63da7d97f01429e60943a46e to your computer and use it in GitHub Desktop.

FLASH AND RELOCK YOUR DEVICE

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:

  1. Power OFF your device
  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment