I Flashed a file named boot.emmc.win from inside the unzipped backup. I moved the file to my adb_fastboot folder and flashed it this way: fastboot flash recovery boot.emmc.win
Then I had trouble gaining access to custom recovery (TWRP) so I tried flashing the custom recovery again. I got in! Made a full wipe, chose "install", twrp > BACKUPS > Serialnumber > Backup.zip. But it failed!!!!! It was missing a md5 file???
I'm starting to regret all this root-mess
Like BerndM14 said:
Download any x.xx.401.x backup (HTC__001 will be fine).
After that, let your custom recovery (TWRP), and do this:
1) Place the nandroid backup unpacked on the sdcard of the phone in the right backup folder.
If you don't know your right backup folder:
TWRP\Backups\ or TWRP/Backups/serialnum/ (replace serialnum with your device's serial number. To have TWRP create the proper directory structure for you, just do a simple backup of just the boot partition and put the backup files in there)
2) Flash the boot.img or boot.emmc.win file from the nandroid backup with this command (fastboot mode):
fastboot
flash boot boot.img
PS: Don't flash the boot.img with "fastboot flash recovery boot.img" command. That's why you had to flash TWRP again.
3) Access your custom recovery (TWRP)
4) Make a full wipe
5) Restore the nandroid backup and reboot
PS: Restore option is on TWRP > Restore. After access this, it will ask you to choose the folder that your have unzipped on the fisrt step (the one in the TWRP/Backups/serialnum/ folder).
6) Your phone now will be stock, BUT to receive OTA updates your ROM must be stock and your recovery must be stock. So, download a recovery that is with the same number of your downloaded backup (For example, if you download the x.xx.401.x backup, download the x.xx.401.x recovery too. If there is no exactly number for the recovery, download the one that start with the same number. For example, if you download x.xx.401.x backup you can download the recovery of x.xx.YY.Y version).
7) After you do the initial configurations of the stock ROM, access the fastboot again and flash the downloaded recovery with this command:
fastboot flash recovery recovery.emmc.win
That's it. Now with the stock ROM and the stock recovery, you can receive OTA updates (Settings>About>Softwares Updates).