[Moto E5 Guides, News, & Discussion] mrbox23:
Sorry I haven't been on for awhile. I'll go ahead and post my working vendor and boot images. On Google drive for download. Doing this will trash your speaker if you play music very loud at all, expect that. I do not understand how to fix it. Other than that it's a daily driver. I have been asked about encryption this and that.. You have to modify fstab.qcom within vendor partition. Also the TWRP for this device will format your data partition as ext4 while the ramdisk and init stack are configured for f2fs(if you try and boot with ext4 data, you get corrupted/encrypted data message). You have to change data partition back to f2fs in TWRP every time you format that partition. Or you could modify the TWRP image like I did to fix it permanent.

Files will be uploaded soon, make sure you understand what's involved before getting into this. I'll answer questions best I can, but this is for those who are dediced and willing to get down on some bootloops to figure it out, especially if you're not used to this sort of thing. Some magisk modules will cause bootloops, do those one at a time and gapps separately. I seriously recommend taking apart the firmware from OP and focus on getting to the aosp boot animation, THEN take care of verity/root and fstab. You're formatting data partition anyway you might as well successfuly backport the graphics first.

Vendor image TWRP backup, put this on its own with boot image. I keep it as vendor_fixed for easy reference. The fstab is already patched if you use mine.

Boot image TWRP backup, it is patched with magisk (19.4 likely) install magisk on your own anyhow. KEEP YOUR ORIGINAL VENDOR/BOOT PARTITIONS! There's stuff in there that you might want later on. Like the /vendor/etc/wifi folder for example or the pieces from the original ramdisk.

Vendor and boot with md5 sums to verify integrity.

https://drive.google.com/folderview?id=1-2KO_iRFTjLv6pyx-7Qmhi8kWZBpVIWD

Wipe everything, including internal storage(after backing up a working system).

Format data partition back to f2fs in advanced wipe options.

Get LineageOS 15.1 beta or RR you can find these here on XDA.

Flash Lineage zip its the old style zip install that copies idividual files, not an image, the boot image it installs needs to be replaced per instructions that follow.

Or flash RR system image from official repository link is found here on XDA.

If you flash a system image with TWRP you'll need to reboot back into recovery right after and resize the system partition in advanced wipe options or your system partion will be incorrect size afterwards, if flashing system with fastboot(recommended) then skip the resize instruction.

After you have a system installed, restore the vendor and boot images from the link. A good approach would be to backup your existing boot/vendor as a pair, then replace originals with downloaded images.

The first time I got this to work, I used fastboot to flash partitions, like this.... I followed instructions within Metro PCS firmware(one of those xml files has the fastboot commands, including some oem options that specify a particular mode) Then i flashed ...RR system, followed by boot/vendor images from firmware referenced in OP. I finished that with fastboot -w option, that was when it worked for me. I dealt with the fstab and boot verity patching AFTER I first saw the default Android boot animation. Once you see that plain white "android" with the slow moving left to right animation, your in. From what I can tell our device needs the older kernel within the boot image and the libs/binaries from the vendor image to get the screen working correctly. Your trading your working speaker, for a working screen. I have attempted to find exactly what it is that's different between the two, but it's over my head. Overall it's relatively stable, go easy with magisk modules, some of them will cause kernel panic(bootloop) use a recovery based magisk tool to disable offending module if this happens. Sometimes the device will not boot normally, usually this means the cache was erased(its okay) for whatever reason and I wait it out, otherwise I restore the vendor_fixd backup I made. I have not had gone back to stock ROM, however I have had to flash the vendor partition to get it booting, usualy happens if i flash a module or when updates break substratum theme.

Good luck!

Oh email me for quick response, within reason.

mrbox24 at gmail

Bonus screenshot and the TWRP 3.1.1 I modified with correct data format. If you have an sdcard with second partition it will show up as "linux" named after the chroot partition from mine.

Screenshot shows LSM kernel found here, yes it works.