[Moto G5 Questions & Answers] K3n H1mur4:
Hey pal, I appreciate your advice and understand you're a very helpful member in the G5 forums, but I have around 10 years on the modding community (even before Android), and am pretty familiar with flashing via recovery, fastboot or vendors' flashing tools. I've already tried, so, the steps you suggested, to no result either.

Just as a sideline, I've actually managed to get an unlock code from Motorola's online support, but that doesn't make a difference anyway.

I gave a shot on three of the RETBR versions (Oreo 16-2 and 16-4, and Nougat 93-8, this last one obviously without flashing bootloader and gpt). In all of the attempts I got either one of two results: it gets to recovery (TWRP runs slow as hell, stock recovery seems fine) or it keeps bootlooping when I try to get to recovery.

Just tried a RETAIL 16-4 firmware (with gpt and bootloader from RETBR being flashed instead of RETAIL's files), the only error messages I got in fastboot were the expected "Image signed with key bad key when flashing boot and recovery .imgs, but they both flashed just as expected. Same result as before: bootlogo with unlocked warning (showing bad key), then a "boot animation" that was really just the first frame from each part (Motorola logo same as boot logo, the first frame of the animation that plays with the "Hello Moto" sound - also, only some parts of the tone played, like it was lagging too much; then Lenovo Logo; then Motorola logo with "Motorola, a Lenovo company" below; then Lenovo logo again - I really suspect that, if one pulls a bootanimation.zip from a stock firmware, each of the "0", "1", "2" etc parts will have as their first frame exeactly the frames I just described, as if the phone was unable to properly display the animation) displaying for a few minutes each, then it jumps back to bootlogo. It's definitely in bootloop even though I just flashed just per instructions, and also with this issue of being veeeeeeeryyyyyy sloooooooooowwww... After that, it just keeps going into bootlogo for several minutes, than screen off for a few seconds, then bootlogo again for several minutes.

There's no dirty flashing via fastboot AFAIK. When I managed to get into TWRP, I had an issue with /data being encrypted and in F2FS, and some issue with /cache, too (but /cache was in EXT4), both of them were showing as 0B in size at that "repair or change file system" screen.

I read somewhere that F2FS can make TWRP very slow, so I though it could be that, but I formatted /data to EXT4 as well and the phone was still very slow. I also was having issues with TWRP not being able to mount /data and /cache, formatting solved that as well.

After formatting, I managed to flash Bootleggers. It took a good 30-40 minutes to flash, and TWRP restarted right after that so I couldn't flash GApps. It went again into a bootlogo-only bootloop (no frames from boot animation appeared before it restarted into bootlogo again). Then I just gave up on TWRP and tried finding some stock firmware that could boot, but, as stated on the answer above, I still didn't manage to do so.

Right now I'm suspecting either a hardware fault or something very messed with GPT (but I can't really tell for the second one since I've already flashed both RETBR's GPTs and both of them gave me the same result).

What I'd like to try now before just giving up are both very unlikely options to find: first, a custom ROM that's fastboot flashable (Iif I remember well some files in fastboot must be signed by Motorola else they won't flash, so there's no way to create a fastboot-flashable custom firmware, am I right?); second, to find out if the bootloader is stored in the same NAND/eMMC as the other partitions, or if it is a separate chip. If it's the same chip, I could easily rule out a hardware fault and try to find other possible solutions. If it's stored separately, than it explains why bootloader works without stuttering and the other modes (except for stock recovery, but that's kinda slow by itself so I could simply be unable to tell the difference) like TWRP and normal booting are so slow and failing everytime.