yashsingh1/xdaforums huggingface dataset:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Thallys Batista:
1. To unbrick your Moto X4, Download Motorola Device Manager here and install it on your PC.

2. Download HS-USB Driver here and install it on your PC.

3. Download the appropriate Moto X4 firmware for your device variant.

4. Now, extract or unpack the Moto X4 stock official firmware you have downloaded from the step 3 just above here.

5. Connect your Moto X4 to the PC and hold on while the drivers are being installed. If the drivers installation is successful, proceed.

If no sign of drivers installation is seen or noticed go to:

Windows Device Manager >> COM Ports...

And expand it. If your device is listed as HS-USB QDLoader, HS-USB DLoader 9008 or any other, proceed. But if it is listed as QHS-USB Bulk, do this:

Disconnect your device from the PC.

Uninstall the drivers.

Restart your PC.

And re-install the HS-USB DLoad Drivers again.

Connect your Moto X4 to the PC again.

Now, check Windows Device Manager, your device should be listed as either HS-USB QDLoader, HS-USB DLoader 9008 etc.

6. Download, extract / unpack the Moto X4 Blank Flash file onto a folder on your PC.

7. Open the Moto X4 Blank Flash folder and Double-click the blank-flash.bat.

A Command Prompt window will open and that should detect your Moto X4 connected.

8. Wait patiently while the flashing is being done until it completes.

9. Your device should now reboot to bootloader. If it does not, boot it to bootloader using the key combo.

10. Now, in bootloader>recovery mode>

11. In lineageos recovery select reboot

Font: https:/ /w ww.aryk.tech/2017/09/moto-x4-unbrick-solutions.html?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] amirite:
Welp. Looks like I made the right decision to hold off on that OTA the other day then :P
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] lazy-o:
Do I really need to do a factory reset everytime I update this ROM? Everytime I try to update overwriting the last week version the play store disappears and all the other google apps crash all the time. I used to do this dirty install on my Moto X2 without problems and I thought it would be the same here since both are running LOS
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] valeriopastore20:
you have to flash gapps too
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] lazy-o:
after realizing I didn't have the play store anymore I flashed gapps and still got the crashs. I had to do a factory reset
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] MotoX4:
This is normal and technically, accurate. When you first wipe your phone clean there is no OS on your phone and this message is warning you (correctly so), that if you do a complete bootup, you'll just end up at your bootloader screen since your phone has no OS to load. It is not something to worry about, since if you continue to follow the steps in my guide, once completed, you will have an OS. Your ROM that you eventually install is your OS (operating system), in this case, Lineage 15.1 which is a customized version of Android 8.1.

I hope that answers your question. But I do digress, it is not something for you to particularly be concerned with since you should be following the full guide and once completed, you'll have an OS (Lineage 15.1) installed.

---------- Post added at 08:29 PM ---------- Previous post was at 08:23 PM ----------

YES, again, please read the full guide provided. ;)

After installing Lineage OS, you can install TWRP (using the zip file) directly after and this will allow you to have both.

Again, please read everything in detail before proceeding. I find most folks who have issues or concerns are the few newbies who do not read everything and blindly follow step by step, not actually absorbing anything and just going on at a whim. This isn't how you learn anything and most importantly, you may easily get lost or confused, because during the full read, you'll learn that you have choices and if you're just blindly following 1 step after the next, without first reading ahead, you may find you missed out on your choice or you may wrongfully do something you shouldn't do together.

The big take away I'm trying to push on you here and anyone else who reads this is you should always read ahead and attempt to understand what you're getting into, before blindly jumping. ;)

---------- Post added at 08:34 PM ---------- Previous post was at 08:29 PM ----------

Just 1 last follow-up, since I see you have been quoting bits and pieces. The full, easy to follow, instruction guide can be found here https://xdaforums.com/showpost.php?p=77703386&postcount=472 As previously mentioned in my previous reply to you. ;)

---------- Post added at 08:42 PM ---------- Previous post was at 08:34 PM ----------

Quick shout out to Dave for his cool tip. You're right, while PHP Code looks awesome to highlight things, it was not readable on the dark theme here. Also, thanks for the tip that centering my code in my guide would make it easier to read on some mobile devices. Good advice! :D
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] CJ1169:
This should help most people who are having their devices bricked. Mine does not seem to respond at all and remains bricked.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] boyscout61:
I was wondering if anybody (besides me) has observed the device not going to deep sleep mode after 24 hours of normal usage? It doesn't seem related to charging, nor to using any specific app. I am monitoring with CPU Spy, within the first day everything seems fine, just after 24 hours it continues to idle at the lowest CPU frequency (787 Mhz). Tried killing various apps to track it down, but no success so far.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Toboe3:
For others with the problem, i can second this working with some hiccups, see rest of the post.

i think only blankflash.sh as root/sudo is needed.

If you do it again with "--debug=2", do you see it going:

[ 0.000] Opening device: /dev/ttyUSB0
[ 0.000] Opening serial device: /dev/ttyUSB0
[ 0.000] serial_open():228: opening /dev/ttyUSB0
[ 0.000] Detecting device
[ 0.000] Switching to command mode
[ 0.000] Receiving HELLO packet
[ 11.183] Retrying

(and so on until fail)

?

I had that problem, https://xdaforums.com/moto-g4-plus/help/solved-unbrick-hard-bricked-dead-t3585016 has the solutions:

[LIST=1]
[*] press (and keep pressing) power+vol down (as if trying to boot fastboot)
[*] (still holding) start the script with --debug=2
[*] once you see a wall of text scrolling past you can let go of the buttons
[/LIST]
It can still have problems, if it tries to write something, pauses, tries to write the same, pauses ad infinitum you have to restart the process.

If/Once the script runs through just try to boot normally after.

Mine only had 17% battery once i could start it, (must have been ~80 when i ota'ed) so maybe the emergency download mode (as qboot calls the brick in list device) drained the battery and got weird once it felt it had too little left.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] CJ1169:
Its certainly worth a shot. I'll attempt that when I get home. I did get some other errors when I tried holding down the vol down and power buttons, but it still did not work. Where should I add the --debug=2 line?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] TheBassDude:
For anyone wondering how to apply updates without bricking your device and/or fully wiping and restoring to stock first, this method has now worked for me on the last two updates.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] CJ1169:
Weirdly enough, that actually got me into bootloader! Thanks so much!

The only thing I did differently was the debug part of the script.

---------- Post added at 16:44 ---------- Previous post was at 16:40 ----------

I could be wrong about this, but I believe you need to flash gapps before first boot otherwise you'd have this issue.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Prayas29:
Hey i am on 20180918 build and want to update to the latest. Will the above method work for me. I'm a bit skeptical to update due to everyone saying that updating bricked their device.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
Yes. These are the proper steps to update. Similar to the steps on the OP, but you don't wipe data.

The bricking issues were with the built in (seamless) updater. This is the traditional way to update. Of course, proceed at your own risk. :cool:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Thallys Batista:
This is the only way that work for my XT1900-6, your device remais bricked? Contact me and I will explaing the tutorial for you. It really works!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] joshdsy:
Hey I recently picked up a moto x4 xt1900-02 aka retin is this supported or is this rom only for payton
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] abrfilho:
Moto X4 is payton, your phone is supported.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] steveeJ:
SIM2 disabled on lineage-15.1-20181009-nightly-payton-signed.zip

I'm trying out lineage-15.1-20181009-nightly-payton-signed.zip and can't get SIM2 working.

On bootup, the phone prompts for a PIN for SIM1 but not for SIM2. SIM2 cannot be enabled in the settings as the button is grayed out. SIM1 seems to work properly.

Please see the attached logcat.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] lazy-o:
the question is: could I just do a dirty install then install gapps and everything is ok? Having to do a factory reset, install every single app and config everything again on the phone is a pain in the ass
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
I believe a dirty install, followed by gapps before boot should work. Should be easy to test - let us know!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] CJ1169:
I did end up getting it unbricked.

---------- Post added at 05:35 AM ---------- Previous post was at 05:33 AM ----------

If you use recovery to dirty flash and then gapps (+magisk) should be ok. I used the built in updater since that's the traditional route and what I was used to with LOS/CM/etc.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] joshdsy:
hey

How much storage is used by lineageos +gapps install the stock seems quite bulky at 13-14 gb
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Droidge:
LineageOS and GApps, or for that matter any Oreo ROM, will take about the same space. It’s about the A/B partitioning business and vendor blobs more than the OS itself.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Toboe3:
Sorry for the delay in answering, in case others with similar problems could still use the info: the debug would have been "sudo blank-flash.sh --debug=2"
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] erfanoabdi:
guys plz install new version with twrp

https://mirrorbits.lineageos.org/fu...neage-15.1-20181017-nightly-payton-signed.zip

here OTAs could be fixed, we'll see in next week

thanks for your patience
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] edhunterbg:
Is sim2 issue fixed in the new version?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mikib1:
OTA update problems

Again , thanks you working on moto x4....

If I may ask , I have that kind of problem...

Ok, today i had the same problem with OTA update like two or three weeks ago the phene crash. I know it is a problem to fix it, but I think I have more problems than that. Today after flash update via OTA (not via TWRP) the phone reboot in to the bootloader mode but unusually. Screen looks like no normal bootloader. My TWRP from the begining have problem to change slots and after backup is wroted backup failed (backup is counted for 14 GB but in folder I can find only 7GB (like half of the backup from one slot) after today soft brick in a console (cmd) was written that bootloader fail and there is no correct partition . I was no able to change slots in command line (cmd) (fastboot --set-active=a or b ), I decide to use only command "fastboot flash partition gpt.bin" and use file from stock Oreo 8.1 PAYTON_OPWS27.57-40-14_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip. Phone was able to boot normally and even had updated system. I had also reflash TWRP, and addon SU. Bat my main question is Why my TWRP do not want change boot slots and OTA also (I think ) do not recognize this correct and may breaking update.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] ttoe:
Got a brand new Moto X4 delivered today. Verified nothing was obviously broken (tried WLAN, Cell, Dual SIM from stock). All fine.

Then I installed last night's nightly "lineage-15.1-20181017-nightly-payton-signed.zip" from within TWRP. After installing the nightly, I went with reboot recovery.

Since then, the phone appears hard-bricked as described by halori above.

No lights, no activity. Had it on charger most of the afternoon and all evening. No signs of life. No matter how long I pressed VOLUMEDOWN+POWER. Same thing if I only press POWER. Same thing if I try charging it for 10-20 minutes, then try switching it one. Neither of the methods works.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] halori:
Got a new Moto X4 1900-7 two days ago (reteu channel). Unlocked and rooted with MAGISK 17. Yesterday installed LineageOS 15.1 (Android 8.1 was shown) as described here. AddonSU and MindTheGApps did not work as install from the LineageOS Recovery. So installed them via TWRP.

Today it showed there is a new update for LineageOS. It seemed a good idea to test the update channel. LineageOS downloaded, installed and I pressed the reboot button. Since then the device does not switch on anymore. Just nothing. No lights, no booting screen. Looks fairly hard bricked now.

It is a bit frightening since I made good experiences with LineageOS on Moto X Play for years.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] abrfilho:
OTA updates had a problem, the dev fixed it (or not, need next OTA to check if it's fixed).

To unbrick you could try this method:
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] xdacinq:
can confirm, OTA bricked.

Fix: read text above #635 https://xdaforums.com/showpost.php?p=77905869&postcount=635

use blankflash from https://xdaforums.com/showpost.php?p=76918099&postcount=7&nocache=1

Press Volume - and Power and blank-blash.bat

after success: fastboot --set-active=b like https://xdaforums.com/showpost.php?p=77760388&postcount=531

erfanoabdi thank you for your work!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Knuxyl:
I just bought a XT1900-1 A1 the other day.

I installed LOS soon after and everything was working fine like VoLTE.

Now after trying a couple of roms like AEX and RR, I've switched back to LOS but I cannot get VoLTE working. I put my sim back in my Verizon phone and VoLTE worked without a problem.

I checked engineering menu and the phone is VoLTE provisioned, and there is option for Enhanced 4G in the Mobile Network menu, but it does nothing.

Sometimes I get the LTE+ symbol up top but when I go make a call it drops the LTE and uses CDMA network.

Any ideas?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] dougo007:
An idea?

Fair warning: I am not a developer nor do I have this phone for testing. I only have some basic skills in this subject (roms ect.).

That means you should backup anything important first and only attempt this if you feel that it is necessary and/or you're ok with having to go back to stock and do everything all over again.

If I am not mistaken, isn't Verizon and Sprint both CDMA?

So would this work?

https://xdaforums.com/moto-x4/how-to/fix-4g-lte-data-sprint-lineage-base-gsi-t3834631

I can take a wild guess as to the Verizon APN by searching the internet, but I would expect that you know better.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Knuxyl:
Well since I did not have this problem initially, I didn't want to try that thread because I didn't do anything that would've affected what that thread changes.

I did end up fixing it though. Here's what I did

I have the XT1900-1 Android One (Fi) version

I put phone in bootloader and fastboot flashed the stock rom for the Retail version (I thought I had retail, this was a mistake)

XT1900-1_PAYTON_RETAIL_8.1.0_OPWS28.46-21-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

The phone worked fine (even VoLTE) but I noticed there was a ton of Moto bloatware and realized I had the Google Fi version so I flashed that stock image

PAYTON_FI_8.1.0_OPWS28.46-21-12_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

I then rebooted and did everything to install LOS and since first boot everything is working fine. I even managed to get Voice Calling provisioned however when trying to make or receive a video call it instantly hangs up. That's the furthest I've got with any of my phones, it actually triggered Verizon to recognize I have video calling because I got an email saying my service was changed (+voice calling $0.00). VoLTE still works across power offs and restarts. So I don't know exactly what went wrong.

I noticed the A1 and Retail images also have different modem NON-HLOS.bin files. I'm not sure why there would be a different, the image versions are very close, but I should be using the one the phone came with now.

So I'm thinking if VoLTE stops working, just flash your stock image, and flash LOS again. The flashing retail was a mistake and I doubt it had anything to do with this.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Demoniackers:
The battery is quickly discharged in Lineage os 15.1.

Any solution?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Doranku:
No sound in calls

Decided once again to upgrade from the first early hacks on 7.1.1. Directly from 7.x the image fails to complete the setup process, some process keeps crashing. Flashing 8.1 (and confirming it works on my xt1900-7) and then flashing LOS the setup works fine. But sadly I have no audio during phone calls, audio is dead at both sides of the call. Also tried a B.T. headset but the problem remains. I'm not seeing anybody else with this problem. Any pointers to what might be the problem or what I can do to supply debugging information?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mikib1:
No one suspect why my TWRP 3.2.3.1 do not want to change boot slots?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
Not sure why, but it is broken on the latest versions. Slot change works in twrp-payton-3.2.1-1, but that version does not work with encryption.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] ptn107:
You can manually use

fastboot --set-active
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] mikib1:
Ok thank you for answer, I just want to be surre if I made somethink wrong or, (what I suspect ) the TWRP have a problem to do that. Thank you again.

---------- Post added at 03:45 PM ---------- Previous post was at 03:41 PM ----------

Thank you to, I knew that it is the way, but sometimes I have only TWRP , thats why it boders me. Thank you for answer.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] smmankad:
Thanks for the steps summary. Question: does blankflash allow Google Pay to work after (in stock)? Or is that still broken with the unlocked BL?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] abrfilho:
You can use MagiskHide from Magisk to make Google Pay work.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] smmankad:
Thanks, that's what I've been doing, but Magisk breaks stock OTAs. Anyway :)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] bamaredwingsfan:
I like to purchase audiobooks in the play store, will I still be able to buy and listen to the books if I root and ROM my phone
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] abrfilho:
I'm not sure, I think you'll be able to do that using Magisk Hide.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] bamaredwingsfan:
Thanks, I've been debating jumping in the ROM game, I've been missing out.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] sbrzezin:
Hi,

I make a clear install of Lineage 15.1 + MindTheGaps on my Moto X4. Now, if I make a phone call, I can't hear the person I call to, and vice versa. Remarks: if I type during the call on numerical keypad a digit, someone can hear the DTMF tone, but it doesn't work in opposite direction. I hear nothing on moto x4.

Has someone any suggestion what can be wrong?

Thank You in advance.

Sergiusz
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] amirite:
Just be sure to check the SafetyNet status in the Magisk Manager app often after you root. AFAIK this will ensure that most things work. And then yes - also Magisk Hide within that app will help for certain cases.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] david pro:
Does Google Pay and Xposed work?
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] jhedfors:
Google Pay works with Magisk. Am not using Xposed.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] amirite:
Google Pay works but Xposed does not. Xposed in any form trips SafetyNet.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] Thallys Batista:
The new update of today 23 is working? (via ota)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] JensKuehnel:
I'm also interessted in the result. After 3 broken updates, I don't want to lose access to my main phone again. ;)
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] abrfilho:
Apparently it's not working yet, the dev will try more fixes, you can update via dirty flash without a problem.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] TadMSTR:
Buying books in the Play Store doesn't use Google Pay as far as I know. Google Pay is for NFC payments. Most things in the Play Store don't check if the phone has root. Apps with DRM or anti-cheating are the ones that check for root. But as others have suggested if you need to you can hide root in Magisk for the apps that do check. Hiding root is done per app so you just check off the ones you want to hide root from.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] FTL_Ian:
Google Fi Baseband on Lineage OS?

Hey y'all. Is your Google Fi working correctly? I was driving through an area the other day with a friend who does not have Lineage OS on his Google Fi phone (though he's got a Nexus 6) and I had no signal and he had 3G via US Cellular. I was unable to use signal spy to force the phone to jump to US Cellular. Made me wonder if I was on the latest baseband for Google Fi?

My Baseband is M660_7042.27.01.74R

Is that the latest? Does that get updated as Lineage OS receives updates?

Also does anyone know if signal spy works with Lineage OS for force switching cell providers? I've tested it only a couple times and haven't really seen it successful.

Thanks for your input!
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] FTL_Ian:
I did find a recent post where someone says the baseband for the Google Fi version of the phone is indeed the one I posted above:

https://xdaforums.com/moto-x4/help/difference-a1-retail-versions-t3855820

However I'm definitely having trouble switching to both US Cellular and Sprint towers and both should be available here in Keene, NH.

---------- Post added at 11:53 PM ---------- Previous post was at 11:47 PM ----------

Ok, there weren't many results for "baseband" or "towers" on the search, but searching for Sprint I did find a thread where others are saying US Cellular and Sprint do not work with Lineage OS. That's unfortunate. Half the purpose of Fi is to use different providers to maximize access. I'm bummed I may have to go back to stock if there's no fix available.

Here's the thread where Sprint access is discussed: https://xdaforums.com/moto-x4/how-to/fix-4g-lte-data-sprint-lineage-base-gsi-t3834631

Apparently there is a fix for Sprint-only phones, but it doesn't work for Google Fi.

:(

I would love to stick with Lineage OS. Darn.
[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] MotoX4:
I notice a few ROM's (not just Lineage OS) seem to not 100% change correctly between networks. However, I found an app which may help. The app found on Google Play Store is called, "4G LTE Switcher ( no ads )" It is a free app too. This seems to have resolved such issues on my end.