yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus Guides, News, & Discussion] ASB41:
Oh yes dude.. while fb_mode_clear is running i closed the mfastboot window & turned my phone on.. i though it's completed..

Thanks for help.
[Moto G4 Plus Guides, News, & Discussion] swarupgolui:
LOL..:laugh::laugh::laugh::laugh:
[Moto G4 Plus Guides, News, & Discussion] ASB41:
I waited almost 5min for that command to complete:confused:.. but nothing.. it was stuck there.. that's why i though it's completed.

Anyway.. dude it's done.. thanks again for help.
[Moto G4 Plus Guides, News, & Discussion] kemesh:
Thanks man for saving the day for me
[Moto G4 Plus Guides, News, & Discussion] jeevan_cool:
is there any way to downgrade without wiping internal storage?
[Moto G4 Plus Guides, News, & Discussion] slyfth:
When I am trying to install the Nougat OTA zip file from within the stock recovery, it is giving me the following errors:

Verifying current system. . .
Mount count = 9
Last mount path = /system
Last mount time = 1479061757 -> Sun Nov 13 18:29:17 2016
Device was remounted R/W 9 times
Last remount happened on Sun Nov 13 18:29:17 2016
E1004: system partition fails to recover
E: unknown command [log]
E: unknown command [log]
E: Error in /sideload/package.zip
(Status 7)

Installation aborted.

How do I go about fixing this? I have followed your guide on how to downgrade and downgraded my XT1643 to -63 baseband.

Help please!
[Moto G4 Plus Guides, News, & Discussion] swarupgolui:
I Don't Have Any Problem with This Step...

Try Again...
[Moto G4 Plus Guides, News, & Discussion] slyfth:
I had to reinstall MM twice and not boot in (so as to prevent any changes from happening to the /system partition) before installing the Nougat update and it worked. Thanks.
[Moto G4 Plus Guides, News, & Discussion] Mark2311:
It works.

I was stuck on a bootloop and now it's all good. No issues with fingerprint scanner or anything else.

Thank you :)
[Moto G4 Plus Guides, News, & Discussion] zamshak:
I want to relock my boot loader after downgrading from nougat to marshmallow.

For downgrading from nougat to marshmallow i had unlocked my bootloader and flashed marshmallow firmware but now i am unable to relock my boot loader when i hit commands to lock bootloader :

fastboot oem lock

it ask to flash boot.img file

after i hit:

fastboot flash boot boot.img

it display message of verification failed pls help...
[Moto G4 Plus Guides, News, & Discussion] swarupgolui:
It's not possible right now, wait For Stable nougat release...
[Moto G4 Plus Guides, News, & Discussion] PseudoDev:
Can someone please upload only the recovery. IMG of this build? Please. Just the recovery [MENTION=7714325]swarupgolui[/MENTION]
[Moto G4 Plus Guides, News, & Discussion] zamshak:
Pls provide the link of stable nougat firmware as soon as available.

Pls provide the link of stable nougat firmware of moto g4 plus (XT1643) as soon as available with steps to relock bootloader.
[Moto G4 Plus Guides, News, & Discussion] sainaren:
what about bootloader?

Is your bootloader locked after downgrading from nougat [on Moto G4 Plus]
[Moto G4 Plus Guides, News, & Discussion] swarupgolui:
No
[Moto G4 Plus Guides, News, & Discussion] Saksham Thapaliya:
Sir i want to know will there be any problem regarding imei,baseband & fingerprint if i follow all your instructions as I'll be downgrading from NPJ25.75-2.

Device:XT1643
[Moto G4 Plus Guides, News, & Discussion] swarupgolui:
wait For official release...
[Moto G4 Plus Guides, News, & Discussion] a-2-k:
Downgrade nougat to MM (MPJ24.139.63 1july security patch)

I am using my phone after downgrade 15 days but still not get any September ota update plz tell me what I do....

Any one have same problem just like mine

Sorry for my bad english
[Moto G4 Plus Guides, News, & Discussion] abhi212b:
It says your device is not verified!! :/ now how to get rid of this?
[Moto G4 Plus Guides, News, & Discussion] malavgajen:
I'm on nougat soak, if i want to downgrade to mm, bootloader should be unlocked as you mentioned. Can bootloader be unlocked & locked from developer options in phone settings?

Thanks
[Moto G4 Plus Guides, News, & Discussion] kosmasgr:
Thanks for this. Its the only method that downgrade my Xt1622 and changed again system status to official
[Moto G4 Plus Guides, News, & Discussion] sainaren:
Which version of rom did u installed.... Is your bootloader relocked

Which version of rom did u installed.... Is your bootloader relocked
[Moto G4 Plus Guides, News, & Discussion] kosmasgr:
Hello , i installed XT1621-XT1622-XT1642_ATHENE_MPJ24.139-23.4 and after first booting receive OTA update. My Bootloader is still unlocked. There is no point to relock bootloader if its possible.
[Moto G4 Plus Guides, News, & Discussion] alvintimothyjr:
Tried this yesterday...Worked perfectly.

Much appreciated!
[Moto G4 Plus Guides, News, & Discussion] rpalvai:
Upgrade to Nougat after Downgrade

I downgraded to MM MPJ24.139-63 following your guide. If i want to update again do I flash the OTA from recovery or just do it through settings.
[Moto G4 Plus Guides, News, & Discussion] THUNDERGROOVE:
Oh man, I really wish they'd put this in in the OP Nougat threads, just wasted three hours trying to fix my XT1625 I accidently flashed.
[Moto G4 Plus Guides, News, & Discussion] KueDAWG:
Can I use this guide to downgrade from NPJ25.93-14 back to Marshmallow? I'm on xt1625
[Moto G4 Plus Guides, News, & Discussion] Daniel47833:
Is xt1643 stock rom the same as xt1641? Can I flash xt1643 to xt1641?
[Moto G4 Plus Guides, News, & Discussion] Danny1976:
Great tutorial. I was able to downgrade to stock marshmallow from LineageOS and then upgrade to stock nougat. I was using LineageOS, because Nougat was taking too long get released for the Moto G4
[Moto G4 Plus Guides, News, & Discussion] tekweezle:
just wanted to report that these steps worked for me to restore my G4 XT1625 back to stock and unrooted MPJ24.139-49 so it could accept the nougat update.

I gathered the mfastboot commands into a batch file in Windows and ran them all at once and it worked well.
[Moto G4 Plus Guides, News, & Discussion] ironman38102:
Will this completely wipe my internal storage or only factory reset it?
[Moto G4 Plus Guides, News, & Discussion] Danny1976:
It will wipe your internal storage.
[Moto G4 Plus Guides, News, & Discussion] HTCZ715E:
Hello, [MENTION=7714325]swarupgolui[/MENTION] !

I successfully downgraded with your method my XT1622.

Now I am facing problem of installing TWRP :(

After flashing TWRP 3.1.1.0 in Fastboot, it fails to boot into TWRP recovery. If I reboot phone, TWRP is replaced by system.

Have you any ideas? should I try older versions of TWRP?
[Moto G4 Plus Guides, News, & Discussion] echo92:
So if I've understood you correctly, you've flashed TWRP but when you reboot your phone (which reboot method are you using?), you boot to the system (instead of TWRP recovery)? Or do you mean that TWRP keeps being replaced by the stock recovery?
[Moto G4 Plus Guides, News, & Discussion] HTCZ715E:
[SOLVED]

when I flash TWRP from fastboot, then again from Bootloader I am pressing "RECOVERY MODE". and bootloader reports:

"Error: failed to to boot kernel!"

"Boot up failed"

afterwards I am only doing normal boot.. (which restores stock recovery)

P.S. I restored MM stock bootloader! But result is same :(

BTW, I have applied MM OTA MPJ24.139-63.. can be this cause of failure?

EDIT:

Succeed to install twrp-3.0.2-0-athene.img!! so problem was in newer versions of twrp
[Moto G4 Plus Guides, News, & Discussion] treela:
This worked for me on XT1622 British retail - thanks so much!
[Moto G4 Plus Guides, News, & Discussion] echo92:
1) Ensure your bootloader is unlocked.

2) If you're wishing to downgrade, try omitting the GPT and bootloader flashing commands:

mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img

then attempt to flash.

3)If you're downgrading, be very careful if you choose to update via OTA - especially if you were on the June 2017 security update previously, updating via OTA may result in bricking your device.

4) You will only be able to re-lock your bootloader by flashing the stock ROM firmware of the same build or newer than what you have now.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, that's odd - if you've got an unlocked bootloader, it shouldn't be complaining about a security downgrade (if you're omitting the GPT and bootloader flashing).

What are you trying to achieve by downgrading to the November 2016 patch? We've already got the March 2017 fastboot ROM btw: https://xdaforums.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
[Moto G4 Plus Guides, News, & Discussion] moonlightdrive:
[MENTION=7970352]echo92[/MENTION] When i bought this device it came with 7.0 pre-installed (3 months ago, or less). My favourite Android version was clearly Marshmallow 6.0.1 in all my previous devices, even when Nougat was available for these devices i was always sticked with Android M.

My question is: (i am assuming that you used M for a while) how did you feel the device performance in 6.0.1, better or equal than 7.0? and what about the camera quality or image processing? i readed a couple of times that it was "better" here in M.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, I recall that MM ran smoother and perhaps a little cooler than Nougat, though the recent March and June 2017 Nougat updates seemed to have remedied much of these issues and I've been pretty happy with performance. As for the camera/image processing, I'm not sure of any differences - maybe someone's done a comparison?

I imagine that the stock ROMs floating around, provided you can find the right one for your device and territory, likely would let you flash MM onto your device. Of course, that'd require an unlocked bootloader. However, if you've also got the June 2017 security update for Nougat, I'd be very careful when downgrading. I don't know if you can downgrade to MM safely (without flashing the GPT and bootloader) without a brick - I'd hope so (but currently I've not seen anyone attempt it). Also, if you choose to downgrade, I'd suggest not using an OTA to update, else that risks a brick too. I leave it up to you - it's your device, your choice :)
[Moto G4 Plus Guides, News, & Discussion] moonlightdrive:
Thanks for such an excellent answer, as always :good:.

I am currently on last patch (June), ElementalX 1.04, zRam & KSM disabled. Works wells here, facing some lags sometimes when i use Chrome and type anything in the search box, i can say that it's a 8/10 performance for me.

Maybe i will flash some TWRP backup from 6.0.1, and try to find the flashable sensorhub to get all the things on working condition.

Once time more, thanks for your answer.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Thanks :) I observed some slight lagginess with ElementalX and the June patch too (interestingly, the stock Motorola kernel was rather smooth). Like you observed though, I wouldn't be surprised if that lag was thanks to Chrome.

I'm testing the vegito kernel on the June update, so that could be an option to try (though you'll have to unroot, then flash the stock Motorola kernel, then flash vegito and re-root). So far, seems to be stable and runs decently well :)

Whatever you try, good luck :)
[Moto G4 Plus Guides, News, & Discussion] moonlightdrive:
I will try Vegito, last question: if i flash the kernel from the march update, because it's the only last full factory image that we have right now, it will be ok?

I decompressed the OTA zip from june, but i didn't found the boot.img.
[Moto G4 Plus Guides, News, & Discussion] echo92:
I'm not sure if a kernel from a previous version will behave properly. Do you have a TWRP backup of the stock ROM with the June update that you took before flashing ElementalX (that would contain your boot partition)?
[Moto G4 Plus Guides, News, & Discussion] moonlightdrive:
Unfortunately i did the backup after installing EX, i thought that the OTA zip package contained the boot.img file.

Edit: from what i see in the updater-script into the OTA zip package, there is no a new entire kernel, just a patch:
[Moto G4 Plus Guides, News, & Discussion] echo92:
Ahh, well that explains why the update was 56 MB in size, a collection of patches is much smaller than a new file (and incidentally why the OTA is so picky).

Okay, so a few disclaimers 1st:

This was pulled from a TWRP backup which was tested and I successfully re-flashed the stock kernel with the TWRP backup. However, I don't know if the kernel will flash on your device, or if zipping the file in Amaze file explorer did anything (shouldn't have done). Ensure you have a full backup before trying this!

I've uploaded my NPJS25.93-14-8 stock kernel to here: https://drive.google.com/drive/folders/0B-GUyOfb8OgzR1VrQ1NHWDVmWE0 It's a zip called NPJS25.93-14-8_boot.zip.

If you extract it (the folder within the zip didn't have a folder name in 7-zip file manager), you should get a folder called '2017-07-08--stock boot'. Inside should be the 'boot.emmc.win' - the stock kernel - and the 'boot.emmc.win.md5', its accompanying checksum.

Name: boot.emmc.win

Filesize: 16 MB (16,384 KB)

md5 checksum:7400fe8e42d5f0c790fa87a759a59ed7

There's a couple of ways to flash this as I understand it (note, I've not tried these, but similar threads have worked):

1) Copy the 2017-07-08--stock boot folder to your TWRP backups directory. My directory was located on /storage/emulated/0/TWRP/BACKUPS/<device serial number>. In that directory you should see your other backups, copy the folder to the same level.

2)Reboot to TWRP and back up if needed.

2a)Unroot if needed.

3)Go to the TWRP main menu, and tap 'Restore'.

4)Navigate to your TWRP backup directory and select the 2017-07-08--stock boot folder

5)TWRP should detect this as a boot backup.

6)Flash as directed.

Alternatively, I've read that you can flash the boot.emmc.win in fastboot (though double check this):

After unrooting in TWRP, boot your device in the bootloader

Connect your device to your computer

Copy the 'boot.emmc.win' to your adb/fastboot folder

Verify your computer is communicating with your device with 'fastboot devices' (without the quotes).

If you get a response with the serial number of your device, then type 'fastboot flash boot boot.emmc.win' (without quotes) - this should then flash the boot image to your device.

If anyone wants to, they can take this stock boot and make a flashable zip of it for others to more easily use.

Any issues, reboot to TWRP and re-flash your backup. Neither of these steps should affect your data or your device whatsoever but - as always with anything affecting your system - be prepared and have backups. Good luck.
[Moto G4 Plus Guides, News, & Discussion] moonlightdrive:
Worked perfectly, thank you very much for taking the job of upload it and explain the installation ways so clearly.:):good:
[Moto G4 Plus Guides, News, & Discussion] doncarnito66:
Guys please someone can help? Can one downgrade to marshmellow from nougat even if installed elemental kernel?? or do i have to remove elemental also? any guides for that? thanks!
[Moto G4 Plus Guides, News, & Discussion] echo92:
A flash of the fastboot stock ROM will replace TWRP and ElementalX kernel when you've flashed, so you won't have to worry about having a custom kernel. Which ROM are you on at the moment?

Bear in mind that if you're on the June 2017 stock ROM (build NPJS25.93-14-8), or were previously (your bootloader should be B1:06), do not downgrade your device's firmware from Nougat to Marshmallow. Attempts to do so run the high risk of hard bricking your device once you flash or when you accept an OTA, and it's a very expensive repair...

If you simply wish to revert back to completely stock (up to you if you choose to lock your bootloader or not), look at flashing this June 2017 stock Nougat ROM: https://xdaforums.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You'll want to use the OEM flash script if you wish to simply re-flash the stock ROM, and be aware that the flash may wipe your data. You may be able to flash the below commands and maintain your data, but be prepared to factory reset should your device become unstable.

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] doncarnito66:
Great explain! Thank you!! I am NPJ25.93-14. Security patch Dec 1, 2016. I have 7.0 nougat. I want to go back to last android 6 so can install Xposed (unless you know xpose work with nougat 7??). I dont care about losing data , is fine.
[Moto G4 Plus Guides, News, & Discussion] doncarnito66:
safe to dowgrade?

So can someone tell if can dowgrade from Nougat 7.0 with NPJ25.93-14. Security patch Dec 1, 2016 to Marshmellow 6 with this guide? I dont wanna brick phone!! Thanks
[Moto G4 Plus Guides, News, & Discussion] echo92:
There are efforts to get an unofficial version of xposed running on Nougat - it's so far highly experimental and appears to be working for some users, to a variable degree. For other users, it doesn't seem to be working. If you really want to try, back up your device in TWRP before you flash this unofficial build. You'll want the arm sdk24 build from here https://xdaforums.com/xposed/xposed-android-nougat-sdk-25-arm64-t3639221

If that doesn't work, or you're looking for a more stable build of xposed, downgrading from your build to MM 6.0.1 should be okay.

1)You may wish to not flash GPT or bootloader when flashing the MM build - if so, flash only these commands:

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 erase userdata
fastboot erase customize (optional: will erase any customizations if ordered through motomaker)
fastboot erase clogo (optional: will erase the custom boot logo if ordered through motomaker)
fastboot reboot

2) If you are wishing to downgrade to MM, please ensure you have the right build and firmware for your device and territory. There are multiple versions for different territories, and flashing the wrong firmware may cause you to lose IMEI or modem issues. If you're not sure which MM version you need, let us know your device and your territory (either from the baseband or your software channel) and we'll try to point you to the right firmware.
[Moto G4 Plus Guides, News, & Discussion] oMss:
Hi, [MENTION=7970352]echo92[/MENTION], hopefully you can help me, i'm on 7.1.2 (Resurrection Remix, security patch October 29th 2017). I want to have stock rom, can you point me to the rom that i need to flash and if its safe to do it? I'm from Mexico and the phone is a Moto G4 xt1621. Thanks in advance.
[Moto G4 Plus Guides, News, & Discussion] smdv123:
I'm currently in nougat stock rom xt1643 build npj25.93-14-10

Can i downgrade to marshmallow...
[Moto G4 Plus Guides, News, & Discussion] Iurop:
How to update by ota without brick the phone

High, yesterday y downgrade my Moto g4 xt1625 from Nougat resurrection remix to MM stock rom and everything was fine. Then I download and try to install ota update to Nougat but during the installation the phone turn off. I do the process to blank flash and then install via fastboot a stock Nougat rom, so Na the phone it's OK. But how I can accept ota update, especially now that seem that Oreo will come out for Moto g4 or even perviously update without brick it again? I want to stay with stock rom but install the update.

If you can help me will be very appreciated.

Thanks
[Moto G4 Plus Guides, News, & Discussion] echo92:
If you were previously on stock Nougat (not a custom Nougat ROM), using OTA updates when you downgraded to Marshmallow would likely hard brick your device as you found. This is likely due to your bootloader being a different version to the OTA update. If you wanted to use OTA updates, you must update your device fully to the same firmware version. No mixing and matching. I don't know which update you had or what bootloader version you have, though the latest firmware update for the XT 1625 I'm aware of is NPJS25.93-14.7-8 (April 2018 security patch) https://mirrors.lolinet.com/firmware/moto/athene/official/RETAIL/

So either fully flash the above firmware to get your device fully to the April 2018 security patch for US devices (your bootloader, in fastboot mode, should report it is version B1:07), then you may be okay for OTA updates. Alternatively, forget about updates and wait for the Oreo fastboot stock ROM to be leaked, then flash that. Of course, if you downgrade from either stock ROM, especially Oreo, do not use OTA updates. The currently available blank flash may not work on devices updated to stock Oreo.
[Moto G4 Plus Guides, News, & Discussion] Iurop:
High, thanks to answer me. What do you explain it's pretty clear, thanks.

Now I have the NPJS25.93-14-18 (it is later or before the one you mentioned?) with April 2018 security patch. Bootloader in fastboot mode show B1:07. So did you think I'm good with that to except update or I need to install the firmware you share?
[Moto G4 Plus Guides, News, & Discussion] echo92:
NPJS25.93-14-18 is the same retail firmware as the one mentioned above, just that this retail NPJS25-93-14.7-8 is specific to XT1625/XT1644 devices as I understand (i.e. US devices, typically on the retus software channel). Having the NPJS25.93-14-18 firmware on your device may mean you have no issues, but OTA updates may not work as you've got a different firmware to that expected from your software channel. You may have to wait for the Oreo fastboot ROM to update or attempt to cross flash the firmware mentioned above. Is your software channel retus?
[Moto G4 Plus Guides, News, & Discussion] Iurop:
It is this the info you ask, baseband version M8952_70030.25.03.62.0 2R athene_retusa_cust, or where I find the software channel info?
[Moto G4 Plus Guides, News, & Discussion] echo92:
That's helpful, as that implies you have a retus device (retail US) - I imagine if you scroll up from the baseband, you'll also find software channel mentioned. What entry is listed? On my device the software channel is listed as retgb (retail UK). You can check the screenshot too for what to look for

Up to you if you wish to leave it alone and wait for the Oreo stock ROM to leak, or try to cross flash.
[Moto G4 Plus Guides, News, & Discussion] Iurop:
Found it, yes software channel it say retus.

Thanks for your advice, I will download the file you post. Then I will wait until the Oreo comes out(if actually do) and then decide which way to update to the new O system.

Thanks a lot for answer me it was very helpful.
[Moto G4 Plus Guides, News, & Discussion] Ranveer_2422:
Downgrade

Can I downgrade from stock Oreo to mm phone is very laggy now and battery is draining too fast while sleep
[Moto G4 Plus Guides, News, & Discussion] emkorial:
What does "5 :: Use This Command In mfastboot-v2 and Ignore gpt.bin error" mean?

Can we get instructions written by someone more fluent in English?
[Moto G4 Plus Guides, News, & Discussion] emkorial:
Thank you! I got the impression English was not the OP's native language.