software bricked android 7 I have a Moto G (xt1032) and few weeks ago I tried to install cm14.1. But somewhere it didn't work. Since then I cannot boot.
And I can't install a new custom rom. 
I have Cyanogenmod Recovery. When I try to use fastboot/adb it did not work. because the device is unauthorized. 
The only thing that is working is adb sideload. But when I tried to install a custom rom a error happend:

This package is for device: xt1032, ...
this device is .


I tried to remove the assert command from updater-script, but when I reziped the file and tried to install it, a signature validation error occurred.
As mentioned, hard-bricks are the rare write-offs.

For the vast majority of soft-bricked devices (FRP errors, blocked custom binaries, etc) the following can erase the device and reinstall the orginal firmware (Samsung example given below). Alternatively, install TWRP and latest AOSP firmware. 

These instructions are for experienced technicians. Proceed with due caution.


Backup your existing firmware (optional, if permitted by brick)
Download latest version of Odin to a WIN10 computer.
Enable BL, AP, CSC, etc firmware types in Odin.ini
Download SamFirm (or visit Updato - generic firmware) to fetch from Samsung's firmware archives by providing EXACT model/provider (eg. SM-G935W8/BMC = S7Edge/BellMob)
Extract BL, AP, CSC, firmware (*.tar.MD5)  from firmware archive 
Connect mobile device to WIN10 computer with USB data cable. 
From off, PWR+VOLDWN+HOME to enter bootloader.
Load firmware in Odin and hit start (do NOT change defaults)
Device firmware will be erased and flashed with new firmware.