yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus Guides, News, & Discussion] sujeet_kumar:
After flashing the Stock ROM (April) and TWRP v3.2.1 with busy_box_arm2, I flashed elementalX kernel v2.01 till that everything working fine but when I installed Magisk 16.0 from TWRP my phone didn't boot up. I have tried 3 to 4 times but the problem came after installing Magisk 16.0.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, can you try flashing magisk after uninstalling busy box? I'm wondering if busy box is affecting the flash.
[Moto G4 Plus Guides, News, & Discussion] sujeet_kumar:
Yes, it's busy box is doing problem.
[Moto G4 Plus Guides, News, & Discussion] damian3581:
I receive security patch because?
[Moto G4 Plus Guides, News, & Discussion] echo92:
What security patch build have you received, can you post a screenshot of the build?
[Moto G4 Plus Guides, News, & Discussion] damian3581:
February 1st
[Moto G4 Plus Guides, News, & Discussion] vinkho:
Hi. I'm currently on NPJ25.93-10 (I know, I've been living under a rock), can I flash this directly? Or do I need to flash the Dec patch first to update my modem? Tried searching the thread using my build number as keyword and nothing came up, so forgive me if this is obvious it has been answered.

Thanks
[Moto G4 Plus Guides, News, & Discussion] echo92:
Can I just verify the build you have, is it NPJS25.93-14-10 (the September 2017 security patch firmware)? I don't recall a NPJ25.93-10 firmware otherwise.

If it is the NPJS25.93-14-10 firmware, then you should be able to flash this. If you wish to try to keep your data, then ignore the OEM lock commands and the fastboot erase userdata command.

---------- Post added at 05:05 AM ---------- Previous post was at 05:03 AM ----------

Hmm, there have been reports of some users getting the Feb 2018 patch even when updated to the April 2018 patch. I'd suggest to ignore this update or if you're rooted, you could try to disable the Motorola updater app.
[Moto G4 Plus Guides, News, & Discussion] vinkho:
Thank you for the quick response ☺️ yes you're right, it's NPJS25.93-14-10… the September patch. No wonder searching with that keyword didn't work. Thanks a lot for the help!
[Moto G4 Plus Guides, News, & Discussion] ldeveraux:
Hey all!

I'm on stock Nougat, latest April 2018 update, latest EX Kernel on 'conservative', latest busybox, Magisk rooted, Xposed latest version. I feel that ever since installing the update, my phone has run hotter and has restarted at least once a day. I play PAD (don't judge me!) which gets the device up to ~109F and it will often soft reboot. This never happened with the February 2018 update. Rebooting to TWRP and wiping caches doesn't help. Is there something I can do to prevent this happening? Is there a battery saver EX kernel setting, or a general Android setting? This is killing me!
[Moto G4 Plus Guides, News, & Discussion] strongst:
Athene isn't a gaming maschine you know, but maybe that can help you https://www.xda-developers.com/improve-fps-pubg-android-games-gfxtool/ otherwise kernel governor conservative isn't a good gaming decision too.
[Moto G4 Plus Guides, News, & Discussion] ldeveraux:
OK, I've changed Kernel back to interactive, and I'll try out GFX Tool. Maybe it will do something?
[Moto G4 Plus Guides, News, & Discussion] strongst:
Just read the description, then you know what it can do :good:
[Moto G4 Plus Guides, News, & Discussion] ldeveraux:
The description doesn't explain anything other than what settings to use. No clue how this is implemented. Regardless, seems to have a positive effect on my battery life and phone's not restarting. Looks like I'll stick with GFX Tools!
[Moto G4 Plus Guides, News, & Discussion] strongst:
I read it for you:
[Moto G4 Plus Guides, News, & Discussion] ldeveraux:
Yeah, and it was specifically for PUBG. If you want to apply to other games, which I do, they suggest using Screen Shift. And they also tell you to not bother using v0.7 because it requires root. They don't suggest to use v0.7 if you actually have root for some reason. It's just confusing is all...:confused:
[Moto G4 Plus Guides, News, & Discussion] flroots:
I'm currently on NPJS25.93-14.7-5 and have downloaded update: NPJS25.93-14.7-8 for my US-variant XT1644. I am currently rooted. Where do I find the stock firmware that I should install once I'm unrooted prior to installing OTA? There doesn't seem to be any info at the link you provided. Thanks for your help.

Anyone?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, I'm having trouble finding that build unfortunately - Android File Host and the Motorola Firmware Team don't appear to have uploaded the build, and lolinet and firmware.mirror don't seem to have captured the build either.

If you've got a TWRP backup made before you rooted, then you may wish to try the backup. Else, you could freeze the OTA updater to stop it repeatedly prompting you or wait to see if someone can leak/upload the NPJS25.93-14.7-8 firmware.
[Moto G4 Plus Guides, News, & Discussion] flroots:
Thanks for the reply. How do I freeze the OTA update? I have Titanium Backup which can freeze an app, but I din't know what app to select.

I do have this firmware:

ATHENE_NPJ25.93-14.7_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

Maybe the only options is to unroot, install the above firmware, then process all the subsequent OTAs?
[Moto G4 Plus Guides, News, & Discussion] echo92:
You could have a look at this thread for disabling the OTA updater: https://xdaforums.com/moto-g4-plus/help/how-disable-notification-update-t3459587

As for that firmware, should be okay reverting back as you've done the procedure before https://xdaforums.com/showpost.php?p=76137051&postcount=149 https://xdaforums.com/showpost.php?p=76137349&postcount=151 You should then be able to get OTA updates up to the NPJS25.93-14.7-8 patch. However, when you flash the NPJS25.93-14.7-8 OTA update, I don't know if that procedure will apply (in that I do not know if it'll be safe to downgrade again to NPJ25.93-14.7 again after formally using the OTA.

I imagine the plan for updating would be as you described, yes (unless there happens to be a leak of the latest US firmware).
[Moto G4 Plus Guides, News, & Discussion] flroots:
Thanks a lot
[Moto G4 Plus Guides, News, & Discussion] coolmanas2010:
Hello, I'm using Moto G4 plus, xt1643, India.. And I'm stuck on Bootloader.. Phone doesn't boot.. Only turns on in Bootloader when connected to PC.

I tried flashing stock rom.. But always returns with error "failed to validate boot image" , I don't know which stock rom to flash.. Tried NPJS25. 93-14-18, NPJS25. 93-14-8 and Athene_MPJ24.139-63..

None of them worked.. Still stuck on Bootloader..

Every time I tried flashing stock rom ended with error Failed (remote failure)..

Please if anything can unbrick my phone?

Thanks in advance..
[Moto G4 Plus Guides, News, & Discussion] ____Mdd:
I would recommend you to post result of cmd screen here, (just copy whole text and make notepad txt and upload here.)

Also, upload result of command "fastboot getvar all" (rdmove imei and serial numbers from result and post here).

And, why this happened?

Did you try to flash something? Bootloader locked/unlocked ?

Any other useful information ?

MOST IMPORTANT: do not try to flash older firmware, just flash latest April's patch, downloaded from first post.
[Moto G4 Plus Guides, News, & Discussion] ebol94:
I've been using this ROM for several days now but today I tried to root it using Magisk 16. Now it won't even boot. Just bootloader mode and TWRP.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Have you flashed a custom kernel before rooting? If you try to root on the stock Motorola kernel, you will have boot issues.

Try to flash ElementalX through TWRP, v2.01 is working well on the April 2018 stock ROM. https://xdaforums.com/moto-g4-plus/development/kernel-elementalx-g4-0-01-t3424836
[Moto G4 Plus Guides, News, & Discussion] charuvilapauljohn:
missing imei and finger print

I have done this method...its all successful...but the imei and finger print is missing....what to do plzz help meee....
[Moto G4 Plus Guides, News, & Discussion] lemonlimejones:
I am currently on December 2017 patch. Am I okay to just flash this file in ADB because the stock firmware I found for my device on Motorola website was MPJ something so a pretty old firmware. Was hoping I can flash this file as a security update without issue
[Moto G4 Plus Guides, News, & Discussion] echo92:
You should be able to flash this via ADB (strictly speaking, fastboot). If you wish to update and try to keep your data, then you could use the following fastboot commands. However, as with any flash affecting your system, please ensure you have a backup (or at least have all your personal files backed up) in case you have to factory reset your device.

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

These commands omit the locking commands and the fastboot erase user data commands, and should formally update your device from Dec 2017 to the April 2018 security patch firmware. I understand Canadian users have been able to flash this firmware without issue, I hope the same goes for yourself.
[Moto G4 Plus Guides, News, & Discussion] lemonlimejones:
Thanks for the quick response. I'm in Canada so hopefully no issues there. I should have mentioned, I have flashed elementalx kernel. Will these commands with this zip restore my stock kernel/put everything back to stock?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Yes, those commands will restore stock recovery, stock kernel and unroot if you had root. However, after you've updated, you should be able to boot into TWRP or flash TWRP, then re-flash ElementalX and root. If the TWRP is still in your ADB folder and ElementalX is still on your device, it should take 5-10 minutes to get your custom kernel back on. I had ElementalX on this stock ROM with magisk 16 (flashed through shreps' TWRP) and it was a stable root.
[Moto G4 Plus Guides, News, & Discussion] lemonlimejones:
So now I've run into a problem. When I try the fastboot flash boot boot.img command it tells me image signed with key bad key and now I am unable to boot my phone. Any ideas?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Image signed with bad key for boot and recovery are normal messages if you've got an unlocked bootloader if I recall.

If you've got a black screen after the fastboot reboot commands, try holding down the power button for 30 sec to 1 minute. That should trigger a hard reboot and see if your device boots normally.
[Moto G4 Plus Guides, News, & Discussion] lemonlimejones:
Thanks for your quick help. Turns out I used the second users commands which I think left some important ones out in my case. I used the original commands from the OP minus locking the bootloader and erasing data. Everything seems to be working now and I am on April patch. Thanks!!
[Moto G4 Plus Guides, News, & Discussion] Pranav:
Just a general question: Can we flash this firmware on the moto g 4 plus which does not have unlocked bootloader?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Yes, given this is signed firmware for retail EU/UK/India/Brazil devices (I've used the NPJS25.93-14-18 firmware to re-lock the bootloader on my XT1642, retgb). However, this firmware will only work on devices with locked bootloaders that have the April 2018 security patch firmware or older (as of writing this). If your device has subsequently newer firmware than NPJS25.93-14-18, you must find and flash newer firmware - this April 2018 security patch firmware will not work on devices flashed with newer stock firmware.

If you want to try to save your data, try these following fastboot commands, but ensure you have a copy of your personal data and files on internal storage, kept off your device, in case you need to factory reset.

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] Pranav:
Thanks:o, just asked for future doubts in general
[Moto G4 Plus Guides, News, & Discussion] juanml:
Hi! I'm wondering if that method worked for you.

Thanks!
[Moto G4 Plus Guides, News, & Discussion] flroots:
I haven't attempted installing OTA yet. I did freeze the update app called "Motorola Update Services" using Titanium Backup so at least the messages no longer pester me.
[Moto G4 Plus Guides, News, & Discussion] CMKdaGreatest:
When I copy paste this in Power shell, I'm stuck at the "waiting for any device". Any fixes??
[Moto G4 Plus Guides, News, & Discussion] strongst:
That's most likely an issue with your driver/device connection. All commands are working flawlessly also on powershell(tried multiple times). Check your firewall status and if you have the right drivers.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Did you have any luck with the suggestion from your previous post on this issue? https://xdaforums.com/showpost.php?p=76394217&postcount=217

Check that you're using the original USB cable or a high quality USB data cable as well.
[Moto G4 Plus Guides, News, & Discussion] strongst:
Haha, thanks [MENTION=7970352]echo92[/MENTION], same question, same answer :svetius:
[Moto G4 Plus Guides, News, & Discussion] acetheapurva:
Can i get back to stock root it , restore my app data using titanium, unroot it go back to original recovery, and recieve OTA update?

And do we need to lock bootloader for getting OTA updates
[Moto G4 Plus Guides, News, & Discussion] strongst:
Yeah that's possible, you don't need a locked bootloader for receiving ota, but a stock recovery.

But there's always a risk, especially with restored apps, keep that in mind, no 100% guarantee.
[Moto G4 Plus Guides, News, & Discussion] autoradio78:
Any news about june/july security patch or Oreo?
[Moto G4 Plus Guides, News, & Discussion] strongst:
No
[Moto G4 Plus Guides, News, & Discussion] WarFusion:
Hello I have flashed RR-O-v6.1.0-20180612-athene-ARM64-Official.zip and even have 64bit recovery .

Can I use the bat file and revert back to this official stock and making the bootloader locked???

I don't mind losing all data :)
[Moto G4 Plus Guides, News, & Discussion] echo92:
You should be able to, since the locking script (or the locking commands) locks, then flashes the images from the extracted fastboot image, before completing the lock. I've performed the re-locking of the bootloader on my XT1642, with NPJS25.93-14-18, and it's running well with a re-locked bootloader.

Be aware that you may need to have OEM unlocking enabled, else the initial OEM lock command may not lock. OEM unlocking is found in Settings>Developer Options, I do not know if this is present on custom ROMs. You could try to lock whilst still on RR, but if you cannot lock, then you may have to flash the stock ROM without locking commands, then enable OEM unlocking and then attempt to re-lock again. The two OEM lock begin commands will erase your device including your internal storage, so ensure you have backups/cloud saves or files kept off your device. Also, if you have a SD card adopted as internal storage, be sure to back up the SD card; wiping your device may erase the encryption key for the SD card, and you may have to format the SD card. If your SD card is acting as portable, ejectable storage, then you should be okay and your SD card should still have its data after the flash (my SD card, as portable storage, was still working after locking, but I don't know about how SD cards like switching to 32 bit from 64 bit), but I'd still suggest removing the SD card until you complete the full flash.

Also, you do not need to re-lock your bootloader to receive OTA updates, so long as you've flashed the correct firmware for your region (NPJS25.93-14-18 appears to be deployed in EU/UK, India and Brazil regions. US retail devices have a different build and I'm not sure about other regions). If you want to revert back to stock but still keep your bootloader unlocked for rooting purposes, then you can omit the OEM lock commands.

Finally, re-locking your bootloader will not restore your warranty, though if you're selling your device then the warranty seems to be non-transferable anyway.
[Moto G4 Plus Guides, News, & Discussion] WarFusion:
My moto g4 plus have already completed one year so don't care about warrenty ... Just need it lock due to service center not repairing due to bootloader unlocked as well as rooted . Basically wanna get something repaired so fooling them to making them believe that this mobile has just lost the warrenty because one year got over !!!. If I can unroot as well as lock boot loader as well as remove the bootloader unlock message then let me know if this bat file can fix that!!!
[Moto G4 Plus Guides, News, & Discussion] niyas90:
Select flash and lock bat file. It will re lock the bootloader. Which means no more unlocked warning message .. You may caught, only if they check the status online.
[Moto G4 Plus Guides, News, & Discussion] echo92:
In addition to niyas90's post, you may have to provide paperwork to show your warranty status, or they may check your IMEI online with Motorola (which may show the warranty as being void). However, as mentioned, they may or may not check this, depending on the service centre and the nature of the fault.

Good luck with the repair regardless.
[Moto G4 Plus Guides, News, & Discussion] Jasman singh:
Can I just flash the stock rom on my Moto g4 plus with twrp?

So I looked at the method to have a stock room but I want to just flash it and can I just do so download the zip and flash it??? Also if I do follow want is written will I end up with a locked bootloader?? I don't want that

So do answer if you know and thanks.
[Moto G4 Plus Guides, News, & Discussion] strongst:
No, there's no zip file as a whole. You need to follow the instructions.

Your other question is clearly answered in the flashing instructions in the first post. ;) please take some time and read it(again):svetius:
[Moto G4 Plus Guides, News, & Discussion] Jasman singh:
Can I just flash the stock rom on my Moto g4 plus with twrp?

So I looked at the method to have a stock room but I want to just flash it and can I just do so download the zip and flash it??? Also if I do follow want is written will I end up with a locked bootloader?? I don't want that

So do answer if you know and thanks.:D:good:
[Moto G4 Plus Guides, News, & Discussion] echo92:
You cannot flash a stock ROM fully in TWRP, you must flash these stock ROMs via fastboot/bootloader mode, which requires a computer. Furthermore, flashing these stock ROMs will remove TWRP, root, etc. The flash may also erase all data (especially if you're flashing from a custom ROM), so make sure you have Titanium backup or a TWRP backup kept off your device. Be warned also that if you have an SD card as adopted storage, wiping your data may cause you to lose your SD card encryption key, back up your SD card if needed.

If you want a stock ROM flashable, have a look at Revivor https://xdaforums.com/moto-g4-plus/development/rom-npjs25-93-14-4-deodexed-debloated-t3587180 or JX's Mea Maxima EST flashables ( 32 bit) https://xdaforums.com/moto-g4-plus/development/rom-modified-stock-jx-s-mea-maxima-est-t3729726

The general procedure is set out in the first post; download the stock ROM zip, install ADB/fastboot to your computer (if you've flashed TWRP you've likely already have ADB). Extract the stock ROM to your ADB folder.

Connect your device to your computer via USB. Check you have driver signature enforcement disabled if you're running Windows 10 or 8.1.

Boot your device to the bootloader and perform the checks as mentioned using the ADB/fastboot terminal.

To flash without locking your bootloader, enter the following fastboot flashing commands into your ADB/fastboot terminal in sequence. You could also edit a flashing script to do the same:

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 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

As mentioned in the first post, this omits the OEM lock commands which would otherwise lock your bootloader.
[Moto G4 Plus Guides, News, & Discussion] shilagh:
Hi xdains, hope all of you are having a great time

Coming to the case where I'm here for

Is anybody here having a twrp backup (flashable zip) of latest firmware(april 2018) of moto g4 plus (Indian variant) .i suddenly wiped out the system without taking backup and I don't want to flash the whole firmware because I'm already in latest bootloader

Can someone help me out please

Thank you

Have a nice day bros
[Moto G4 Plus Guides, News, & Discussion] corlatemanuel:
From my knowledge TWRP can't backup all of the system files for the Stock ROM, leading to some problems. Anyways, it's a much better option to just flash the firmware.
[Moto G4 Plus Guides, News, & Discussion] shilagh:
Corlatemanuel it's not true as per knowledge because [MENTION=5398769]rajatgupta[/MENTION] had provided a flashable backup in his reviver os (rom) thread. But that zip is too old

Correct me if I'm wrong