yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus Guides, News, & Discussion] echo92:
Are you able to press 'Start' and if so does that take you to booting your system?

If so, you may choose to:

Connect your phone via USB cable to your computer.

Open your adb terminal.

Reboot to bootloader on your device (and verify via typing 'fastboot devices' into your adb terminal, without quotes, that your device is communicating)

Within the adb terminal still, run the command 'fastboot oem fb_mode_clear'

Reboot.

That should clear whatever setting is stopping you from booting into your system directly.
[Moto G4 Plus Guides, News, & Discussion] gutosilva:
[MENTION=7970352]echo92[/MENTION] Hi. Do you know if this rom is compatible with XT1626?
[Moto G4 Plus Guides, News, & Discussion] echo92:
I've not seen anyone test out this stock ROM on XT 1626 devices yet. However, this ROM looks to be compatible with G4 and G4 Plus devices that received the Nougat NPJ25-93.14 update at some point, and may also have received the March 2017 NPJS25.93-14.4 update (provided your device isn't from Amazon Prime or locked down by a carrier).

I note that XT1626 devices were successfully updated to the March update via flashing the OTA (https://xdaforums.com/showpost.php?p=71796085&postcount=86) so thus this stock ROM should be okay(since it's the same version as the OTA). You may wish to wait til someone else has tested it, though reports from those that have flashed this stock ROM on other devices appear to have had few if any issues. Of course, if you wish to try, make a back up of your data before hand (as the update may wipe your data in the process).
[Moto G4 Plus Guides, News, & Discussion] gutosilva:
OK man, thank you very much.
[Moto G4 Plus Guides, News, & Discussion] dayask:
Hey is this the march patch ROM?

---------- Post added at 10:05 AM ---------- Previous post was at 10:00 AM ----------

I have a ROM which contains December security patch 1 week earlier I flash stock ROM then got a ota which is March security patch then go back to custom ROM and now I wants to go back in stock its showing failed in fastboot
[Moto G4 Plus Guides, News, & Discussion] toppits:
The title says: (March 1 Security). What do you think? Could that be the "march patch ROM"? Freaking mystery, if you ask me.
[Moto G4 Plus Guides, News, & Discussion] Fede79:
Thank you, will try it.

Enviado desde donde estoy ahora. ¿Que esperabas?
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
Tested it myself and it works fine.
[Moto G4 Plus Guides, News, & Discussion] ivan290:
Dont you feel it laggy?
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
Nope, runs totally smooth.
[Moto G4 Plus Guides, News, & Discussion] yolagarto93:
I feel it extremely laggy as well. Can't figure out why.
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
Did you dirty flash it? I did a factory reset right after installing the rom and at my side it runs like a young god, even smoother and better battery backup then Marshmallow.
[Moto G4 Plus Guides, News, & Discussion] yolagarto93:
I flashed it through fastboot, that erases everything I think. But I didn't know I should factory reset everytime I flash a stock rom that way. Will try that

Edit: typo
[Moto G4 Plus Guides, News, & Discussion] echo92:
If you've performed the 'fastboot erase userdata' and 'fastboot erase cache' steps, you should have a clean system. Because of that though, your device may well be laggy after the first boot as it's still setting itself up - hopefully the lag disappears after about 15-30 minutes of leaving the device alone to let itself settle.
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
It's not necessary, but I allways do it. :)
[Moto G4 Plus Guides, News, & Discussion] yolagarto93:
I've performed every command in the .bat file, so I do have a clean system.

And I've been running the rom for a couple of days now. That's why I can't figure what's happening. I'll factory reset and report back. Thanks!

Oh, and the phone is XT1641
[Moto G4 Plus Guides, News, & Discussion] ivan290:
Well at least i'm not the only one... What device do you have?? I have de Xt1621 Retail Argentina, i think it could be that i flash a xt164x firmware in the xt1621 (plus firmware in a non plus device). I know that this firmware works in all devices, but maybe that is the cause....

---------- Post added at 11:56 AM ---------- Previous post was at 11:55 AM ----------

It still laggy after weeks.....
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
Is it laggy in safe mode too? If not, maybe some of your installed apps make it lag.
[Moto G4 Plus Guides, News, & Discussion] TheeuS:
Thanks for the link of this ROM.

I used it to re-lock my bootloader and send my device to service center (in warranty).

Had burn in issue and they replaced the whole module (I'm from Brazil BTW). The issue is gone, but I'm thinking about selling my Moto G4 Plus now, since the issue will probably appear again in a few months.
[Moto G4 Plus Guides, News, & Discussion] echo92:
How are you flashing the stock ROM, and are you flashing the September 2017 stock ROM?

Have you got OEM unlocking enabled in Settings>Developer Options before you attempt to re-lock?

---------- Post added at 11:45 PM ---------- Previous post was at 11:42 PM ----------

Which stock ROM are you referring to that has .62R? The June 2017 (NPJS25.93-14-8) and September 2017 (NPJS25.93-14-10) stock ROMs have basebands ending in .62.01R.

As you're in Brazil/Latin America, I don't know if you'll have the September 2017 stock ROM (NPJS25.93-14-10) as an OTA update or if you got a different version (NPJ25.93-14-8.1) which I think is the June 2017 update.
[Moto G4 Plus Guides, News, & Discussion] arka997:
Can I use 'fastboot erase system' command before flashing all these.my bootloader is unlocked and I want a clean start of my device.will erasing system do anything bad?
[Moto G4 Plus Guides, News, & Discussion] strongst:
Since system partition will be flashed there's no need to wipe it seperately. Also all user data of internal storage will be wiped too. So you have a blank device, like new.
[Moto G4 Plus Guides, News, & Discussion] BrentskyB:
Ok so I have a moto g4 XT1625. I keep running into the problem of getting to the DEC 1 , 2016 bsecurity patch level and then as soon as it does it's OTA update it ends up bricking my phone. I then have to use the Blankflash and reflash method just to get back to the spot of DEC 1, 2016.. Can somebody tell me how I can go about getting the needed update and applying it via fastboot. Thanks in advance for your help.
[Moto G4 Plus Guides, News, & Discussion] Outfield303:
flash the whole firmware from OP

it will fix it
[Moto G4 Plus Guides, News, & Discussion] BrentskyB:
I've already flashed the entire FW from the OP. So after that your saying I should be able to do an OTA and not have it brick the phone anymore when getting an OTA ?

Thanks for the help.

I should also tell you at one point I put the elemental x on it and magisk does that have any effecgt on the path I take. Since then I did everything in the original, post.
[Moto G4 Plus Guides, News, & Discussion] Outfield303:
you'll need full stock setup for taking OTA, that means you need stock recovery, stock kernel and everything

and if you have flashed elimentalx and rooted with magisk then you need to flash the stock kernel and recovery which are boot.img and recovery.img from fastboot

otherwise you will probably stuck on boot-loop cuz taking OTA needs whole stock setup
[Moto G4 Plus Guides, News, & Discussion] echo92:
Provided you flashed the GPT, bootloader and other firmware from the stock firmware and verified it flashed okay, you should be able to take OTA updates.

OTA updates can brick your device if your system and bootloader are not of the same patch level (e.g. newer bootloader, older system), so you're attempting to apply a older patch onto a newer bootloader, the resulting mix bricking your device, which is likely what happened to you on the Dec 2016 stock ROM. As an aside, delete that old stock ROM and only flash the September 2017 stock ROM or a stock ROM matching your firmware's patch level, else you will hard brick again.

Though you don't have ElementalX and magisk now, if you have them on your device, you cannot take OTA updates. As siddhesh9146 has mentioned, you will likely bootloop as the OTA fails to install because of the custom kernel/recovery/root. You must revert back to full stock - no custom modifications - to accept OTA updates.
[Moto G4 Plus Guides, News, & Discussion] BrentskyB:
Well i tried the OTA update again and got the dead phone where nothing happens but the blinking power light when plugged in via usb. Will have to Blankflash again and re-install. I will take some screenshots of the fastboot process and maybe somebody can tell me exactly where the problem is lying or exactly what to download to fix the problem. Thanks.

Having an unlocked bootloader can't be the cause of this correct ?
[Moto G4 Plus Guides, News, & Discussion] echo92:
If you flashed the whole firmware from the opening post, how are you getting an OTA? The firmware in the opening post is the latest one we currently have access to (September 2017, NPJS25.93-14-10), so you shouldn't be getting OTA updates yet...

I'd doublecheck what firmware and what bootloader you have been working with.

An unlocked bootloader isn't the likely cause of this, it's likely due to still having the December 2016 firmware but a newer bootloader (e.g. from June/September 2017). Hence why I mentioned you need to fully flash the stock ROM (and from what you wrote, this should be the stock September 2017 firmware from the opening post...?)
[Moto G4 Plus Guides, News, & Discussion] cvjoe89:
Hey,

If this ROM supports all variants does it also supports all basebands? I still can't get LTE in Colombia with my XT1622. I thought that flashing this ROM would solve my problem.

That aside, the battery life has improved a lot, I read somewhere that it must be the latest security patch.
[Moto G4 Plus Guides, News, & Discussion] Epiklyepik:
I am currently a RR user.. If I flash this,can I receive updates after this...I hear Oreo is coming to g4. I know that answer but I'm really worried..don't want to run into bricks like many other user do..

Secondly..my phone is on a contract with company called Koodo (Canada), it's owned by another major company called Telus...If I flash this will it still work.. I don't see the variety of stock roms based off of provider

I am facing battery drain in RR and figure stock is my only hope..

Will substratum work?

And I plan to flash Xposed framework and get gravity box to achieve some sense of customization like RR provides.. will it all work?
[Moto G4 Plus Guides, News, & Discussion] echo92:
1) I don't know if NPJS25.93-14-10 is the intended firmware for Canadian devices, perhaps someone with a Telus/retca (retail Canada) device can chime in. If need be, we can have a look at your getvar all information from fastboot to determine which stock ROM you need. I say this because until recently, Motorola appeared to unify the stock ROM builds, now they seem to be diverging again. Flashing the incorrect build for your region may make you ineligible for OTA updates as the update servers might not recognise the build.

2)Provided you flash the same or newer firmware as your bootloader patch level, and ensure your bootloader patch level is the same as your system, you won't brick. Users bricked due to flashing older stock firmware (e.g. Marshmallow or the early stock Nougat builds) and then attempting to update via OTA, corrupting the bootloader.

3)Flashing the stock ROM is always a good way to determine whether it's software causing the battery drain or if it's your battery on the way out. I have decent battery life on NPJS25.93-14-10.

4)Oreo is still some way off mind - we still don't know when it'll arrive.

5)Substratum will likely only work in legacy mode - you'll only be able to partially theme the device and certain parts of the theme won't work/may cause crashes due to the lack of Substratum commits in the stock ROM.

6)Provided you root on the stock ROM (following a guide such as this: https://xdaforums.com/moto-g4-plus/how-to/guide-root-moto-g4-plus-supersu-android-t3587918 ), I think xposed and gravitybox should work; there's an existing thread about xposed on our devices: https://xdaforums.com/moto-g4-plus/how-to/xposed-framework-moto-g4-plus-t3398332/page7 This page covers the official xposed for Nougat, don't mix and match with the unofficial xposed else you may run into stability issues.
[Moto G4 Plus Guides, News, & Discussion] Epiklyepik:
I will wait if anyone else has a Canadian device....xt1641.

Just to be sure, how do you take a look at getvar info from fastboot..tell me step to get that if you need that..

https://firmware.center/firmware.. visit this site..it has >Moto g4 plus>stock>XT1641> there is Telus and recta both there for download...the question is are these the diverging builds, if so, I can download...

are these build that will work for OTA, are they up to date...there is no firmware version of the links and download so can't be sure

Edit: I checked the site again...doesn't feel like correct firmware...it's starts of with mpj rather than NPJS
[Moto G4 Plus Guides, News, & Discussion] afaque22:
I am having the same problem, can someone help me?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Which stock ROM are you trying to flash? Flashing a stock ROM older than your current bootloader patch level is a likely cause of those hard bricks.
[Moto G4 Plus Guides, News, & Discussion] Epiklyepik:
[MENTION=7970352]echo92[/MENTION] I will be flashing my stock firmware this weekend...I plan to use the one provided in OP..

Pls tell me if you need to examine Getvar info so i don't end up not recieving OTA

btw: If i flash this stck rom, it will still go to stock without bricking right, its only if I update the device that it might brick it..

I was running on the latest firmware ( 7.0 ) before switching to roms.....im a very nervous cow right now:eek:
[Moto G4 Plus Guides, News, & Discussion] echo92:
To get getvar info:

Reboot your device to bootloader.

Attach your device to your computer.

Open the ADB terminal and type 'fastboot getvar all' without quotes. Press return to execute the command. That should present some info about your device.

Paste that info here.

You will only likely brick if you flash firmware older than your bootloader patch level and then attempt to use OTA updates. As this is the newest firmware available, you shouldn't brick if you update. Furthermore, with your getvar info, we can do our best to guide you to the same firmware you had before you flashed RR. That way, you shouldn't brick as your device firmware should be on the same patch level.

Edit: don't flash those firmwares you found, as you mentioned, they are for marshmallow. Attempting to flash them on a device updated to stock Nougat and then updating via OTA may lead to a hard brick.
[Moto G4 Plus Guides, News, & Discussion] RishabhZR:
I have model XT1643 (Indian Version) and previously I was on build number: NPJS25.93.14-8 (Stock rooted rom, phh's). So what I did was I flashed 14-10 rom on 14-8 rom via fastboot.

Flashing was successful but when my athene was booting up I still got bootloader unlocked warning and in Google Play Store it is showing Device Certification as Uncertified and Safety Net also failed.

So I tried to flash the rom again by typing the commands one by one and when I type fastboot oem lock I got these lines:

bootloader slot count not found.

bootloader slot suffixes not found.

and one more bootloader line was there which showed the same result not found.

And yes, in Bootloader Unlock warning it is showing 'ID: Bad key'

Other than this my device is working fine, IMEI numbers are the same and Fingerprint sensor is working perfectly.

So my doubt is did flashing 14-10 on 14-8 caused this problem or something else. Please help me out in locking my bootloader.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Having SafetyNet fail is a result of having an unlocked bootloader.

You can either root your device with the ElementalX kernel and magisk - magisk can hide the bootloader unlocked status - or you can re-lock your bootloader.

The lines you got when you tried to relock your bootloader are normal (I refer to the slot count not found messages) for our device.

When you attempted to relock, are you using the latest NPJS25.93-14-10 stock ROM, and did you use 'fastboot oem lock begin' at the start of your list of commands?
[Moto G4 Plus Guides, News, & Discussion] RishabhZR:
Yes I did. And I have mentioned earlier that I was on Stock Rooted NPJS25.93-14-8 rom on which I flashed latest NPJS25.93-14-10 stock rom which I downloaded from the link in the 1st post of this thread.

Initially I ran the oem lock.bat file and it started from fastboot oem lock begin. But after the process finished and my mobile was booting it had that bootloader unlock warning with 'ID: Bad Key' message.

Is unlocked bootloader is the reason on Google Play Store it is showing my device as Uncertified?

And one thing I forgot to mention, when I open BHIM (a Unified Payment Interface app) it gives a message 'Your Device is Rooted, Proceed at your own risk' but the app allows me to do the transactions.
[Moto G4 Plus Guides, News, & Discussion] RishabhZR:
Initially I ran the bat file but when bootloader failed to lock then just to see why it is not relocking I entered each line manually.

I also ran getvar command line and there also it showed all three bootloader slot lines as not found.
[Moto G4 Plus Guides, News, & Discussion] Epiklyepik:
https://drive.google.com/file/d/1w2ILdKTWGOYrXNZFcBfHxpVrCpZYEA7t/view?usp=sharing

[MENTION=7970352]echo92[/MENTION] here is the all the getvar info...see if that helps..
[Moto G4 Plus Guides, News, & Discussion] echo92:
Do you have OEM unlocked enabled in Settings>Developer Options?

Do you see any other messages apart from the bootloader slot not found? Since we don't have the A/B partition system as on Pixel devices, those messages are normal. The fact you don't receive other messages is worrying. Can you post the output you get from each command? Can you also confirm your device is communicating with 'fastboot devices'? This command should return your device serial number.

---------- Post added at 04:11 PM ---------- Previous post was at 04:08 PM ----------

Your device is running the NPJ25.93-14 December 2016 stock ROM. You should be able to flash the December 2016 stock ROM https://xdaforums.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369

Then, your carrier should hopefully have OTA updates to bring you up to whatever latest version they have.

As for the OEM locking scripts, they should work normally, but on occasion they fail. Either they're waiting for the device to respond or finish the previous command, and thus they do not work properly. Flashing manually and in order should give your device enough time to respond or allow you to troubleshoot where your device is not flashing properly.
[Moto G4 Plus Guides, News, & Discussion] Epiklyepik:
Ok thanks and will write out all script manually.. do I do them one at a time ( the command then enter then next command then enter....). ?

Btw I forgot to mention...when I open up adb in fastboot folders, I don't really get adb.. yesterday when I got getvar info it opened up windows powershell..have attached below..

All the command still worked perfectly

Is this normal and can I still continue?
[Moto G4 Plus Guides, News, & Discussion] ldeveraux:
So I tried this before with success but no luck now. I'm using a Moto G4 (not plus) xt1625 unlocked with twrp and rooted with magisk. Everything it's running well and the build is NPJ25.93-14.5 with the June security patch. The phone said I had an update, so I flashed logo.bin, boot.img, and recovery.img from the closest build I could find online (93-14.4) in fastboot. I then let it boot and take the ota. When it downloaded, it rebooted to install it but landed on the dead android "no command" screen. I rebooted again and it didn't take the ota obviously. But now it won't find the new update for me to try again. I check for system update and it says I have the latest. Any clue what might have gone wrong and how I can fix this?
[Moto G4 Plus Guides, News, & Discussion] echo92:
If you're entering in the commands manually, do them once at a time - copy/paste the command, verify it's the correct one and then press enter. Wait for it to execute and say [OKAY] before proceeding. As such, ensure you have plenty of time to carry this out.

Hmm, for me the adb terminal opens up in a normal command shell, you may have yours set up to send Windows command prompts to Powershell. Still, if it works and interfaces, I'd say give it a go?

---------- Post added at 05:30 PM ---------- Previous post was at 05:23 PM ----------

Hmm, sounds like the OTA failed from having traces of root in the system partition or having the system not read-only, either of which would cause a OTA to fail. Seems like the OTA might have updated part of your system though or set a property pointing to the new build, hence why the update doesn't show up again.

You'll likely have to reflash the NPJ25.93-14.5 stock ROM, for non Amazon devices is here: https://androidfilehost.com/?fid=673368273298984458

You may be able to reflash the above stock ROM in fastboot without having to erase your data, but backup and be ready to factory reset should your device become unstable. Use the following commands in this case:

fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot reboot
[Moto G4 Plus Guides, News, & Discussion] Epiklyepik:
[MENTION=7970352]echo92[/MENTION] Thank you so much...the thing worked like a charm..btw I didn't type out all commands manually and just clicked on lock.bat thing and it opened up the actually adb rather than windows powershell.

I then had to go through about 3 updates and that got me to the September security

confirmed working on XT1641 canadian version :)

now i can take my dads note 3 and try out the note 8 roms for it and ill give him this stable g4+
[Moto G4 Plus Guides, News, & Discussion] flroots:
My current build is NPJ25.93-14.5 and I just started receiving OTA notices for NPJ25.93-14.7. I'm confused. Why are others receiving 14-10? As reference, I have the XT1644 here in the US. Also, I am looking for the stock firmeare for NPJ25.93-14.5. Can anyone point me in the right direction? Thanks.
[Moto G4 Plus Guides, News, & Discussion] echo92:
For non Amazon us retail devices NPJ25.93-14.5 https://androidfilehost.com/?fid=673368273298984458

NPJ25.93-14.7 appears to be up too: https://androidfilehost.com/?fid=817906626617945295

NPJS25.93-14-8 and 14-10 are OTA updates for another retail channel (I think India, Brazil and UK/EU at least). US devices are on another channel and as such you're getting different updates as you mentioned.

By the way, please refrain from posting the same question in multiple threads.
[Moto G4 Plus Guides, News, & Discussion] flroots:
Thanks.
[Moto G4 Plus Guides, News, & Discussion] ldeveraux:
Thanks again, this worked 100%!! turns out I had a partial flash, but flashing each part in bootloader got me back. Updated, then re-rooted etc. I also downloaded the latest full ROM (NPJ25.93-14.7) from Moto's androidhost site, so I can do this easily with the next OTA. Thanks again!!