[Android General] limited_imagination:
I'm thinking about having another bash at this, now that I'm sure I can recover from possible boot loops.

I uploaded the "Image.gz-dtb" file to Google drive, so anyone can download it directly, instead of compiling it from scratch in a Linux VM. It will save a lot of time for someone who might like to experiment along with me in flashing their device.

Here is the link, let me know if you have problems getting a copy: https://drive.google.com/file/d/1oKWUP6gA3cZHCWI2eUwLr1Lvy7DJgEtn/view?usp=sharing

After the compile process is finished, that file is generated in the source code tree, in the kernel/arch/arm64/boot/ folder. There is also an Image.gz file generated in that same folder, which is slightly smaller in size, but I think we're interested in the Image.gz-dtb file. (Please correct me if I am wrong, anyone reading this with relevant experience.)

So in my "autopsy" comments above, I identified three areas where flashing the new boot image could have failed, and caused the soft brick.

Let's ignore issue #1 for now, the kernel compile itself, and let's proceed on the assumption that it's ok for the moment. That's the Image.gz-dtb file, that I uploaded to Google drive.

In respect of issue #3, let's flash the new boot image in TWRP differently. Instead of pressing "restore" and directing TWRP to the new boot image file and trying to fake a restoration, I intend to press "Install", then "Install image", then select the image file on the device, then direct TWRP to install it to the boot partition. That's the technique we all used to flash TWRP over the recovery partition, as instructed by [MENTION=7383447]MotoJunkie01[/MENTION] in the first post of this thread, which we know works properly. My "restore" technique was possibly a source of problems, certainly with the .md5 checksum that would not match the new file.

Issue #2 poses the most potential problems, and it's where I need some direction from people like [MENTION=9720847]AeonFlux1603[/MENTION] and [MENTION=8548258]wezroot2k[/MENTION]. Ok, so I have generated the Image.gz-dtb file, but what the hell do I do with it now?

What I did previously was to take a TWRP backup of the boot partition, and grab the file that had been named "boot.emmc.win" by TWRP. I then unpacked this file with Android Image Kitchen. That generates two files of interest, "boot.emmc.win-ramdisk.cpio.gz", which is 2.0 MB in size, and also "boot.emmc.win-zImage", which is 7.0 MB in size. At that point, I just deleted the boot.emmc.win-zImage file, and copied my Image.gz-dtb file into the folder. Then I renamed the Image.gz-dtb file as "boot.emmc.win-zImage". Then I repacked all the files together with Android Image Kitchen, which generates a file named "unsigned-new.img". I renamed that file to "boot.emmc.win", and that's the end result that I eventually flashed to the device.

Please comment on this procedure with AIK, and tell me if I'm doing it incorrectly.

PW suggested that I start with the boot image from the factory stock ROM:

However, I have 2 issues with the using stock boot image file, "boot-sign.img", from the stock ROM that I downloaded from the Russian forum:

1) AIK can't recognize the format of the stock ROM "boot-sign.img" file, and so AIK can't unpack it.

2) As MotoJunkie01 said in the first post in this thread,

If anyone can tell me how to unpack the stock "boot-sign.img" file with AIK, then I'm happy to start with that one. But since I can already use AIK to unpack my TWRP backup of the SU-patched boot image from the device, I would expect that to be the better starting point. Please correct me if I am wrong, as I really don't know what the implications of dm-verify are here.

I also don't understand the implications of AIK generating an unsigned boot image at the end of the packing process. Will the issue of lack of signing the file create a boot loop, just by itself? Did TWRP sign the original "boot.emmc.win" file when it generated the backup?

So, that's where I'm at. I would really like to hear some informed commentary on the proper use of AIK with this new "Image.gz-dtb" file, before I try to flash this thing again.

Thanks, all.