yashsingh1/xdaforums huggingface dataset:
[Moto X4 Questions & Answers] redwoodie:
I see that update -8 is pushing out to Payton, neither of my phones will take it at this point including the one on -6 that took -4 and -5 earlier. KrisM22, do you remember what bits you restored besides EFS to get back to working stock? Besides efs1 & 2 I have Vendor, Vendor_image, Persist, Logo, dsp, & bt_firmware.
[Moto X4 Questions & Answers] KrisM22:
I believe it was efs1 and 2, and persist. I don't believe it was anything else

no, the very first time I restored, after I did lineage PE10 and was scre***, I shotgunned all the small stuff, but I believe vendor failed. I did do dsp and a couple others that logically I shouldn't have.

I would try to restore all the little stuff and just make note of what didn't restore , but then go on anyway.
[Moto X4 Questions & Answers] redwoodie:
Lost IMEI after restoring EFS

I was trying to fix the problem with rebooting then losing mobile and wifi connectivity on my daily driver X4 running -6, and maybe getting it to take the -8 OTA. Before today it would lose the modems after each reboot until after I fastbooted and erased modems t1/t2. I backed up all the small bits again first in TWRP, then restored them from an earlier backup. Phone now has no IMEI, no mobile and no wifi. I tried restoring the just-made backup bits including EFS1&2, fsg, dsp etc. (Vendor doesn't restore due to read-only, persist gives tar fork error 255). Still no IMEI using backup from today when phone was working earlier. Erasing modems after restore does nothing. Dialer gives message "to make a call turn off airplane mode."

Thread herehttps://xdaforums.com/moto-x4/help/motorola-x4-lost-imei-attempt-to-t3983737/page2 has some users who recovered IMEI by flashing NON-HLOS.bin and fsg.mbn, tried that from the -6 version the phone is on and no go. Some on that thread went all the way back to flashing 7 to get IMEI back. I have the IMEI in my notes, if there's a way to reprogram it into the phone.

I had fixed connectivity on the other phone by restoring an earlier EFS, so I'm at a loss as to how this happened. The partitions that worked hours ago don't work now when restored, nor do earlier backups.
[Moto X4 Questions & Answers] KrisM22:
dunno. I wouldn't have wiped the modems. did you restore the efs from the other phone? (don't)

I know of no way to program the efs into the phone but I haven't looked/tried so wouldn't know.

Okay, so if you now flash 6 and let it take 8 what happens.

Or if you flash -2 and let it take them all what happens.

I don't know of a 7 for the One fi. I suppose you could try flashing an early 8 but I have no idea what would happen.

I really have no idea what the best route would be for you to take.

Convince me not to buy a Sammy S8.
[Moto X4 Questions & Answers] redwoodie:
Fastboot getvar imei displays the true IMEI of the phone. So it's still in there somewhere.

Did not restore EFS from other phone.

To be clear, with that phone the connectivity would fail each time it rebooted, but connectivity would work again (for one reboot) after erase modems t1 and erase modems t2. If the phone battery ran down or a reboot was necessary while away from my computer I'd be phoneless.

Lolinet has a file called firmwares_fi.7z which contains these files, dated 2020-03-06:

NON-HLOS.bin

bootloader.img

fsg.mbn

gpt.bin

Maybe try flashing these, or at least NON-HLOS and fsg? -8 isn't up yet.

There is a 7.1.1 for Retail Payton, one of the guys on that thread used it but I'm not ready to ride that time machine. Oldest for Fi is 8.0.0.

I tried a dirty flash of -6 (over-6) with no change. My other phone is functioning on -4 but with failng updates. Might try a clean flash of -6 and/or -2.
[Moto X4 Questions & Answers] KrisM22:
I had not seen that zip. Somebody must have put it up 3 weeks ago. You could try it.

Dirty flash/clean flash - at one time for this phone I thought it made a difference but when i went back and did a clean flash, no difference, but a clean flash is always best - leaves no questions about residuals.

I suppose at some point you could try the 7.1.1 ... dunno. Everything with this phone is a guess. S8.
[Moto X4 Questions & Answers] akillenb:
I believe there's issues with Motorola's a/b implementation. Seems like issues mostly revolve around reboots, and I'm under the impression that the active slot changes on each reboot. I used to experience app issues sometimes that got solved with a reboot, and running on the "other" partition. Can't say I ever truly validated by doing an adb to verify the active slot, but I still suspect the issues are at least somewhat due to incomplete syncing or copying between slots. You would need to be able to do comparisons, or checksum matching to verify, but that's my guess.
[Moto X4 Questions & Answers] KrisM22:
Active slot def does not change with each reboot.
[Moto X4 Questions & Answers] redwoodie:
IMEI back after -6 flash and EFS restore but no connectivity

Flashed -6 again and still no IMEI. Restored EFS from yesterday's TWRP backup (the third try on that) and IMEI is now back but no connectivity. Phone sees bluetooth devices though. Wifi won't connect and MAC address is basically null, 02: and all zeros after.

What's different now is that doing the fastboot erase modems t1/t2 doesn't restore connectivity as it did before when it was lost (after reboots). Thinking something is buggered with fsg. I'm done with it for today but will revisit tomorrow, maybe restore fsg from backup..

As to the slots issue and failed updates, I believe OTA updates are failing because of bad residual data in the inactive slot. Residue from Magisk rooting maybe. Anyone tried switching slots, wiping and flashing fresh factory ROM in the inactive slot? Actually I surmise the inactive only contains /bootloader and /system, the rest is shared.
[Moto X4 Questions & Answers] redwoodie:
Connectivity, IMEI etc.

Tried a bunch of fixes today, all fails. Restored fsg from backup when last working. Reflashed NON-HLOS.bin. Tried switching active slot from A to B (fastboot set_active b) and flashing -6 on it, gives a bootloop then reverts to slot A and boots to initial setup screen. IMEI is now lost each time I flash a factory rom--I can restore it from that last EFS backup but it doesn't get me connectivity, either moble or wifi. Oddly, bluetooth devices are seen by the phone. MAC address remains null, though I discovered on the other phone that if wifi is not actually connected that's normal. Flashed -2 and same old same old.

I'm about out of ideas. Thinking Smith & Wesson can resolve this so I don't waste any more time on it.
[Moto X4 Questions & Answers] KrisM22:
Moto could re-write it but I don't think anybody's actually sent theirs to have them do it - probably $100 plus. Yeah, S&W, or just keep it for parts if you, like, break the display or something on the other one.

I have realized I have a problem. Was thinking about a vacation in Sept, but if at that point an update appears, and since I will likely be using wifi some (Europe), it will take it and apply it and become useless because I won't have my computer there to re-flash it. So I will get something else and not modify it (though if I buy used I have no guarantee that previous owner didn't) and hope for the best. I have an S8 on the way and will check it out to see if it has been modified, and even so if it's viable. (EDIT: it had not been modified - knox = 0) Sammy folks seem to have more extensive ways to recover junk (no fastboot stuff - Odin etc) but def won't believe it until I see it. I will always respond to your posts regardless though I am afraid I have little to offer. Once it's core gets screwed, it's junk. The joys of Pie on the X4. In any case, be well and have fun! Always feel free to PM me.
[Moto X4 Questions & Answers] redwoodie:
Lenovo Rescue and Smart Assistant ROM updating

I found the Windows software package Lenovo Rescue and Smart Assistant which has some updating flash tools. I used it on the no-connectivity phone, it found and downloaded the latest -8 May update (the full ROM, not the OTA). It automatically flashed it in Fastboot mode and it booted fine, but didn't help my no mobile/wifi problem. It seems I have a bad FSG or modem firmware from the TWRP backup restore I did a few days back. Now every time I flash any factory ROM I lose IMEI but I can get it back restoring the last EFS....but still no connectivity.

While the Lenovo tool didn't fix my problem it might be useful for updating working phones that won't take the OTA.

Somewhere in past factory firmware packages there must be a "core" firmware for modems. I'll keep looking, unless someone has an idea.
[Moto X4 Questions & Answers] redwoodie:
Regarding updates, the X4 Fi version released in October 2017 and supposedly receives 3 years of updates. So you may see some more updates. Apparently mine are never going to take updates without force feeding.

BTW I saw some Reddit and other posts about connectivity problems and other issues from users with the May -8 update.
[Moto X4 Questions & Answers] KrisM22:
Yes, the X4 will see more.

The S8 is going to be returned as its call signal strength reception is problematic - same thing I noticed with an SGS4G long ago, and googling tells me it is still a problem and I have about the worst apartment for it - concrete and new windows that block everything. Oddly the X4 works fine here - something I found with motorolas over many years. So is there a non-problematic used motorola???

Not taking it unless force-fed is not so bad a prob - at least it keeps working. and I don't think we really miss all that much by not taking an update...
[Moto X4 Questions & Answers] KrisM22:
would any of the files from my phone help?
[Moto X4 Questions & Answers] redwoodie:
Connectivity

I got the non-connective phone to get wifi and make calls again. I flashed -2 and then restored efs, fsg and dsp from an earlier (March) backup I found. Phone works but after reboot it goes back to that wifi cuts out every 20 seconds and no mobile state until I fastboot and do erase modemst1/t2. Exactly the same state it was in before I messed with it. IMEI/MAC address seem stable. Updates fail.
[Moto X4 Questions & Answers] KrisM22:
So don't reboot! ;) 10 cents please!

So after reboot do you again restore those 3?

I wonder why updates fail... OH... modified phone. (it's seeing it as ...) experiment with just efs, or efs+fsg. Assuming these backups are from the same phone.

OR: format data, wipe all appropriate, restore efs etc, THEN flash -2 .

But I really have no idea...
[Moto X4 Questions & Answers] redwoodie:
No, if shut it down I have to first fastboot/erase t1/t2, then OK as long as it stays on. Thinking has something to do with NON_HLOS.bin. I'll try something next session.

One thing, it is stuck on Slot A. The OTA would normally install Slot B. Something corrupted in that slot?
[Moto X4 Questions & Answers] KrisM22:
dunno... can you flash something into it? custom? Lineage?
[Moto X4 Questions & Answers] redwoodie:
Would love to read a guide on how to flash inactive slot. Haven't found one yet.

Read on another thread somewhere that the switch active slot function in TWRP doesn't work. True AFAIK, I tried it.

I've seen some flash scripts that begin "fastboot set active_b" and "fastboot flash modem_b NON_HLOS.bin" etc. with _b following each flash file. Probably the methodology but I'm wary enough to know when I don't know what I'm doing, I need the whole picture before I'll chance it.

I tried just the "fastboot set active_b" without changing any other lines and it flashed to a.
[Moto X4 Questions & Answers] KrisM22:
" If your active slot is A and you flash a custom ROM, you’re actually flashing to slot B. When you reboot, the active slot is now B. " from

https://www.xda-developers.com/how-...ess-updates-affect-custom-development-on-xda/

I do not know if that is true. but that takes me back to suggesting you flash Lineage, boot to it(don't expect it to actually work!), and then flash -2 and see what happens. avoid PE10 as it will hose your little partitions. The factory stock ROMs are set up to flash to a, but, yes, I don't know if setting everything to -b would result in something that boots....

nite.
[Moto X4 Questions & Answers] redwoodie:
If that's the case it would make sense you could 'fall back" to the stock rom in A...except, do the custom roms modify some/all of the small (and shared between slots) partitions?
[Moto X4 Questions & Answers] KrisM22:
That I don't know. I didn't think they did until I flashed PE10 and found out it did.
[Moto X4 Questions & Answers] redwoodie:
Reading further down in that post on A/B, there is sort of a thumbnail guide to flashing, but it is unclear whether it applies to all A/B devices or only Project Treble A/B's.

So /data and most of the small firmware partitions are common and used by "both" systems. Apparently bootloader and system are the parts that get flashed into the slots. To flash the "other" slot would I flash bootloader.img, boot.img, and system.img (all sparsechunks in order)? And what about the command: fastboot flash system_b system_other.img? Isn't that writing (some form of /system) to the "other" slot? It's a really small file compared to all the sparsechunks, 257mb. The X4 (like the Moto Z2 Force discussed in the post) has A/B slots but I read somewhere is likewise not full Treble.
[Moto X4 Questions & Answers] KrisM22:
I don't know. Never done it. Never actually SEEN full Treble.

I assumed that little file it flashed to b was something to make sure that b was "good" - "okay". But I really have no idea.

I would guess that setting up a bat to flash stuff to b would not cause any real problems since it's not flashing the little partitions, but that is just a guess.

There is a lot of info on XDA and elsewhere, but taking any of it as "fact" is a gambler's game. But it seems that since that phone is operationally useless, you won't lose by trying things...

But I still like the idea of flashing -2, booting to desktop, flashing Lineage, booting it to desktop, and again flashing -2 the usual way and seeing what it does - is b really bad or not, or is it really complaining about the contents of the small partitions vs your phones mobo?
[Moto X4 Questions & Answers] redwoodie:
My issues with flashing LOS are 1) I don't trust TWRP on this phone and 2) I read enough posts on the X4 LOS 17 thread to make me extra wary. I played with Randomblame's LOS build on XDA for the X Pure 2015 and it only got to be more or less usable after a year or more of builds. On my device TWRP will not restore Persist, it gives cannot open/tar fork error 255 and I don't know how to fix that. Mount the partition first in TWRP? Maybe the failure to restore persist is my fundamental problem. Haven't found any reliable info on what's in persist.

BTW this is also the same phone that earlier updated from -2 to -4, -5 (April 4 post this thread) and -6 But with -6 came the reboot loss of connectivity.
[Moto X4 Questions & Answers] redwoodie:
Just did a triple wipe data/cache/system in TWRP, then flashed -2 again. Phone took -4,-5,-6 with full connectivity and then bootlooped on 8. Ended up doing the factory reset.

Nice update, Moto--did you guys recently hire a bunch of coders from Microsoft Update team?
[Moto X4 Questions & Answers] redwoodie:
if this phone is truly working and stable I think I may decide to root it to prevent/control further updates. This -8 nuisance is a clusterf*#$&!
[Moto X4 Questions & Answers] KrisM22:
I agree, I don't like Lineage - was just suggesting using it as a box to occupy space.

I don't understand why wiping 3 times would make a difference, but maybe you have discovered something...

Not MS update team but their rejects.

Yes, if you took -8 you would have to factory reset/wipe data.

Not a bad idea to root it to block future updates. No loss.
[Moto X4 Questions & Answers] redwoodie:
Back in the XP days bad/broken updates from M$ were almost the norm. They seem to have improved, but at its core it's still a klugey OS.
[Moto X4 Questions & Answers] KrisM22:
klugy, yes, but it works(at least 7 and 8.1 for me) . By comparison, Ubuntu has a clipboard bug that has been around since at least 2010. Do a copy and do a paste with mouse and result will be either correct, previous, or nothing. Only way to be sure is use keyboard ctl+c or v, like in DOS 3.11 . And I was told Ubuntu Wayland desktop didn't have that error and it's true, however I have to mickey Mouse for a minute to get it to show the apps on the side bar and the app tray. POS.

EDIT: sorry, OT.
[Moto X4 Questions & Answers] redwoodie:
Spoke too soon. After a shutdown and reboot connectivity is again buggered, just like before today's fiasco.
[Moto X4 Questions & Answers] redwoodie:
I've never seen the clipboard bug you mention in Mint, using it since 2012. Just tried to reproduce it and no, copy/paste with mouse works great. ctrl+c & v work also. I use both.

I ditched Ubuntu when they did that Unity thing. Possibly hardware related--mouse driver? I have mice, touchpads, Logitech trackballs etc. all good. BTW we've drifted off topic here, continue on private?
[Moto X4 Questions & Answers] KrisM22:
No lets do this topic on email. I'll start it off with this as I immediately have questions!
[Moto X4 Questions & Answers] redwoodie:
So, my mystery of the day is how my phone could update and reboot 4 times with connectivity, plus several bootloop fails and a factory reset on the -8 update, then lose connectivity after the first post-update reboot. Obviously all is OK with the slots after 4 successful updates. Gotta be some firmware problem. I can still temporarily restore connectivity by erasing modems t1/t2. I assume after that the phone just rewrites them from fsg.
[Moto X4 Questions & Answers] KrisM22:
I do not have a clue but then I do not understand that wiping 3 times thing...
[Moto X4 Questions & Answers] redwoodie:
Just something I did to be sure it was really wiped...since it didn't work earlier with one wipe.
[Moto X4 Questions & Answers] KrisM22:
yes, I understand that, just don't understand why it would have made things different. but apparently it did...
[Moto X4 Questions & Answers] redwoodie:
All--according to a Reddit post, PPWS29.69-39-6-9 is pushing out to A1 Fi phones.

https://www.reddit.com/r/MotoX4/comments/hak7vl/june_security_update/
[Moto X4 Questions & Answers] redwoodie:
Factory firmware ROM

A couple of XDA resources have mentioned PPW29.69-39-2 referring to it as the Pie "firmware version." This post https://xdaforums.com/moto-x4/development/rom-moto-x4-t3890346 has a "firmware only" version of this ROM and a tool for flashing A and B slots. https://www.androidfilehost.com/?fid=1395089523397969832 So, contrary to what I thought, it seems firmware/modems DO reside in both slots. Thinking this might fix my connectivity problems. I PM'd the OP to ask if this might help. If no response I may just flash it. Stay tuned.
[Moto X4 Questions & Answers] KrisM22:
I have looked at it - not sure what it is trying to do, can't advise you - not sure you have anything to lose, though.
[Moto X4 Questions & Answers] KrisM22:
It happened again. I am talking and suddenly the other person can't hear me. That has happened many times with this phone. I have always been using BT headset so assumed it was that. Ideas? New BT headset? Use wired headphones? Just use phone? Trash this phone and get a different one? I am torked.

Mint is going well. UEFI/GPT. Just used Boot Repair Disk to uninstall Ubuntu.
[Moto X4 Questions & Answers] redwoodie:
I've gone through numerous bluetooth headsets in recent years. Batteries were the main fail but I had sound problems on some, like raspiness and static. Been using Moto H3730s as it's the most comfortable I've found and has voice prompts. I can't wear the ones that stick into my ear. Maybe try another one.
[Moto X4 Questions & Answers] KrisM22:
am not finding h3730 typo?
[Moto X4 Questions & Answers] redwoodie:
Now discontinued. I'm not sure what model is the successor but they made a lot of that style...I see some H730s on ebay, but new/old stock ones seem to be spendy. Look at the pictures then see what the current models are.
[Moto X4 Questions & Answers] KrisM22:
Thanks. I shut off the X4 and now using old G3. Found old m50 Plantronics. Will try that combo. Keep eyes out for Moto.

Liking Mint! Thanks!
[Moto X4 Questions & Answers] KrisM22:
I have ordered a second X4 to use as a spare. I haven't decided yet whether to root and disable update as I did before, but it is a definite possibility. Having the new version of that Repair and Smart Assistant changes things. EDIT: one thing I WILL do is boot to TWRP and back everything up.
[Moto X4 Questions & Answers] KrisM22:
I just (TWRP 3310) backed up my X4 (to be clear, I do not back up system, data, or system image - just all the rest)(about 0.7GB) (I THEN copy it to my PC)

But to clarify: because you had good phone then bad phone: that if you backed up EFS when your phone was behaving, THEN, you could later use that very same backup to restore EFS to your phone when it was MIS-behaving, and make it behave. ? Fantastic! and interesting!!!!!!! The "why" we will never know, but very useful to know!

EDIT: so modem t1 and/or t2 are modifying EFS on the fly on reboot?????

EDIT2: it's thinking it's out of sync?????? and trying to correct it and screwing things up???

Great catch!!!
[Moto X4 Questions & Answers] redwoodie:
Remember that the erase modemst1/t2 commands are part of the flashing script for all the factory ROMS, and are run AFTER the modems are flashed. I think after doing that it takes the FSG stuff and restores it. Why it's necessary after a factory flash, dunno.
[Moto X4 Questions & Answers] KrisM22:
My guess would be that it erases the data so that on the first boot of the new ROM modems can detect that it is blank and interrogate the radios to see what is on this mobo.
[Moto X4 Questions & Answers] KrisM22:
I agree - I have no idea why they use erase modems. Just one of the reasons that initially made me very leery of X4 mods!!!

Since it is a One/fi, as long as you flash with a one/fi Pie ROM it would be "okay". I wouldn't flash it with a non Fi ROM or a non Pie ROM. The latter would be sure disaster.
[Moto X4 Questions & Answers] redwoodie:
I got the wifi, phone and mobile data connections back by flashing a backup I made earlier of EFS. Still in an install fail loop with the Jan 1 update, though now it's failing at 90% instead of 20%. Later I'll flash the new firmware complete and hopefully be back to "normal".

The modems erase thing is mentioned here: 3

EFS, MODEMST1, MODEMST2, FSG, BACKUP

These all are related to IMEI; a unique number used by GSM networks to identify and trace a mobile phone.

EFS may contain hardware info like configuration files, WiFi/BlueTooth MAC’s, IMEI (or ESN for a CDMA based device) etc.

EFS and MODEMST1 may be a single partition on some phones.

FSG (FileSystem Golden copy) and BACKUP are backups of MODEMST1 and MODEMST2 respectively. If MODEMST1 or MODEMST2 are erased (by wrong factory flashing say) and phone notices an invalid partition, FSG and BACKUP will be restored.

MODEMST1 and MODEMST2 also contains modem firmware files.

So, after 'erase modemst1/t2," apparently they are automatically restored from fsg.mbn...?

Begs the question, why did the modems get flashed earlier?
[Moto X4 Questions & Answers] KrisM22:
That link certainly leads to a bunch of info...

How did you back up your EFS stuff? I used to do that with a special twrp when I didn't want to mod to root.

You seem to be getting closer.

So if devs of custom ROMs are modifying someone's X4 so that it can't be flashed back to working stock...

so is it the missing/moved EFS stuff, or a changed file system? or what... I suppose we may never know, but kinda makes me want to break an X4 and see if I can get back. No, I won't - don't have the time or extra $100.

Keep trying!