yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus Guides, News, & Discussion] felipemorais_:
So, I was running Unofficial LOS 15 but decided to go back to stock. I used the relock bootloader commands as I did many times before but this time, even tough the stock rom was flashed, the bootloader remained unlock so I still see the unlocked bootloader warning during boot.

My device is the retail brazilian Moto G4 Plus. This is the first time I tried to go back to stock directly from Oreo (other times was with LOS14.1)

-----------------------------------------------------------------------------------------------------------------------------------------------

edit: NEVERMIND, problem solved
[Moto G4 Plus Guides, News, & Discussion] ganeshkmr21:
[MENTION=6324159]rajatgupta1998[/MENTION] Could you please test and verify this firmware.? Found it in one of the forums.

https://drive.google.com/open?id=1GnzSxt4N0me2X749FAJUBFxshkKbCBTa
[Moto G4 Plus Guides, News, & Discussion] gutosilva:
Can you share the forum's link?
[Moto G4 Plus Guides, News, & Discussion] ganeshkmr21:
http://forum.gsmdevelopers.com/leno...o-series-build-firmware-download-request.html

The file there was password protected, I re-compressed and uploaded it without Pw.
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
I think, this is exactly the same which was posted in this thread a while ago.
[Moto G4 Plus Guides, News, & Discussion] gutosilva:
So... Does it really work?
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
I'm using it since a while without real problems, beside that it fails to pass safetynet with Magisk by default. I'm using a Magisk mod named "MagiskHide Props Config" to solve this problem. Never tried to wipe data before flashing the rom, maybe this could solve the problem aswell.
[Moto G4 Plus Guides, News, & Discussion] gutosilva:
Can you block the boorloader after flash this ROM?
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
Haven't tested myself, but...
[Moto G4 Plus Guides, News, & Discussion] corlatemanuel:
Yes, done it yesterday.
[Moto G4 Plus Guides, News, & Discussion] GCSortes:
I don't know why but after flashing Magisk my phone doesn't even turn on. To do so I have to go to TWRP, flash Magisk_uninstaller and then it boots. Does anyone have a solution for that?

--EDIT--

Ignore me, I forgot that I have to flash ElementalX Kernel before rooting xD
[Moto G4 Plus Guides, News, & Discussion] JamieGoldsmith:
cant download it.Why
[Moto G4 Plus Guides, News, & Discussion] strongst:
Please check your internet connection. Android file host is online.
[Moto G4 Plus Guides, News, & Discussion] autoradio78:
So, after two months none tested authenticity, from Motorola, of full stock NPJS25.93-14-15???
[Moto G4 Plus Guides, News, & Discussion] Hackers Network:
Flash Supersu zip file not magisk brother
[Moto G4 Plus Guides, News, & Discussion] echo92:
Both should work, but as GCSortes mentioned, on stock Nougat you must flash a custom kernel before rooting.

As an aside, magisk is currently updated more frequently than SuperSU, of course, it's up to you which one you choose to use.
[Moto G4 Plus Guides, News, & Discussion] StAr1oRd:
can u update it to feb security patch??

i need files of stock rom with feb security patch!
[Moto G4 Plus Guides, News, & Discussion] strongst:
Someone posted this here, use at your own risk...

https://xdaforums.com/moto-g4-plus/how-to/ota-february-2018-npjs25-93-14-15-t3770286/post76229647
[Moto G4 Plus Guides, News, & Discussion] wfantasma:
Authentic or not, all of us who installed that firmware have had successfull flash and working devices without issues :) so, you can try it with no fear
[Moto G4 Plus Guides, News, & Discussion] Punraz_:
deleted
[Moto G4 Plus Guides, News, & Discussion] admonx:
It says: security patch downgrade and doesn't flash gpt.bin and others too
[Moto G4 Plus Guides, News, & Discussion] echo92:
What firmware are you attempting to flash? Do you or did you have the NPJS25.93-14-15 stock firmware previously on your device?
[Moto G4 Plus Guides, News, & Discussion] beltish:
I'm having the same problem as well. I tried both the 14-13 firmware found in this thread as well as 14-15 firmware. The 14-15 got rid of the security warning but the commands all still gave me errors along the lines of this:

(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:partition: not found
target reported max download size of 536870912 bytes
sending 'partition' (32 KB)...
OKAY [ 0.016s]
writing 'partition'...
(bootloader) Flashing primary GPT image...
(bootloader) Failed to write primary GPT.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Thanks, can you describe what happened to your device before this happened? What device do you have?
[Moto G4 Plus Guides, News, & Discussion] beltish:
I have a Moto G4 XT1644. My device's screen froze and I had to do a hard reset on it. It worked fine for a day but froze again only this time I could not restart it and it would only get into fastboot. From here I attempted to factory reset which only gave me an error. That's when I decided to try following the steps here.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Ouch, what error did you get when you performed the factory reset? What errors do you get when you flash the rest of the stock ROM?

You could try flashing the NPJ25.93-14.7 stock ROM (as that's the correct ROM for US devices like the XT1644 - though flashing NPJS25.93-14-13/NPJS25.93-14-15 does appear to work on US devices). I'd try another computer and ensure you're using the original USB cable. https://androidfilehost.com/?fid=817906626617945295 for the Sept 2017 stock ROM for US devices.

However, if the flash doesn't work, then coupled with the symptoms you mentioned we may have to begin considering hardware failure. Try the flash first though.
[Moto G4 Plus Guides, News, & Discussion] beltish:
All the errors I'm getting are the same whether I perform a flash or a factory reset:

Fastboot Reason: Failed to initialize partition table

Error: No bootimage found. Skip to fastboot

I can't exactly recall what the errors were when the problem first began but I think they were the same.

I just tried the above ROM and that produced the same errors. The first command fastboot flash partition gpt.bin looked like it was gonna work but this is what I got

(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:partition: not found
target reported max download size of 536870912 bytes
sending 'partition' (32 KB)...
OKAY [ 0.016s]
writing 'partition'...
(bootloader) Security version downgrade

(bootloader) Image primary_gpt failed validation

(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.141s
[Moto G4 Plus Guides, News, & Discussion] pastorbob62:
Try the rest of the flash and see what results you get. I had those same errors on gpt.bin but everything else flashed without error and all works great.
[Moto G4 Plus Guides, News, & Discussion] eta82:
Successfully flashed on XT1622 EU :good:

ThanX ! ! !
[Moto G4 Plus Guides, News, & Discussion] ParthPQ:
[IMGhttps://drive.google.com/open?id=1YolOOcJuWYpRtfyHpSv5nr2-GXWtDM3c[/IMG]

i get this error help....
[Moto G4 Plus Guides, News, & Discussion] andrescm:
Where's exactly the error?. I left my flashing log at home and can't compare right now. Does it get stuck at that point or something?
[Moto G4 Plus Guides, News, & Discussion] piyushmanolkar:
Life saver

You sir are a lifesaver the android file host is bullsh*t it stopped my download 8 times. You saved my life by giving the mega link.

Thank you.
[Moto G4 Plus Guides, News, & Discussion] minhajul6322:
when will the official February update release here...still waiting???
[Moto G4 Plus Guides, News, & Discussion] echo92:
If you're referring to the NPJS25.93-14-15 fastboot ROM, there's already been a couple of links to it earlier:

https://xdaforums.com/showpost.php?p=76250128&postcount=753

I see that rajatgupta1998 has uploaded the firmware to AFH as well: https://androidfilehost.com/?fid=818070582850507483

Of course, the onus, to verify the firmware that you flash onto your device, lies with yourself.
[Moto G4 Plus Guides, News, & Discussion] Love Dhir:
Download the latest feb security patch frimwareof your device it would work
[Moto G4 Plus Guides, News, & Discussion] jd_marti78:
I need your help. I installed the December firmware and then I received the February OTA. Now I am trying to install the TWRP recovery but I have not succeeded. I'm doing it for fastboot and I get this error:

sending 'recovery' (12644 KB) ...

OKAY [0.440s]

writing 'recovery' ...

(bootloader) Image recovery failed validation

(bootloader) Preflash validation failed

FAILED (remote failure)

finished Total time: 0.487s

I'm using the twrp-3.2.1-0-athene Official

I need to have it to root the Rom, and so fix the burnt screen :(

edit: I already resolved it. without realizing I have blocked the bootloader XD
[Moto G4 Plus Guides, News, & Discussion] Love Dhir:
Plz update it to latest feb security patch ??
[Moto G4 Plus Guides, News, & Discussion] strongst:
Please read the page before /search.
[Moto G4 Plus Guides, News, & Discussion] minhajul6322:
I have rooted my phone and I have dec 1 security patch but I really don't want to stay in this condition and I want my phone be as it was before i.e, as you get a new handset and receive updates via OTA..As I said I want the ROM as it was originally before..I then can install OTA updates...

Can anyone of u please help me how can I do it...it would be really helpful if you could help...thanks a lot...
[Moto G4 Plus Guides, News, & Discussion] strongst:
Just follow all instructions in op. Then your phone is FULLY stock including locked bootloader, no root, stock recovery.
[Moto G4 Plus Guides, News, & Discussion] minhajul6322:
What is op and where is it??? Please explain how to do it..
[Moto G4 Plus Guides, News, & Discussion] strongst:
The op is the opening post in this case.. So the first post with the detailed instructions how to do something, in this case how to flash the rom you're looking for ;)
[Moto G4 Plus Guides, News, & Discussion] Naveen.nn:
my device cant relocking...

any help??
[Moto G4 Plus Guides, News, & Discussion] strongst:
Do you have disabled oem unlock in developer options of your phone?
[Moto G4 Plus Guides, News, & Discussion] cooldeepak:
Hi

I am currently using Dec Build NPJS25.93-14-13 with unlocked bootloader and Custom kernel can i use same command line in OP to upgrade NPJS25.93-14-15 ?
[Moto G4 Plus Guides, News, & Discussion] strongst:
Yes you can but omit the lines with "fastboot oem..." otherwise your bootloader will be locked again. Your internal storage and data will be wiped too unless you omit "fastboot erase..." but I recommend to make a clean installation :good:
[Moto G4 Plus Guides, News, & Discussion] cuerojr:
i'm getting the following error. my phone is xt1641 latam dsds cust

C:\adb>fastboot flash partition gpt.bin

target reported max download size of 536870912 bytes

sending 'partition' (32 KB)...

OKAY [ -0.000s]

writing 'partition'...

(bootloader) Security version downgrade

(bootloader) Image primary_gpt failed validation

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.047s
[Moto G4 Plus Guides, News, & Discussion] echo92:
I think the closest ROM we have to a TWRP backup of the March 2017 update is the Revivor OS https://xdaforums.com/moto-g4-plus/development/rom-npjs25-93-14-4-deodexed-debloated-t3587180

Though this ROM is based on the March update and is flashable in TWRP, be aware the ROM won't update the rest of your system (e.g the bootloader, modem) - only the fastboot ROM, which strongst has mentioned, can flash those parts of your system.

Also, with Revivor, you won't be able to install OTA updates since this is a tweaked stock ROM.
[Moto G4 Plus Guides, News, & Discussion] gutosilva:
Hey man, this rom worked fine? What commands did you use? I'm brazilian too.
[Moto G4 Plus Guides, News, & Discussion] gchero18:
Gnaro18

muchas gracias por el aporte me sirvió de mucho en mi XT1641, todo funciona perfecto..
[Moto G4 Plus Guides, News, & Discussion] TheeuS:
Yes. It worked fine. I used the commands described on the first post.
[Moto G4 Plus Guides, News, & Discussion] vij@y:
Hi i tried above steps and getting this error or all sparsechunk

target reported max download size of 536870912 bytes

error: cannot load 'system.img_sparsechunk.0'

and getting these error for sparsechunk 6,7

(bootloader) Invalid signed image

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 4.358s

Please help me out
[Moto G4 Plus Guides, News, & Discussion] SoNic67:
Re-download the files, for me they worked fine.
[Moto G4 Plus Guides, News, & Discussion] ozgurubuntu:
I use lineageos 14.1 my devices don't bootloader. I try volume up + power button devices restart. Fastboot mode restart bootloader doesn't work and adb reboot bootloader ;

* daemon not running. starting it now at tcp:5037 *

* daemon started successfully *

error: no devices/emulators found

What can i do?
[Moto G4 Plus Guides, News, & Discussion] echo92:
What happens if you turn off your device, then hold down both the power and volume down keys together, do you get into your bootloader then?

Did fastboot work before when you flashed TWRP and Lineage OS?
[Moto G4 Plus Guides, News, & Discussion] ozgurubuntu:
just click OEM Lock.bat file and install Stock firmware? I don't understand, my device does not go into bootloader mode..

No problem right now. Everythings work, restoring app and setting right now. When publish a motorola OTA update, Will I be able to get me an OTA update?
[Moto G4 Plus Guides, News, & Discussion] echo92:
I'm confused by the first part of your post - what are you referring to with 'just click OEM Lock.bat file and install Stock firmware'?

If you're on stock firmware (NPJS25.93-14.4 in this case), then yes, you'll be able to get OTA updates. However, you need a stock recovery, stock system and stock kernel to be able to install the OTA updates - having a locked or unlocked bootloader does not appear to matter.
[Moto G4 Plus Guides, News, & Discussion] ozgurubuntu:
My device did not go into bootloader mode but i click OEM Lock.bat file and it worked. I'm confused. Anyway, i'm on stock firmware.

You say "However, you need a stock recovery, stock system and stock kernel to be able to install the OTA updates - having a locked or unlocked bootloader does not appear to matter."

am I stock recovery or stock kernel right now?

Thank you for attention :)
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Thanks to Motorola Firmware Team for the Stock N NPJS25.93-14-4 (March 1 2017 Security) fastboot ROM for the Amazon US variant of athene.

Do not flash this on other models. Flashing instructions are the same as described in the OP.

https://www.androidfilehost.com/?fid=817550096634779857
[Moto G4 Plus Guides, News, & Discussion] abyz12:
I am not able to relock my bootloader please help me
[Moto G4 Plus Guides, News, & Discussion] abyz12:
I m getting this error
[Moto G4 Plus Guides, News, & Discussion] nykola5:
Does this block the bootloader or am I wrong?

---------- Post added at 04:13 AM ---------- Previous post was at 04:09 AM ----------

How is the battery going? And animations and system in general? With respect to Android 6.0.1?
[Moto G4 Plus Guides, News, & Discussion] ccalixtro:
Go to developer options and mark oem unlocking then try again.
[Moto G4 Plus Guides, News, & Discussion] nobuw:
Flash without fastboot

Can I flash this through stock recovery without fastboot?
[Moto G4 Plus Guides, News, & Discussion] echo92:
No, stock ROMs generally only flash via fastboot - so you'll need a computer.

Depending on your OS build, you should be able to find OTAs that can be flashed in recovery, which should bring you up to the same build as this fastboot ROM.
[Moto G4 Plus Guides, News, & Discussion] nobuw:
I had Android 6.0.1 and used a .zip file + stock recovery to flash Android 7 NPJ25.93-14 (which is the version I'm currently on) from internal storage. So I was wondering if there was a .zip file I could use the same way without having to use fastboot?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Here's the OTA zip for updating NPJ25.93-14 (Dec 2016 security update) to NPJS25.93-14.4 (March 2017 security update)

https://xdaforums.com/moto-g4-plus/how-to/official-moto-g4-plus-ota-update-build-t3584982

Should be around 40 MB in size.
[Moto G4 Plus Guides, News, & Discussion] Ayush700:
I am on february patch an not able to lock bootloader says

STILL REQUIRE SIGNED BOOT.IMG WHAT I DO
[Moto G4 Plus Guides, News, & Discussion] echo92:
Are you both using the latest NPJS25.93-14-15 firmware (as linked here: https://xdaforums.com/showpost.php?p=76337066&postcount=769 )? Both your errors suggest you're using older firmware than what is on your device, which is the cause of security downgrade errors.

Also, if you're attempting to re-lock your bootloader, ensure you have OEM unlocking enabled in Settings>Developer Options, and be aware that re-locking your bootloader will not restore your warranty.
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
I have the April 2018 firmware ready for testing if anyone is willing to, on the retail variants. However it is better if you take modem/persist/fsg backup in TWRP if possible.

I will be updating the thread once people test this on their models with the backup above mentioned. Please mention the device model and the channel you flashed it onto. Disclaimer as per the standard firmware pages: Take backup and proceed with caution, I don't own this file.

Download here
[Moto G4 Plus Guides, News, & Discussion] RishabhDhiman:
I have a Moto g4 plus and a official firmware whenever I flash it for the purpose of locking my device bootloader it gives me error signed boot image required while executing command fastboot OEM lock. Can anyone tell me what to do now

---------- Post added at 12:35 PM ---------- Previous post was at 12:15 PM ----------

Is the version shared by rajatgupta1998 latest and can it be used to lock bootloader and can it be flashed on Moto g4 plus indian edition with 3gb ram
[Moto G4 Plus Guides, News, & Discussion] echo92:
That error you're getting either suggests you're using firmware too old for your device or it's not signed correctly. If it's the former, you need stock firmware as new or newer than your bootloader version, else you cannot re-lock the bootloader.

The NPJS25.93-14-15 (Feb 2018 security patch) firmware should work, and the NPJS25.93-14-18 (Apr 2018 security patch) should work too, however I haven't seen the April 2018 update released to Indian devices yet. Usually though updates released in Brazil are the same as for India and EU/UK devices. Up to you which firmware you flash, they are the newest/second newest firmwares as of writing.

Be warned that re-locking the bootloader will erase your device and also that will not restore your warranty, depending on your local consumer law. When re-locking your bootloader, check that you have OEM unlocking enabled in settings> developer options before attempting to lock.
[Moto G4 Plus Guides, News, & Discussion] thorin0815:
Flashed and works fine on my XT1622 (RETEU).
[Moto G4 Plus Guides, News, & Discussion] minhajul6322:
Okay if I do as mentioned can I flash OTA updates..i meant to say that if i follow the OP, then can i flash OTA updates...
[Moto G4 Plus Guides, News, & Discussion] echo92:
Provided you had NPJS25.93-14-13 on your device before you rooted, re-flashing the stock ROM in fastboot should give you OTA updates safely. Once you've updated, please only flash the same or newer stock ROM as the latest stock firmware you're running, or if you do downgrade your stock firmware, avoid using OTA updates.

If you are re-flashing back to stock NPJS25.93-14-13 from rooted NPJS25.93-14-13, you do not have to re-lock your bootloader if you wish to root after updating (omit the OEM lock begin commands and the OEM lock). You could also try to preserve your data by omitting 'fastboot erase userdata' but ensure you have a backup in TWRP and kept safe before you flash, in case you have to factory reset your device to troubleshoot.

Also, if you choose to re-lock your bootloader, be aware it will not restore your warranty.
[Moto G4 Plus Guides, News, & Discussion] minhajul6322:
Oh come on, I only want to know if i can flash the stock NPJS25.93-14-13 from rooted NPJS25.93-14-13. And I don't want my phone to be rooted anymore, i need my phone to be fully stock as new..and after doing that can i take ota updates..
[Moto G4 Plus Guides, News, & Discussion] echo92:
Yes you can flash the stock firmware.

Regardless of if you re-lock your bootloader or not, you should be able to use OTA updates.
[Moto G4 Plus Guides, News, & Discussion] minhajul6322:
Thank you so much for the help ??
[Moto G4 Plus Guides, News, & Discussion] santiagog242:
I'm facing the following issue on XT1641:

After flash the firmware, the phone reboots normally, the bootloader can be locked, if I look at system settings, the last security patch is april. BUT when the phone connects to any network, it shows that there is a new update available, in details, it shows that the available update is FEBRUARY security patch and KRACK vulnerability, when I try to install the update, the phone shows error when the android logo appears. I can boot the phone again normally but the annoying update notification appears again.

Edit: I downgraded successfully to NPJS25.93-14-15 but I had to unlock the bootloader fist.
[Moto G4 Plus Guides, News, & Discussion] wulfiss:
I'm facing the same ¿problem? (for me it isn't a problem, it is just a little bit annoying but i can live with it.), but in overall my XT1642, is working fine, at the moment i don't have either major or minor inconvenients.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, did you verify each file flashed correctly (after each file write, did [OKAY] appear) and did you use the scripts or did you manually flash by copy pasting each command?
[Moto G4 Plus Guides, News, & Discussion] vbetts:
Was able to go back to stock with this on XT1625. I still get the message that the bootloader is unlocked, but I don't care too much about that.
[Moto G4 Plus Guides, News, & Discussion] wulfiss:
Yes, I used the script and I took a look to the cmd I didn't see any error. But as I said for me it isn't a problem.
[Moto G4 Plus Guides, News, & Discussion] Zoidiano0:
im looking to update the firmware to april path

im stuck in september 1 2017

i was using android 8.1 64 bit roms but get some trouble the i downgraded to stock i get te update but cant install it

says that needs

NPJS25.93-14-8.1-1

and thats what i shows in my phone status display

but in recovery log shows that i have

NPJS25.93-14-8.8.8

would this help me to avoid that and start fresh

also im still on Bootloader B1.06

when i turn on the phone

it says ID: bad key

i want to get to the latest patch

i have an unlock bootloader

im in a XT1641 variant

thanks
[Moto G4 Plus Guides, News, & Discussion] wfantasma:
Flashed succesfully in my xt1621 (ret mx)
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Update

The NPJS25.93-14-18 firmware with April 01 2018 Security Patch has been tested enough on all the available retail models of Moto G4&Plus, so the thread OP and title have been updated accordingly. I have moved from Android File Host to SourceForge for better availability of download mirrors. Do not mirror files unnecessarily as it creates confusion for all.

Direct download link:

Sourceforge
[Moto G4 Plus Guides, News, & Discussion] kevinarol:
I face the same "issue" but just root with elementalX and freeze the stock Motorola app which notified about OTAs ?

Moto G4+

XT1641

retla
[Moto G4 Plus Guides, News, & Discussion] Kaushikradhey:
Hi Sir,

Flashed April's rom successful but play store device certification showing uncertified.

No root no twrp installed after flashing rom.

Also during phone setup my Google account was suggesting 40 days older backup but I flashed this yesterday and I was using RR ROM before flash.