I tested many unbrick methods but without success (thanks: @OldDroid, @imprk, @pepuandroll),
but this helped me to understand how to create a working method.
For convenience, I put all files into one package.
- Unlocked bootloader
- TWRP installed:
- Nougat: Code:
fastboot flash recovery twrp-3.1.1-1-duk.img
- Oreo: Code:
fastboot flash recovery_ramdisk twrp-3.1.1-oreo-duk.img
- FullOTA Nougat / Oreo files
1. Download FullOTA ROM (Nougat or Oreo)
2. Put all flasher files together with ROM files (update*.zip files)
3. Copy all files to: internal / external SD card or USB flash drive
4. Boot into TWRP
5. Install DUK_FullOTA_ROM_flasher.zip
6. [Optional] Do a factory reset, re-unlock the bootloader, install TWRP
I've tested it with several ROMs: Nougat-Nougat, Nougat-Oreo, Oreo-Nougat, Oreo-Oreo.