Please do the next instructions with your own risk.
- Download stock Image from https://developers.google.com/android/nexus/images
- I’ve downloaded 6.0.1 (MOB31E)
- Inzip Image
- Unlock the device’s bootloader
1fastboot flashing unlock
or, for older devices, run the next:
1fastboot oem unlock
- Execute the
flash-allscript from ZIP.
- Start the device in fastboot mode again.
- Lock device bootloader:
1fastboot flashing lock
or, for older devices, running:
1fastboot oem lock