yashsingh1/xdaforums huggingface dataset:
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
That shouldn't happen unless your not flashing the whole firmware package, and running all the commands included in the flashfile.xml or service file.xml. The system, oem, and modem need to be all from the same firmware version or things might not work right. This is what I've found with the Boost variant anyway. Not wiping data might cause your problem also. I made myself a couple scripts to flash everything and run all the commands real easy with either Linux or Windows. I attached retail variant compatible versions. I hear a lot of complaints of bad things happening with rsdlite on windows and have never used it myself. I just use these instead mostly. The firmware flash.sh will wipe data and the firmware service.sh won't. To use them on Linux, just remove the .txt extension on them (I had to do that to upload them), put which ever one you want to use in the extracted firmware package folder, set the permissions of the file to run as a script and double click the file and select to run it in terminal.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] zahna:
You, sir, are a gentleman. Your script was great! I've never flashed a full, stock firmware back onto a phone before, but your script made it really easy; and my phone works again! Thank you!

One thing I just noticed is that i'm on build NPQ26.69-41, and the phone says there are no system updates available. The security patch is from May 1, 2017. This seems old. Do you know if this really the latest firmware for the Moto E4? I am seeing a NPQ26.69-41-3 on firmware.center, but I don't know if that is for the retail xt1768 or not.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
Well, thank you and your welcome. I'm glad to see that script helped you out. It really is a good idea to get used to using fastboot and the commands though. The firmware version you mention, it's actually NPQS26.69-41-3 the S is added since it is a security patched version of NPQ26.69-41. That is the latest firmware, and I believe it is for the retail XT1768, but I'm not 100% sure. I'm almost positive there is no difference between the to firmwares on that sight that have the same label of NPQ26.69-41, other than the one that says Canada, which is obviously the Canadian retail variant. I don't have that model to tell you what the security patch should be, but I think it should be January for the latest version. The package inside the XT1768 folder labeled NPQS26.69-41-3 on firmware center should be the correct latest version that is available.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Ted A:
I keep getting com.android.phone has stopped error...
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
Did you read the OP or any of this thread? That happens when your phone wasn't already updated to the firmware version the posted ROM was made from. You need to either flash the partition updater I posted, and then reflash the ROM, or flash the full firmware package with fastboot or however you prefer to flash firmware.

Edit: https://xdaforums.com/showpost.php?p=75845237&postcount=21
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] CMWAidanx:
Make sure you update ALL the firmware. There are posts above about this. It said this in the OP
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
I added the partition updater to the op that I forgot to add. I also made the instructions a little clearer, bigger and more red. As soon as I have a chance, I will add the updated ROM and partition updater for the recent Sprint variant update to the op.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] phuckt:
I have a Motorola update handed to me just today that is downloaded (not installed) to my device. I have a ([perry] xt1766 boost mobile variant) with an unlocked bootloader. I plan to do a full twrp backup before install. If there is anything I can extract that would be helpful to the E4 development I would be happy to contribute what I can. I have a couple Moto e4's and a G4play. I think these inexpensive little things are great, and if there's anything I can do to further (or help) their development I will be happy to.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
That would be very much appreciated. I won't have to try to pry my E4 from my girlfriends hands to update it, lol. If you could get me a system and boot twrp backup before you do anything to modify either one, that would be great. I'll also need you to use adb, the terminal in twrp or a terminal emulator right on your phone after you root and pull the oem.img, boot.img and modem.img, and the fsg.mbn. I'll have an updated ROM and partition updater asap. Thank you very much for the offer. I hope to get another E4 for development/testing purposes sometime in the near future so I don't have to rely on others for this stuff.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
[MENTION=8947538]Goose03[/MENTION] Could you make a TWRP flashable zip out of this please?? It only includes the system and boot partitions with latest OTA included as I have done this myself ;)

[TWRP Backup]Moto E4 Perry Latest Stock with Latest OTA TWRP Backup

This is for the Boost Mobile XT1766 Qualcomm variant

Thanks in advance :)

EDIT: Also if you wouldn't mind giving me the terminal commands for those partitions I wouldn't mind pulling them for you :)

EDIT 2: I just noticed that [MENTION=8976289]phuckt[/MENTION] was trying to do the same thing, I apologize, [MENTION=8976289]phuckt[/MENTION] if you'd like to pull the required partitions that he requested you can as I've already posted the backup, I need the terminal commands to pull them which I don't have, sorry bout that once again ;)
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] phuckt:
blkid should identify and DD should copy

I'll plan on doing the same, a second opinion/option is always welcome I'm sure
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
dd if=/dev/block/bootdevice/by-name/oem of=/oem.img

dd if=/dev/block/bootdevice/by-name/modem of=/modem.img

dd if=/dev/block/bootdevice/by-name/boot of=/boot.img

dd if=/dev/block/bootdevice/by-name/fsg of=/fsg.mbn

This should put the files in the directory you open a terminal in on your PC.

Edit: of it's done on your phone, do like this:

dd if=/dev/block/bootdevice/by-name/oem of=/sdcard/oem.img
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] codyalan:
Have a XT1768 Backup, No data. Could you make a flashable zip for it?

https://drive.google.com/file/d/1ne1jaYA0sSqc_1hElqKNX_4PkLire2rW/view?usp=drivesdk
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
What firmware version is this from? I need to know the exact version so I can label it properly. Is the kernel included?

Edit: what did you do, include a normal system backup and system image backup? The file is 2.5GB. Downloading that from drive will probably fail on me numerous times and just waste my data. I already use a lot of data doing this for you guys. I only want the normal system backup and boot backup.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
It's just regular TWRP Backup of system and boot partitions, if you want I can remake the backup with system image and boot partition?? This is for version NCR26.69-64
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
I know what you posted and no, I don't want the system image. I was asking the question to the user who asked me to make a ROM for the xt1768.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
[MENTION=8947538]Goose03[/MENTION] Here is the partitions that you requested for the new version's Partition updater, keep in mind that the boot.img has magisk and no-verity pre-configured in it.

partitions for partition updater.zip
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
Thanks, but I already have everything I need.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Goose03:
I said screw it and downloaded it. I appreciate providing the files, but next time please only give me the normal system backup, not the system images backup also. I don't need the data backup either, so please make sure you don't include that either next time. Is this backup from the NPRS26.58-45-3 firmware?
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] eheinzeiii:
any metropcs stock roms? thanks
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] madbat99:
Anyone with xt1766 (Sprint, boost, virgin, etc.) on rooted stock able to grab the build fingerprint for me?

In terminal run

getprop ro.build.fingerprint
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] madbat99:
[MENTION=8947538]Goose03[/MENTION]

Any chance of 26.69-64?
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
I'm compiling a TWRP flashable OTA for 26.69-64.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] zahna:
Is it only for the sprint variation or for the retail model (xt1768) as well? I'm asking because 26.69-64 should have the patch for the bug where the Moto E4 stops recognizing the SIM card.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] DB126:
Thank you! A perfect complement to your Partition Index and Bootloader Updater.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
Here ya go...
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
Link for stock ROM is dead
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] madbat99:
His account is currently disabled.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
I just said that in our telegram group
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
Lol
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] madbat99:
Lol, I should've looked there.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
The TWRP flashable OTA is giving me issues with patching the boot image, which is already patched for dm-verity/forced encryption. So, I've compiled a full TWRP flashable stock ROM (7.1.1/NCQ26.69-64), which also updates all bootloader partitions, radio firmware, patched boot image, and updated /OEM partition image. I'll try and have a link posted for it this evening (EST).
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
Thank u motojunkie
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
Thank you my brother ;)
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] DB126:
Quite stoked about this! Thanks again for all you do for this community. :good:
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Update: ok guys, sorry for the delay. My Android Kitchen has some problems so I've been unable to get Build No. NCQ26.69-64 in a TWRP flashable zip. But for now, I am uploading the updated stock firmware images and I'll be posting a new thread in a couple hours. The system.img, boot.img, and recovery.img (stock recovery) can be flashed using TWRP. I'll be posting instructions (for those members that may need instructions) on flashing the bootloader partitions and radio firmware (baseband) partitions using fastboot commands.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Here's a link to the NCQ26.69-64 stock firmware images. Note that system.img and boot.img can be installed using either fastboot or TWRP. I've included the radio firmware (modem.img & fsg.img) patched by the OTA update as well. These are optional updates and fastboot can be used to install these. There is also a stock recovery image included. I'll have a TWRP flashable zip posted soon as I get the bugs worked out of my Android Kitchen.

Note: it is recommended to in install my bootloader and partition update prior to installing these files.

https://drive.google.com/folderview?id=1ZwQuSEhP4Vqyh8Ac9Uxs-pwrbfjaZ214

My partition & bootloader updater can be downloaded here:

https://xdaforums.com/moto-e4/moto-...nt/update-partition-index-bootloader-t3770885

If a bootloop occurs after installation, dm-verity is likely the cause. Install this boot image patcher to disable dm-verity & forced encryption. https://drive.google.com/file/d/1mIO0PkGlWXgAw_TOaPZBswVmQxCCz9vm/view?usp=drivesdk

Note: this boot image patcher disables dm-verity and forced /userdata encryption; however, you will still be able to manually encrypt your userdata by going to Settings>Security>Encrypt Phone. The process takes approximately one hour, and it is recommended to charge your battery to 100% prior to encrypting your data.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
I can compile a TWRP flashable stock ROM once my Android Kitchen gets ironed out. I'm going to get the Windows version donate kitchen from [MENTION=718594]super[/MENTION]r's thread.

Use TWRP Backup option and get me an untouched stock system.img and boot.img of your OS. (TWRP will save the backups as emmc.win and similar file extensions. I'll convert them if you can send me the dumps).
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
After I flash ur updater and system.img and boot.img it has error upon setup android.phone not working
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
That's because you need all the partitions updated
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
Isn't that what the updater zip is for?
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] PimpMy5Ton:
Apparently it's missing something or you wouldn't be getting that phone crash
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Prior to installing anything, do a full wipe of your device in TWRP of /system, /cache and Dalvik, and reboot recovery. Next install the partition/bootloader updater, then system.img and boot.img. Now format /data and reboot system. I'll hopefully have a flashable zip ready in a day or two, which will put much more ease into updating the OS.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Guys please give me an update as to whether anybody is having any further issues with installing the ROM. My Android Kitchen is working now finally. I uninstalled and reinstalled on my PC and it's up now.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
I spent yesterday in boot loop and yes I used no verity zip I followed guide perfectly lol its all good I got it going again but won't start unless I use one of the other options in bootloader instead of start ie. Qcom etc.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] DB126:
Another well documented issue. After flashing TWRP you must boot into TWRP at least once before starting whatever ROM is installed. There are other scenarios and solutions but the above is the most common.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
Tried that to no avail
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Ok guys I pinpointed the issue, and you all were correct that something is missing from the updater. I completely missed the /dsp partition update from the OTA. So, here's what I'm doing right now. Until I get my flashable ROM done, I'll be posting a fastboot firmware package shortly with exact instructions for installing the files. For you who do not have Minimal ADB & Fastboot 1.4.3 or newer, here is a link for the installer. It should work fine on Windows 7, 8.1 & 10. I'll be posting the fastboot package within the next hour or so. Sorry for the issues gentlemen, but I will have it ironed out today.

Minimal ADB & Fastboot 1.4.3: https://drive.google.com/file/d/0B1Sfod4HWfk2T0hia0k3Y3pIczA/view?usp=drivesdk
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Ok, here is a link to the firmware images which can be flashed via fastboot for a clean update to NCQ26.69-64. https://drive.google.com/folderview?id=1L2xZwZ4M2Xr5t1RzxjutB8gnT2TQY5ox

Place these files in your ADB/Fastboot directory (assuming you already have the Motorola Device Manager installed as well for the correct USB device drivers), open a command window, and execute the following commands:

fastboot oem fb_mode_set

fastboot flash partition gpt.bin

fastboot flash boot boot.img

fastboot flash aboot aboot.mbn

fastboot flash cmnlib cmnlib.mbn

fastboot flash cmnlib64 cmnlib64.mbn

fastboot flash devcfg devcfg.mbn

fastboot flash dsp dsp.img

fastboot flash modem modem.img

fastboot erase modemst1

fastboot erase modemst2

fastboot flash fsg fsg.img

fastboot flash keymaster keymaster.mbn

fastboot flash oem oem.img

fastboot flash prov prov.mbn

fastboot flash rpm rpm.mbn

fastboot flash sbl1 sbl1.mbn

fastboot flash tz tz.mbn

fastboot erase system

fastboot flash system system.img

fastboot erase DDR

fastboot erase userdata

fastboot erase cache

fastboot oem fb_mode_clear

Please note that when flashing the larger partitions such as oem.img and system.img, fastboot will initially return a header size error, but will then sparsechunk the large files and incrementally flash each one. So just be patient and allow fastboot to resolve these larger files. The system.img can take around 4 minutes to flash and oem.img takes around 3 minutes. I realize this is a bit of a lengthy process (and monotonous) and I do apologize. But my primary goal right now is to provide an effective means to update to the recent NCQ26.69-64 build. Should you get any error on a command, simply disregard and keep flashing in order. I just used this on my device to confirm that it works.

Also, after flashing these partition images, you may need to flash the dm-verity forced encryption patcher that I linked previously in this thread. This update has been tricky because, as you can see above, the OTA patched a large number of partitions, which is typically not the case.

P.S. Sorry I had link sharing on the download disabled in my drive settings. It should now be fixed
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Let me know guys if that updated your device ok. I just ran the same commands on both of my xt1766 devices without any issues. Smooth update. I did notice that /metadata is returning a "permission denied" notification. However, it is not affecting the update. Also, take note that once the files are flashed, installing the dm-verity/forced encryption disabler isn't necessary. The OS should boot up normally, but with /userdata encrypted.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] DB126:
Yeah, I clicked 'thanks' more than once but felt a more personal acknowledgement of your contributions was in order. I very much appreciate the frequent updates, detailed instructions, and fast response to reported issues. Looking forward to applying this update to my XT1768 but am holding back to to RL obligations and the need for 7x24 phone availability for the next few days. Hopefully you'll get some feedback from others in short order.

Tip-of-the hat for making this community a better place. :)
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Thank you for the kind words. I only hate I've been on the road working and without a good working kitchen ....but I have one now and will likely be getting a flashable zip posted tomorrow. Yeah I'm waiting on user feedback too, and I actually tested this on both of my own xt1766 devices to ensure full functionality. I know it's a pain to execute 20 or so fastboot commands just to update the OS, and I'm thankful for everybody's patience. By the way [MENTION=5488402]Davey126[/MENTION], I have read a lot of your work on XDA and realize that you make a lot of valuable contributions to this community too. So I thank you as well.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
All went well :good:
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Glad it worked [MENTION=8931427]skullkid383[/MENTION]. Thanks for your feedback.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
If you extract the archived xml firmware package, you will get about five sparsechunk images which make up the entire system.img. you can use WinZip, WinRAR, 7zip, etc., to extract the firmware package.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
Have you tried this site for stock Motorola firmware packages? https://firmware.center/firmware/Motorola/Moto E4/Stock/
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
If you extract the firmware package from that site, you should get five separate sparsechunk images which make up system.img. You'll also get boot.img, recovery img, bootloader partitions, radio firmware, logo.bin, etc. Try using WinZip or WinRAR to extract the package.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
[MENTION=7383447]MotoJunkie01[/MENTION] did u get partition zip running right yet I wanna see if it solve no sim error in custom roms
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] madbat99:
7zip extracted every firmware for this phone I've downloaded. 2 clicks. I even did it on my phone once. You must be missing something in there.

But, Good luck building a stock rom bro!

Nice initiative, gotta say.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] DB126:
Same. Never thought twice about extraction success. Click, works, move on.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] tboned82:
This is exactly what I need!!! Thanks :) by the way, did you post a link? I see files.fm one but don't believe this is the Stock Rom you've just completed?
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] Photonik:
Link in OP is down for stock zip, does anyone have a mirror? Would be greatly appreciated, thanks.

Are these still the correct steps to revert to stock on a XT1766? Flashing partition updater beforehand correct? The backup I made before flashing custom fails and I boot-loop even after flashing dm-noverity.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] JustinJay1980:
Does anyone by chance have a working link for a Twrp flashable stock ROM for the Xt1766? I would really appreciate it.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] skullkid383:
Sadly no only way is to fastboot update everything but first what was ur last version u were on
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
No working link I'm afraid. But I do have the latest stock ROM for the xt1766 (NCQS26.69-64-8) compiled in a TWRP flashable zip, and I will be posting that as soon as I get some free time to post a thread and upload the file.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] JustinJay1980:
Thank you!!! I would really, really, really, appreciate that. The issue is that I now have the device activated with the carrier, but I'm on a custom ROM, and although I was more into this stuff years ago if I remember correctly you can't activate on a custom ROM or if things have changed and you can, I certainly don't know how to do it.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
You definitely can enable GSM support on custom ROMs. However, because there isn't actually a universal "fix" for doing this, you either need to edit ##3282# with your MSL code, or you must edit your apns-config.xml, eri.xml, and telephony.db.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] JustinJay1980:
Has there been any luck or headway on getting the TWRP flashable stock ROM for the Xt1766 uploaded or perhaps someone could turn me on to a working link? I have spent some time looking around to no avail. Also I did read the part about being able to enable GSM capabilities but I'm trying to use my device and activate it on Boost, which is CDMA / LTE. If anyone can possibly help, guys, I would really, really appreciate it.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] MotoJunkie01:
The last OTA pushed out to the xt1766 has a major bug which completely breaks the cell radio for some users, but not others. Perplexing issue to say the least. When this bug is fixed -- either by Motorola or on user end -- I will be posting a TWRP flashable stock ROM based on the latest build.
[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] JustinJay1980:
Hey there,

Been a little over a month so I figured I would check in and see if there has been any update regarding a TWRP flashable stock ROM for the Xt1766. Let me know, I would sure appreciate it.