yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Yes you can use this to lock the bootloader. Next time please don't quote the entire OP. Use quick reply ?

---------- Post added at 04:11 AM ---------- Previous post was at 04:10 AM ----------

Please explain what error are you facing while flashing the firmware. Keep your drivers updated though.
[Moto G4 Plus Guides, News, & Discussion] JavierOchoaAlv:
After I flashed this I can't install custom roms. They all get stuck at something like "patching system image unconditionally". My device is XT1641 and with NPJ25.93-11 everything worked fine. What could I do? please help.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Have you got TWRP installed? If so, did you wipe your system, cache, data and Dalvik before flashing the custom ROM from your internal storage/SD card? Which ROM are you flashing as well?
[Moto G4 Plus Guides, News, & Discussion] JavierOchoaAlv:
Yes I have it Installed. I wipe dalvik, system, data and cache as instructed in ROM thread. I'm trying with Lineage-OMS and AOSP - CAF. Also gotta say that I had a backup on my pc of Lineage from January 6, put it on TWRP directory and worked just fine as a restore, but can't flash.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, I'd suggest downloading a fresh copy of the ROMs and OpenGapps directly onto your internal storage (with your phone), then rebooting into recovery and installing as per the ROM instructions. I've seen that hang happen with an incomplete/damaged zip file. What TWRP version do you have as well? Might be worth flashing TWRP 3.0.3n2 from shrep's thread if you don't have it. https://xdaforums.com/moto-g4-plus/development/recovery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337
[Moto G4 Plus Guides, News, & Discussion] JavierOchoaAlv:
Ok thanks, I'll do what you say and see what happens. About the TWRP Version: TWRP 3.0.3n2 is the one I have.
[Moto G4 Plus Guides, News, & Discussion] echo92:
:) Below is a screenshot of the filesize and md5 checksum for the Lineage OMS 05/02 build as reported by Amaze File browser. Hope they match up with yours!
[Moto G4 Plus Guides, News, & Discussion] JavierOchoaAlv:
Bruh :crying::confused:
[Moto G4 Plus Guides, News, & Discussion] echo92:
Sorry for the confusion, that screenshot was just to show you what you should expect, in terms of file size and the checksum, if you were to download the Lineage OMS 05/02 build off Silesh's Google Drive. If the file size and MD5 checksum match, it suggests your download is intact (and thus ready to flash :))

If you've got any more questions, feel free to post them here in the custom ROM help thread: https://xdaforums.com/moto-g4-plus/help/help-thread-custom-roms-t3513118
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
This is the Canadian version right? Please do tell me if you were able to get a custom ROM running on your device. Need feedback for a friend's same model. Do mention the build of the ROM and the Recovery.

Sent from Lord Tywin's athene (xt1643)
[Moto G4 Plus Guides, News, & Discussion] JavierOchoaAlv:
Yes I was able to get the ROM installed, I did the download directly from my phone and everything is OK now. I'm running lineage-oms 02/05 and the recovery is 3.0.3n2
[Moto G4 Plus Guides, News, & Discussion] ashishanilkumar:
Modem Problem after flashing

My model name is Moto G4 Plus XT 1643 India. After flashing fingerprint and sim card not working. Maybe i flashed wrong firmware. Model number changed to Moto G(4) from Moto g4 Plus and baseband version to M8952_70030.25.03.60R DFLT_FSG. My build number is NPJ 25.93-14. Can anyone help me to recover it to stock indian Moto g4 Plus with BL: B1.03 and baseband M8952_70030.25.03.62R ATHENE_INDIA_DSDS_CUST.:confused::confused:: ::crying::
[Moto G4 Plus Guides, News, & Discussion] ramansehra:
Earlier(Marshmallow version) whenever I touched the fingerprint sensor, lockscreen litted up and I could unlock phone without using lock button.But after updating to Nought ,I have to press lock button to lit the lockscreen , it should glow automatically when fingerprint sensor is touched.

I am not using fingerprint sensor but it is working fine if used.
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
I have the same model. I faced no problems as you have mentioned. You have to use the firmware provided in the OP. Consider doing this command before you use the Flashall.bat :

fastboot erase userdata

This is not a problem but a standard Nougat feature. The device wakes up only when the fingerprint sensor gets a registered fingerprint as input.

Sent from Google Chrome on Lord Tywin's Windows-PC
[Moto G4 Plus Guides, News, & Discussion] ashishanilkumar:
Doesn't work:(:(:(
[Moto G4 Plus Guides, News, & Discussion] sakhura:
Just use the OEM flash.bat it will erase the data and cache
[Moto G4 Plus Guides, News, & Discussion] harrymooose:
We will be able to receive OTA updates after installing this STOCK?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Provided you have not modified your recovery or system, yes, you should be able to receive OTA updates and install them. Having a locked or unlocked bootloader does not affect your eligibility but any modifications past this to any other part of your system may block an installation, and you may have to undo those changes or re flash the stock ROM.
[Moto G4 Plus Guides, News, & Discussion] harrymooose:
Actually I'm on Resurrection Remix v5.8.2 and i want to switch to Stock, it will work for this?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Should do, since this is a full ROM and should overwrite your previous system. Bear in mind that it may remove root and TWRP recovery once you've fastbooted this, and as per the opening post, wiping your data and cache using the scripts is recommended when switching back to stock from a custom ROM, so you'll have a clean start. Might be worth backing up your internal storage just in case though.
[Moto G4 Plus Guides, News, & Discussion] harrymooose:
Thanks Alot, I'll tell you if it works or not :D
[Moto G4 Plus Guides, News, & Discussion] softjcmendez20:
Quien me ayuda con el rootear a nougat
[Moto G4 Plus Guides, News, & Discussion] oxidcs:
Turn off

Flashing everything correctly. Nougat works fine for me, but I can not turn off the phone.

When I turn it off, it enters the botloader.

I came from version NPJ25.93-11 in which turn off works.

What I can do?

EDIT:

Flash again by fastboot and I do not solve the problem. Continued entering the bootloader when I turned it off.

Then I made a flash with program "RSD Lite" and solved the problem, can turn it off correctly.
[Moto G4 Plus Guides, News, & Discussion] sumchamp:
Is it possible to reset the phone through this method to restore the phone to factory originals? To claim warranty from moto.
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Yes this method will lock your bootloader but you will not get your warranty back. It gets void as soon as you unlock the bootloader. You've sent a unique code to their site while unlocking it, so they know it.
[Moto G4 Plus Guides, News, & Discussion] sakhura:
But still you can give it a try as most Service centers don't check whether your bootloader is locked or unlocked
[Moto G4 Plus Guides, News, & Discussion] totalcontrol:
Even I was on NPJ25.93-11 withe elemental x kernel and rooted flashed this to upgrade now I'm in a bootloop

Now I can't flash Back to NPJ25.93-11 it says the bootloader cannot be downgraded from 14 to 11
[Moto G4 Plus Guides, News, & Discussion] echo92:
Did you wipe your cache or data (or use a factory reset) when you upgraded to 93-14?

If you wish to downgrade, you will have to omit flashing the boot loader and gpt partitions from the 93-11 update. I'm not sure if you have to unlock your boot loader to downgrade.
[Moto G4 Plus Guides, News, & Discussion] totalcontrol:
Can we flash this the 93 11 through rsd and will it go through

Thanks
[Moto G4 Plus Guides, News, & Discussion] echo92:
You could try (RSD version of 93-11 is here https://xdaforums.com/moto-g4-plus/how-to/android-7-0-install-nougat-official-t3531612), again, you'll have to edit the script to not flash the gpt partition tables and bootloader (as sakhura mentions here: https://xdaforums.com/showpost.php?p=70677828&postcount=256). Alternatively, you could download a fresh copy of the 93-14 build and try a complete clean flash of it again over your existing copy - it might be that your first installation was not complete. This time, I'd suggest using the script that wipes your data and internal storage (i.e. a complete erase of your device, might be worth backing up essential data if you can), to ensure no errors are being carried over.

Did a factory wipe stop your bootloops? Where did your device begin looping btw?
[Moto G4 Plus Guides, News, & Discussion] totalcontrol:
I was on 93 11 stock elemental x kernel and rooted

I flashed the 93 14 flashall batch from sakhura

Without erasing and the phone shows the M logo and shuts down

I then flashed it again and then it went in a bootloop

I flashed it again thinking it might help but now it boots to the M logo and goes to bootloader

That is ptretty much it

I'm stuck at this!!
[Moto G4 Plus Guides, News, & Discussion] echo92:
What happens if you connect your phone to your PC whilst in fastboot/bootloader mode, open ADB (and use the command 'fastboot devices' to check if your device is detected), and in ADB run the command 'fastboot oem fb_mode_clear' (without quotation marks), then reboot your device? This command, as I understand it, should clear fastboot mode and permit you to boot properly.
[Moto G4 Plus Guides, News, & Discussion] totalcontrol:
It detects the phone in fastboot

After erasing fb mode it now boots into the M logo and doesn't goto bootloader but just switches off..
[Moto G4 Plus Guides, News, & Discussion] echo92:
So that bootloop suggests a failed flash or an old cache/data still present, did you wipe your data and cache? If you didn't (if that's what you meant by without wiping) then you'll have a cache/data from your old installation which may be confusing your 93-14 install and preventing a boot.

Also, did you re-download the 93-14 fastboot file? I'm just wondering if your original download or unzip was corrupted along the way and is thus flashing incompletely. Start with a fresh download and see if it works with ADB and ensure you wipe your data during the flash (or reboot into recovery and perform a factory reset), so you have a clean installation.
[Moto G4 Plus Guides, News, & Discussion] totalcontrol:
Yes maybe

I'll redownload the 93 14 tomorrow and flash it after a wipe

Thanks
[Moto G4 Plus Guides, News, & Discussion] :
will i get updates normally if i use this?
[Moto G4 Plus Guides, News, & Discussion] echo92:
You should be able to receive and install OTA updates as normal (provided Motorola release updates in your region based on this 93-14 build). To be able to install updates, you'll need a stock recovery and kernel, or be able to reinstall those, bootloader status doesn't appear to matter.
[Moto G4 Plus Guides, News, & Discussion] :
Thank you
[Moto G4 Plus Guides, News, & Discussion] totalcontrol:
Did the above but it seems a hardware issue

Modified the flashall XML file and deleted gpt and bootloader flashes and flashed through rsd

It goes through each flash perfectly but doesn't boot

I think its the headphone which is short I dunno yet

Thanks
[Moto G4 Plus Guides, News, & Discussion] ubxu:
Flashed about two hours ago. All works fine.

Allowed the .bat script to do full factory reset and usersettings wipe.

For those of you who wonder why the cmd window disappears instantly after execution of .bat file; remeber to extract the files into the "Minimal ADB and Fastboot" folder under "Program Files (x86)".

UPDATE: Battery drain seems to be about the same as Android 6.0.1. All apps I use seem to work well and stable.
[Moto G4 Plus Guides, News, & Discussion] :
Works on xt1625 non plus us retail thank u
[Moto G4 Plus Guides, News, & Discussion] surya760:
the link u provided for adb and fastboot drivers is not working can u help me and one more thing i wanna ask which one should i extract to adb folder the rom filesor adb drivers?????
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Download here:

https://www.androidfilehost.com/?fid=745425885120698566

Or just check the adb installation like in the OP.

Also, it doesn't make a difference if you've installed them once. You just need the ROM files and the adb/fastboot binaries together
[Moto G4 Plus Guides, News, & Discussion] sirdir:
tried to flash that version. The following did not work - I guess that's because I'm coming from the soak tests? But why bad key?

MacBook-Pro:Moto G4 Plus XT1640-43 ATHENE NPJ25.93-14 Stock Img$ fastboot flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (16384 KB)...

OKAY [ 0.518s]

writing 'boot'...

(bootloader) Image signed with key bad key

OKAY [ 0.758s]

finished. total time: 1.276s

MacBook-Pro:Moto G4 Plus XT1640-43 ATHENE NPJ25.93-14 Stock Img$ fastboot flash recovery recovery.img

target reported max download size of 536870912 bytes

sending 'recovery' (16484 KB)...

OKAY [ 0.522s]

writing 'recovery'...

(bootloader) Image signed with key bad key

and..

MacBook-Pro:Moto G4 Plus XT1640-43 ATHENE NPJ25.93-14 Stock Img$ fastboot oem lock

...

(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer

(bootloader) Options

OKAY [ 0.004s]

finished. total time: 0.004s

Edit:

Went into dev. mode again, allowed OEM unlock in settings and retried the installation again, this time it worked without problems. bootloader is relocked now ;)
[Moto G4 Plus Guides, News, & Discussion] victor.rossetti:
Just flashed and working on my XT1644 ...so far so good! Thank you
[Moto G4 Plus Guides, News, & Discussion] :
Working on xt1625 non plus us retail thank u. Ran flash and was done within 10 minutes.
[Moto G4 Plus Guides, News, & Discussion] iaio72:
Me too, someone know how to change splashscreen?

edit solved with this guide:

https://xdaforums.com/moto-g4-plus/themes/splash-screen-stark-sigil-game-thrones-t3562019
[Moto G4 Plus Guides, News, & Discussion] fs1023:
Hi all

Have retail unlocked XT1642. Sorry for daft question but which bat file do i use?

Run the "OEM Flash.bat" script that is inside the folder that is created when you unzip the file.(If you want to lock your bootloader Use "OEM lock.bat")
[Moto G4 Plus Guides, News, & Discussion] toppits:
They do the same except that OEM lock.bat also relocks the bootloader.

Be aware that you're phone will be wiped.
[Moto G4 Plus Guides, News, & Discussion] fs1023:
ok thanks for answer and advice toppits
[Moto G4 Plus Guides, News, & Discussion] artwisbr:
Hi!

Do you know If It works on xt1626 with npj25.75-2 installed?

Update:

Works perfectly, and all the original features (like digital tv signal) continue to operate.
[Moto G4 Plus Guides, News, & Discussion] autoradio78:
Has Anyone noticed battery drain compared to marshmallow? With this build I have 3-4.30 max hours SOT. With MM 5.30-6..
[Moto G4 Plus Guides, News, & Discussion] Mykstabrum0121:
Is this rom flashable from the sd card in the recovery or does it require the adb from pc?
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
As mentioned in the OP title, it needs fastboot hence from a computer only..
[Moto G4 Plus Guides, News, & Discussion] Mykstabrum0121:
Ok thanks for your reply
[Moto G4 Plus Guides, News, & Discussion] dayask:
Flashed successfully within 8 minutes(Indian version) thanks great job:good::good:
[Moto G4 Plus Guides, News, & Discussion] Mykstabrum0121:
Will flashing this rom change my software channel from retgb. Anyone know where there is a link to a U.K version?
[Moto G4 Plus Guides, News, & Discussion] echo92:
I've flashed this fastboot ROM in the past on my XT1642 (UK, G4 Plus) and my software channel still was retgb (still with an EMEA baseband), plus my phone was working okay on the 3 UK network. It's the same build as the 93-14 Nougat OTA update that recently came out in the UK. If you're still wanting an update downloaded in the UK (note, this only will flash on stock recovery, and may require Marshmallow 139-63/64 builds - if neither of those apply, you'd be better served with this fastboot ROM), here's a Google Drive link in the 2nd half of the post, should still be working: https://xdaforums.com/showpost.php?p=71350671&postcount=74
[Moto G4 Plus Guides, News, & Discussion] Mykstabrum0121:
Thank for your reply i have litterally just flashed this rom and yes i can see my software channel is the same retgb. Phone took awhile to load but so far so good thanks. Also anyone know if we will actually be able to get OTA updates as the rom i flashed last time(NPJ25.93-11) the poster said yes you could but i never got the OTA even though others said they was receiving this newer rom in the uk.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Nice one :) I imagine you'll be able to get OTA updates as now you're on the same build as the official update in the UK and elsewhere. My guess is that 93-11 didn't give you an update as this build wasn't officially released for any software channel outside of India.
[Moto G4 Plus Guides, News, & Discussion] trevorb21:
Just a couple questions

1-anyone tried this with 1644 us version?

2-i don't have to unlock bootloader for this? (I am double checking as I have always unlocked it before on other phones).

Bonus question-would I be better off waiting on ota update from moto? I am on 6.0.1

Edit: read read read....After a bit more research I think I found the answers. Going to go for it anyway
[Moto G4 Plus Guides, News, & Discussion] Z-borg:
logo and recovery are not signed

Hey is this supposed to happen

D:\Andriod\Athene\Stock\Moto G4 Plus XT1640-43 ATHENE NPJ25.93-14 Stock Img>fastboot flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (16384 KB)...

OKAY [ 0.521s]

writing 'boot'...

(bootloader) Image signed with key bad key

OKAY [ 0.575s]

finished. total time: 1.100s

D:\Andriod\Athene\Stock\Moto G4 Plus XT1640-43 ATHENE NPJ25.93-14 Stock Img>fastboot flash recovery recovery.img

target reported max download size of 536870912 bytes

sending 'recovery' (16484 KB)...

OKAY [ 0.525s]

writing 'recovery'...

(bootloader) Image signed with key bad key
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Yes it's absolutely fine....as long as you get the OKAY message everything is good :good:
[Moto G4 Plus Guides, News, & Discussion] Z-borg:
OK :D

but i can't seem to flash supersu [SR3-SuperSU-v2.79-SR3-20170114] via TWRP [twrp-3.0.2-r4-athene_shreps].

flashing TWRP works but as soon as I flash supersu device don't boot-up :eek:
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
For rooting stock nougat you need to flash ElementalX kernel and then reboot system and then install SuperSU. Also update the recovery to v3.1
[Moto G4 Plus Guides, News, & Discussion] aSuperSaiyanG0D:
Forgive me if this is a stupid question but, say I do this method on my xt1644 (stock marshmallow build - 49) and I make a TWRP backup before hand couldn't I just restore that to downgrade back instead of reflashing the whole mm firmware to downgrade

I'd only do that incase I experience some bugs or something of that nature on Nougat
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Restoring via the twrp backup will succeed but you MAY get random reboots and crashes. The sensor files and the modem specifically are needed while changing the firmware version. So fastboot method is the fastest, easiest and the best way to do it. But I think newer version of twrp 3.1 by oadam11 and shreps allow u to take these backups too.
[Moto G4 Plus Guides, News, & Discussion] aSuperSaiyanG0D:
Thank you, I already installed the new TWRP but I'm guessing theirs have more features?
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Yes and it is more stable. Just search in the ground zero ROMs section or visit g4.oadam11.com :good:
[Moto G4 Plus Guides, News, & Discussion] aSuperSaiyanG0D:
Thanks and yes I found the oadam11 TWRP and installed it, it had way more partitions to backup so I'm confident say something goes wrong in Nougat I'll be able to go back.

Thanks again ?
[Moto G4 Plus Guides, News, & Discussion] nitish_namdev:
Thanks, working fine on xt1643 India dual sim variant. Flashed back stock after trying 2-3 custom roms as i think present roms are not as stable as i like them to be and Camera quality suffering is a major drawback. Thanks Again for creating this post.
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
I have been using LineageOS-OMS and it is the most stable ROM. Camera quality isn't much of a noticeable difference .
[Moto G4 Plus Guides, News, & Discussion] vishalrao8:
Is it normal to have "unavailable" Bluetooth address in about phone\status
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
When Bluetooth is off, the address is unavailable and vice-versa.
[Moto G4 Plus Guides, News, & Discussion] vishalrao8:
Is there any way to get back warranty after locking bootloader???
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Nope..once unlocked warranty gone. But there's a chance that the service centre people won't check for bootloader unlock.
[Moto G4 Plus Guides, News, & Discussion] vishalrao8:
Do they just check bill and date of purchase??
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
Actually it depends on them. Can't say anything.
[Moto G4 Plus Guides, News, & Discussion] vasu1312:
i dont have bootloader myphone have only twrp 3.1.0-0 and nothing else totally blank what to do?
[Moto G4 Plus Guides, News, & Discussion] rajatgupta1998:
What message does the bootloader show?

Reboot to bootloader from recovery and flash stock rom as mentioned in the op.
[Moto G4 Plus Guides, News, & Discussion] sergiomc22:
Hi, one question. Is there any differences if I use Adb tools that you Suggest (v1.4.2) or another that I had before ? (i don't know which version is, but the EXE size file is lower)

Thanks.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Might be worth downloading the 1.4.2 version as it appears to use the latest adb tools (check the changelog in the 2nd list item under Requirements in the opening post, or https://xdaforums.com/showthread.php?t=2317790 . It's also only 930 kB :)
[Moto G4 Plus Guides, News, & Discussion] andrescm:
Hello,

Just a noob question from someone new to this device. The script in the OP begins with these lines:

That is, they appear twice. Does this really need to be run twice or is it just a typo?
[Moto G4 Plus Guides, News, & Discussion] echo92:
That's not a typo, if you execute the first command, the adb console will ask you to repeat the command to confirm if you wish to (attempt to) lock your bootloader, with the message warning you'll wipe your data.
[Moto G4 Plus Guides, News, & Discussion] andrescm:
Thank you. I had an Atrix before switching to a Samsung and now I have an XT1641 and I remember a thing or two about these commands but needed a refresh :D
[Moto G4 Plus Guides, News, & Discussion] vasu1312:
yes i did now working well
[Moto G4 Plus Guides, News, & Discussion] annoyingduck:
Just got the OTA on my xt1644 US version today. It kept failing in the stock recovery (no idea why - hehe). Thank you for this file/thread. It is the exact same build # that was downloaded to my phone originally. Worked perfect manually upgrading through fastboot on Arch Linux. I kept the bootloader unlocked, and skipped the erase user data command, and the phone upgraded perfectly and is running fine. I'm using Verizon if that helps anyone.

I am concerned about the bootloader though, as it read "signed by a bad key" - which is also shown on the unlocked boot splash screen under ID= bad key. It flashed fine, but I do want to know why the key is bad.