[Moto G4 Plus Questions & Answers] vithorleal:
Hello!

I've recently got into a big problem while doing stuff I don't know much about (and probably in the wrong way, because of that...). So, let's get to the problem, shall we?!

Well, I wanted to root my Moto G4 Plus (XT1640) but I had never done anything like it, so my phone was basically the way it came out of the factory. Before all of this, my phone was using Nougat 7.0.1 (I do OTA updates). I installed TWRP and followed the steps (even some from this forum). However, at that point my phone was boot-looping in the screen "Your bootloader has been unlocked, your device can't be trusted. Your phone will boot in 5 seconds.". Despite the warning, my phone didn't boot. After a while, screen got black and the only way I could use the phone was while in the bootloader. Then, I've made wipes through the Recovery, hopeful that it'd help, but it didn't. Finally, I surrendered and went looking for an original stock ROM I could flash and maybe get things working again. Found SOME ROM that's probably the right one ("XT1640_ATHENE-RETBR_MPJ24.139-50_cid50_subsidy-DEFAULT_CFC.xml.zip") (I'm from Brazil, btw). Great, downloaded, followed steps in the forum to flash it, great, it boots again! Can login to Google, default settings stuff, etc... HOWEVER.

Then, with my phone working again, I wanted to get rid of the nasty boot screen that said my device can't be trusted, etc. So I looked it up and tried to reflash the same stock ROM as above, but now doing it so I could re-lock the bootloader. To do that, I repeated the flashing commands but added the command "mfastboot oem lock" at the end (also used "mfastboot oem lock begin" as the 1st command). Then the CMD said I had to retype the command to apply. Did that, but then the following message showed: "Waiting for signed boot.img, enter the command again" or something like that (didn't printscreen, sorry). Then I reentered the command a 3rd time and then it said "Please flash a signed ROM" or something. So, basically, it failed. After that, repeating the command just showed the last message again. Unhappy, but hopeful, I entered "mfastboot reboot" to reboot my phone. So, got back into the phone (still with the nasty "Your bootloader has been unlocked" warning) and then I basically gave up. I'm now trying to install an OTA update (for Nougat, since the ROM I installed is 6.0.1) but the WiFi download is REALLY slow (and the problem is not my internet, since I've tried downloading a couple of files in my PC to test it).

So my biggest fear is that I have a ROM that's not REALLY meant for my phone (despite looking EVERYWHERE for it) and that's causing problems with the WiFi. Maybe the OTA update is just slow in the server-side, but I'd like to know. Is there a way to get the ROM I got when I bought the phone (that EXACT SAME ONE)?! I wonder if there's a problem because of Motorola/Lenovo regional things. Otherwise, the phone works (gets 4G signal, making calls and downloading Play store updates is as far as I've tested for now). And I would also like to know if there's a way to relock the bootloader in my case(since when I tried those errors I've mentioned above happened)? What I seemed to have done is downgrade a version (since I was in Nougat and then installed a stock ROM that's 6.0.1) and I don't know where to go from here. Thanks a lot, guys! Sorry for the long post, I just wanted to describe the events in order.