yashsingh1/xdaforums huggingface dataset:
[Moto X4 Guides, News, & Discussion] nogods:
I've rooted four moto x4's with twrp and magisk with no problem. I wanted to unroot one of them but can't get flash to work. When I use flash-all.bat I get the follwoing

C:\MotoX4Unroot\PAYTON_FI_28-46-21-16>flash-all.bat

(bootloader) max-down: not found

(bootloader) is-logical:partiti: not found

Sending 'partition' (37 KB) FAILED (remote: 'unknown command')

fastboot: error: Command failed

(bootloader) is-logical:bootloade: not found

Sending 'bootloader' (9520 KB)

I tried using moto's Rescue and Smart Assistant - it "rescues" to about 68% then stops with a "Flash Failed" message.

Any ideas? I tried uninstalling magisk, which then "unroots" the phone, but I still can't flash an updated official rom.
[Moto X4 Guides, News, & Discussion] Dagur:
I flashed my phone and now the PIN is required (I was using patterns before flashing). Do the images have a default PIN or did I have one before that I forgot?

Do I need to wipe my phone now or is there a way around this?
[Moto X4 Guides, News, & Discussion] ag-android:
Bricked? Can't set current slot

My apologies. I just realized it would be better for me to start a new thread with my issue.
[Moto X4 Guides, News, & Discussion] SteveHebe:
Munchy-cool...You really are da Man! I made a mess of my X4 and your videos and guides really saved my butt!

Thanks so much for what you provide!
[Moto X4 Guides, News, & Discussion] Dukenukemx:
I just flashed my Moto X4 to stock using the US Retail Android 9.0 Pie rom, and I have no wifi. I haven't tried cellar connection as I haven't put my sim card in yet. In Bootloader mode it shows "Baseband" <not found> . I tried these commands both for modem_b and modem_a. I installed LineageOS onto 'B' and my phone is XT1900-1 64GB P4. What did I do wrong?

fastboot flash modem_b NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot reboot
[Moto X4 Guides, News, & Discussion] Dukenukemx:
I fixed my problem by flashing the retus rom. There should be a guide that helps determine what rom you have so you don't do what I did and flashed the first thing you found. These roms are not interchangable between different versions of moto x4 as I lost my wifi and radio due to this.
[Moto X4 Guides, News, & Discussion] vortexmak:
Isn't the RETUS ROM on lolinet, the same as the Android ONE ROM.

I had a different Non Android ONE ROM but when I flashed the RETUS ROM from LOLINET. IT turned out to have the Android ONE boot logo which wasn't what I had earlier
[Moto X4 Guides, News, & Discussion] kcv_earner:
Since the firmware has been obsoleted on lolinet, you might want to look here:

lolinet mirrors - firmware, software, iso etc.

lolinet mirrors - powered by h5ai

mirrors-obs-2.lolinet.com
[Moto X4 Guides, News, & Discussion] bluestang:
I currently have the Android One (Google Fi) version with Pie and Oct 202 security patch. I want to flash to the Retail version for a feature that is not available on the A1 version.

Two questions:

1) I can flash this Retail Image to it?

2) I have to unlock the Bootloader first in order to flash to the Retail?

Also, if I can flash A1 to Retail will I then be able to get the OTA update to the latest Oct 2020 security patch again? I assume I'd have to re-lock the bootloader in order for the OTA to work?

Thanks!
[Moto X4 Guides, News, & Discussion] tormin:
If following these instructions on a PC you may have to use mfastboot for flashing. I had to at least on Windows 7.
[Moto X4 Guides, News, & Discussion] EudeRabelo:
MBM3.0 do moto X4

Como eu consigo a mbm 3.0 do moto x4 pra tirar a mensagem de desbloqueio do root, ou tem vomo copiar de um outro celular bloqueado?
[Moto X4 Guides, News, & Discussion] jhedfors:
Sorry, but forum rules are English only.
[Moto X4 Guides, News, & Discussion] EudeRabelo:
Do you know any method to learn English?
[Moto X4 Guides, News, & Discussion] jhedfors:
LOL. Sorry, but a lot of people use Google Translate.
[Moto X4 Guides, News, & Discussion] mujju85:
Is it compulsory to unlock bootloader to flash 8.1 update
[Moto X4 Guides, News, & Discussion] vorryn:
(bootloader) Invalid partition name system__a when i try.. suggestions?

moto x4 amazon version
[Moto X4 Guides, News, & Discussion] munchy_cool:
you can try sideloading the OTA in recovery.
[Moto X4 Guides, News, & Discussion] munchy_cool:
Amazon version has a locked Bootloader AFAIK.

PS:- partition name is system_a and not __a
[Moto X4 Guides, News, & Discussion] :
I read that it is impossible to return to completely stock (no root) with working Google pay after the bootloader has been unlocked is that right ?
[Moto X4 Guides, News, & Discussion] munchy_cool:
I dont use Google Pay, nor do I stay on stock so I cannot help you there. We will have to wait for someone else to respond.
[Moto X4 Guides, News, & Discussion] vorryn:
correct so anyways

it writes to system b but not A.. thoughts? am i worrying about nothing?

my bootloader says unlocked
[Moto X4 Guides, News, & Discussion] vorryn:
so FASTBOOT does not flash correctly and labels the incorrect system to write too as I copied and pasted before and was corrected . I didn't typo that. fastboot said that.

added mfastboot and flashes perfectly with no issues and resolved the problem.

so if you have an issue flashing, use mfastboot
[Moto X4 Guides, News, & Discussion] munchy_cool:
added Dec 2017 fastboot version to OP. thats working fine.
[Moto X4 Guides, News, & Discussion] vorryn:
cool for me it didn't BUT thanks! i'm just glad using the mfastboo works.
[Moto X4 Guides, News, & Discussion] munchy_cool:
I used the Mac version a few days back after getting __ in the latest fastboot and it worked fine for me. Windows version worked fine for one of my YT subscribers.
[Moto X4 Guides, News, & Discussion] Weevill:
My phone is currently rooted and running android 8.0. When I try to run the script to get back to stock this is what I get:

PS C:\platform-tools> .\flash-all.bat

(bootloader) max-download-sizertition: not found

sending 'partition' (37 KB)...

FAILED (remote: unknown command)

finished. total time: 0.003s

(bootloader) max-downlo: not found

sending 'bootloader' (9520 KB)...

What could the problem be?

Edit: I tried the mfastboot method here https://xdaforums.com/moto-x4/how-to/flash-android-one-firmware-to-unlocked-t3744283but its not working for me either. I get this message:

PS C:\mfastboot> .\mfastboot flash partition gpt.bin

target max-sparse-size: 256MB

sending 'partition' (37 KB)...

FAILED (remote: unknown command)

finished. total time: 0.003s
[Moto X4 Guides, News, & Discussion] munchy_cool:
dont have to type ./ for windows users.

use fastboot linked in first post.

check if device is detected

fastboot devices
[Moto X4 Guides, News, & Discussion] abrfilho:
He might be using Power Shell instead, the .\ is necessary in that case.
[Moto X4 Guides, News, & Discussion] munchy_cool:
then he needs to mention that ..I am not god to know what app he's using.
[Moto X4 Guides, News, & Discussion] munchy_cool:
please read OP.

Download fastboot version linked in download and replace the one you have.
[Moto X4 Guides, News, & Discussion] z550:
quick question:

i have the XT1900-2 variation, if i open the bootloader and install the latest android ONE version will i be able to get future updates through OTA?
[Moto X4 Guides, News, & Discussion] munchy_cool:
not sure on that.
[Moto X4 Guides, News, & Discussion] jsis83:
No. Only software channel retus.

Enviado desde mi moto x4 mediante Tapatalk
[Moto X4 Guides, News, & Discussion] gorgatron:
i fixed my reply but how come i cannot do system updates when i get twrp installed. i had magisk but i removed it because having root didnt let me download apps
[Moto X4 Guides, News, & Discussion] anas214812:
Does USB working in PC?
[Moto X4 Guides, News, & Discussion] munchy_cool:
yes, but i cannot confirm for your PC. You need to check that.
[Moto X4 Guides, News, & Discussion] anas214812:
worked till initial setup then NO. is there any OTA file for May(retail).
[Moto X4 Guides, News, & Discussion] munchy_cool:
enable usb debugging, connect phone and accept the rsa notification on phone.

dont know about May update.
[Moto X4 Guides, News, & Discussion] anas214812:
I have tried this way...phone not detecting in any mode but in ADB it detects and works ..

I have seen that Motorola acknowledge this issue and they have fixed it on May update..let me know if you have any source of OTA for May.

Thank you in advance
[Moto X4 Guides, News, & Discussion] tomtom_38:
this thread save my ass.

But now I have the problem that I cant flash twrp, is it up to the encryption or the usb adb oreo isseue.

I use teh Android one version from this thread

the follows messages appears:

target reported max download size of 536870912 bytes

sending 'recovery' (26556 KB)...

OKAY [ 0.828s]

writing 'recovery'...

(bootloader) Invalid partition name recovery

FAILED (remote failure)

finished. total time: 0.836s

What I have to do?

many thanks
[Moto X4 Guides, News, & Discussion] munchy_cool:
we dont have recovery partition. fastboot the twrp img and then flash the twrp zip.
[Moto X4 Guides, News, & Discussion] tomtom_38:
ok I boot twrp and then I have to install twrp with twrp!?

is it right?
[Moto X4 Guides, News, & Discussion] munchy_cool:
yes, boot into twrp and then flash twrp zip
[Moto X4 Guides, News, & Discussion] Comby_sk:
Are these commands necessary?

fastboot erase carrier

fastboot erase userdata

fastboot erase ddr
[Moto X4 Guides, News, & Discussion] munchy_cool:
try without them if you want to.
[Moto X4 Guides, News, & Discussion] jugoslavpetrovic:
Hi guys.

I am very new to anything for Moto X⁴.

I need to know some stuff before I make myself cry, lol.

I used to play a lot on Nexus 5 and 5X and those are kind of different from this in therms of development material and flashing process and possible variants, a/b partitions...etc.

Mostly I have concerns about variants and compatibilities between them for roms. Also is there something that I really need to know about a/b partitions for flashing routines and warnings?

I still have everything stock locked and updated to latest 8.0 for my variant XT1900-07

And somewhere I got some later factory image which is

"PAYTON_AMZ_OPW28.46-21_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip"

Is this compatible with variants?
[Moto X4 Guides, News, & Discussion] Comby_sk:
No is not. AMZ is Amazon version (contains Amazon Alexa), FI is Google project FI version (android one), RETAIL is Motorola branded version. You need retail image for XT1900-7, but XT1900-1 image sold in US works on XT1900-7.
[Moto X4 Guides, News, & Discussion] tomtom_38:
[MENTION=4543295]Comby_sk[/MENTION] Have the us image German language?

Work ota updates with android one version or with the us
[Moto X4 Guides, News, & Discussion] jugoslavpetrovic:
Thanks a lot. And should I consider Android One as possible for this variant? Any pros and cons?
[Moto X4 Guides, News, & Discussion] Comby_sk:
Android one is possible for XT1900-7, but future OTAs will not work. Android one X4 has software channel retus, but XT1900-7 with FI image has software channel reteu whitout android one OTAs. Is possible flash android one via fastboot every month with newest security patches, when new images will be public.
[Moto X4 Guides, News, & Discussion] jugoslavpetrovic:
All right. Thanks a ton for clearing that for me.

By that I understood that I am able to flash 8.1 US variant found in OP without issues?

And, if I root it where I can reach the updated tutorial on how to manage OTAs with root in painless way?

I wasn't lucky to find some custom ROMs that is updating regularly. There seems to be PIE Android ONE I have read somewhere I think, but I am not so freaked out about PIE so much but maybe I would like to try that kind of lite OS and being able to recover to stock or another custom rom easily. 8.1 seems fine as well but would be great to get some nasty features in rom like smart navbar and some other popular, lol. Any suggestions for custom roms and kernels? Wierd that such a great device is not very supported like older Nexus 5 and Nexus 5X.

It is not a big deal though, I just miss playing and testing custom roms and mods.
[Moto X4 Guides, News, & Discussion] tomtom_38:
Motorola does not release the original firmware for xt1900-7. I don t understand why.

Where can i find it?
[Moto X4 Guides, News, & Discussion] Comby_sk:
Deutsch, 8.1 for retus.
[Moto X4 Guides, News, & Discussion] Comby_sk:
Successfully flashed 8.1 from retus channel without these command. Anybody knows what "erase carrier" does?
[Moto X4 Guides, News, & Discussion] jhedfors:
I have rooted/ROM'd every one of my devices since the G1, but this is my first device with A/B partitions.

Questions:

1) if I unlock bootloader, boot into temporary TWRP (from PC), can I take a backup at that point?

2) Will I be able to restore that backup to get back to stock that way?

3) (slightly OT) Is it required to install TWRP (zip) to install ROMs, or would booting into TWRP be enough?

Thanks!
[Moto X4 Guides, News, & Discussion] Comby_sk:
1) Yes

2) Yes, but do not able full restore (i had some errors). Successfully restored user data.
[Moto X4 Guides, News, & Discussion] munchy_cool:
just booting into twrp will be enough, but how we install roms is

instal rom + twrp zip

reboot to recovery

instal gapps

so, if you have a rom with gapps built in then you can skip instaling twrp zip. but if you have to flash gapps later then twrp is needed. or what you can do is

instal rom

reboot to bootloader

boot into twrp again

instal gapps.
[Moto X4 Guides, News, & Discussion] jhedfors:
Awesome. Thanks to the both of you. I thought I'd progress incrementally with this device. Making sure I can get back (well,I know that bootloader will always show that it had been unlocked) to where I came. Rooting on stock first, then installing ROM later.
[Moto X4 Guides, News, & Discussion] tomtom_38:
anybody knows why Motorola does not release the stock firmware for moto x4, on the web site is a link to the firmwares but there are only firmwares for old devices
[Moto X4 Guides, News, & Discussion] frabe8378910:
For everybody who is LINUX "only" as I am, you can use this "motorola aware fastboot".

https://xdaforums.com/moto-g-2014/development/unix-mfastboot-linux-mac-os-x-how-to-t2941888

Other linux fastboot I used led to the wrong partition names during flash and so didn't work.

Please bear in mind that this fastboot is still 32bit, so if you're on a current linux Distro you have to install "libstdc++" and friends as 32bit too. Multiarch on Debian (or derivates) makes this easy indeed.
[Moto X4 Guides, News, & Discussion] ptn107:
The fastboot in Ubuntu 18.04 (version 1:7.0.0+r33-2) works just fine.

sudo apt install adb fastboot -y
[Moto X4 Guides, News, & Discussion] no-it:
Hello,

I tried this instructions hoping it will get my Moto X4 back to original factory android. But after finishing it booted LineageOS again. Is this correct?

Is there any way to install the original software (operating system) my X4 was shipped with? It's a XT1900-7.

I'm new to Android and using a Mac.

Thanks.

UPDATE: Sorry. I didn't use the recommended fastboot instead of my own. I changed it, tried again and it worked. Thank you very much!

(Is it possible that this firmware contains more bloatware than my shipped version? Can't remember that much amazon apps.)
[Moto X4 Guides, News, & Discussion] Comby_sk:
Check filename of downloaded firmware. It looks you donwnloaded "Payton_AMZ", which is Amazon version. You need to download "Payton" for regular X4. "Payton_FI" is android one version.
[Moto X4 Guides, News, & Discussion] no-it:
You are right. Know I understand what Amazon meant. I didn't choose the US Retail Version because I have a XT1900-7. And I don't know what "Project Fi" means in that matter.

Which version is the right one for me?
[Moto X4 Guides, News, & Discussion] Comby_sk:
You can flash latest 8.0 from here:

https://mirrors.lolinet.com/firmware/moto/payton/official/RETAIL/

Or pay for XT1900-7 firmware from easy-firmware.com.

Btw, i am using US 8.1 on XT1900-7.
[Moto X4 Guides, News, & Discussion] jugoslavpetrovic:
Same variant here -7, and what and how the US version got to 8.1 and the European not yet? What else beside android version has that US?
[Moto X4 Guides, News, & Discussion] Comby_sk:
I can't compare, i flashed US 8.1 after buying my X4. :)
[Moto X4 Guides, News, & Discussion] jugoslavpetrovic:
But, is it safe to put US to 07 variant?
[Moto X4 Guides, News, & Discussion] cango123:
+1, I would like to know that too
[Moto X4 Guides, News, & Discussion] LankiCat:
Can I sideload the zip via ADB?

Can I flash the zip in TWRP?

If no to these, the latest factory firmware has only 6 instead of 7 "system.img_sparsechunk." files. Should I delete "mfastboot flash system system.img_sparsechunk.7" from the flash-all.bat file before flashing? Thanks for this post!
[Moto X4 Guides, News, & Discussion] munchy_cool:
yes , edit the bat file and remove line for 7.
[Moto X4 Guides, News, & Discussion] abrfilho:
You can flash without deleting it, will give an error during flash, but it'll finish and everything will be OK.
[Moto X4 Guides, News, & Discussion] LankiCat:
Can I re-flash just the system images to avoid losing data?
[Moto X4 Guides, News, & Discussion] abrfilho:
Remove the line to erase userdata from script, I already did that and everything went fine, but only if you're flashing the same rom, indepent from security patch month, Android One over Android One, Retail over Retail.
[Moto X4 Guides, News, & Discussion] LankiCat:
Thanks for answering the part of the question I didn't think to ask, but probably would have later, and then had to post again! :good::good:
[Moto X4 Guides, News, & Discussion] ptn107:
Linux? Mac? Windows?

What's your fastboot version?

It thinks your slot is named "_a" when it should be "a". Notice how slot "b" flashed fine because it was not defined. Change the slot suffix via

fastboot --set-active=[I]slot_name[/I]
[Moto X4 Guides, News, & Discussion] johnjingle:
Thank you. After reading your post I changed the slot suffix and then used osx-fastboot from mfastboot-v2. Everything is working perfect now.
[Moto X4 Guides, News, & Discussion] H4x0r1337:
Are we stuck in no ota??

Hello everyone..

I was @ Android 8 do as this tutorial to get 8.1

Model xt1900-7 all go perfectly but the software channel changed to reteu

So is there any way to change it or back to retus?

My bootloader is locked no Root..
[Moto X4 Guides, News, & Discussion] munchy_cool:
so you were able to flash via fastboot with a locked bootloader?
[Moto X4 Guides, News, & Discussion] H4x0r1337:
Yes...

munchy_cool
[Moto X4 Guides, News, & Discussion] abrfilho:
The variant won't change even if you flash a ROM firm another variant, I have XT1900-6 retbr, Android One is only provided for XT1900-1 retus, I flashed Android One here and the software channel remained retbr.

XT1900-7 is from Europe if I'm not wrong.

Yes, it's possible, you just can't downgrade your bootloader, if you do so it'll softbrick.
[Moto X4 Guides, News, & Discussion] vidra:
Do you have the European version of the firmware?
[Moto X4 Guides, News, & Discussion] vidra:
does anybody have the European version?
[Moto X4 Guides, News, & Discussion] munchy_cool:
sorry, i dont have it.
[Moto X4 Guides, News, & Discussion] wolfNitin:
which varient choose for XT1900-2 3+32GB Indian version

---------- Post added at 05:17 AM ---------- Previous post was at 05:15 AM ----------

Which firmware should i choose for XT1900-2 3+32 GB Indian

Please help me:angel:
[Moto X4 Guides, News, & Discussion] munchy_cool:
as far as I know firmwares are cross flashable.
[Moto X4 Guides, News, & Discussion] nitinbhalla95:
It's mean I can flash any firmware in moto x4 3+32GB
[Moto X4 Guides, News, & Discussion] munchy_cool:
are you asking me or telling me?
[Moto X4 Guides, News, & Discussion] nitinbhalla95:
I am asking
[Moto X4 Guides, News, & Discussion] munchy_cool:
yes, thats what cross flashable means
[Moto X4 Guides, News, & Discussion] nitinbhalla95:
How to flash xposed firmware in any moto x4's firmware right now I'm on amazon firmware 8.1

I was trying to flashed xposed firmware but it failed

I just want to use Gravity Box.☺️?
[Moto X4 Guides, News, & Discussion] Comby_sk:
You have to unlock bootloader, but amazon hw version is unlock unenabled.
[Moto X4 Guides, News, & Discussion] pt1xoom:
Thank you very much for this guide and the work you did to figure this out.

I just got the phone and rooted it before I let it get to 8.1. I was stuck on 7.1.1.

Now, I have 8.1!
[Moto X4 Guides, News, & Discussion] munchy_cool:
enjoy.
[Moto X4 Guides, News, & Discussion] vidra:
When I try to install OTA form sideload afterthis I get E: failed to mount / , how do I fix that?
[Moto X4 Guides, News, & Discussion] Mangel79:
I can confirm... on my XT1900-4 only put the Android Pie file on internal storage, gave storage permission to Motorola Update system app, and then just check the OTA updates and right now it is installing. I have 8.0 with November patch. Sorry for my English haha :(
[Moto X4 Guides, News, & Discussion] TeamRainless:
And you're not rooted or anything? Where'd you get the file? And what's your software channel?

Nevermind... Figured it out! :laugh:

Haven't updated it yet... But cool trick!
[Moto X4 Guides, News, & Discussion] vidra:
does this reset the modified flag in bootloader?
[Moto X4 Guides, News, & Discussion] vidra:
Will this work to get from pie back to oreo?

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

Tested it, and I can confirm that it does!
[Moto X4 Guides, News, & Discussion] pt1xoom:
I have the Moto x4 from Google Fi. Today it tried to update to Android 9.0, but it failed.

Is it possible to get this OTA update and use this procedure to get Android 9.0?
[Moto X4 Guides, News, & Discussion] ptn107:
It's not available for payton_fi yet.
[Moto X4 Guides, News, & Discussion] munchy_cool:
Android 9.0 Pie firmwares added to OP
[Moto X4 Guides, News, & Discussion] Sidlegend:
Is there any 8.1 or 9.0 firmware for XT1900-2 Indian varient.i haven't got OTA for 8.1 or 9.....still stuck with 8.0 and October security path....OPWS27.57-40-3-15​
[Moto X4 Guides, News, & Discussion] munchy_cool:
1. do not quote whole OP, makes it a pain in the a** to scrolls 20 lines to read 2 lines

2. Pie is rolling out in India right now, check your system update manually.
[Moto X4 Guides, News, & Discussion] Sidlegend:
Ya got it today ?

Sry for the trouble
[Moto X4 Guides, News, & Discussion] JaviLerma:
Any full firm with December patch?
[Moto X4 Guides, News, & Discussion] Apyle2011:
Thank you for putting up this guide and the links. Everything works as expected...until I use the "./flash-all.sh" command. The message returned is "permission denied." The phone is on Lineage 15.1, unlocked bootloader, rooted, and TWRP. I've also tried unlocking everything that I can find in settings, but clearly I have not found them all. Any thoughts on where else to look?
[Moto X4 Guides, News, & Discussion] munchy_cool:
sudo chmod flash-all.sh

that will make the file executable :highfive:

once thats done

./flash-all.sh
[Moto X4 Guides, News, & Discussion] Apyle2011:
Thanks for the quick response, Munchy-Cool. I have attempted what you suggested, and while I was asked for a password (usually my computer admin password), it returned a chmod usage parameters message:

"usage:	chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a [# [ n]]] mode|entry file ...

chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file .."

and then did not convert it to the executable file as expected. Any thoughts on what these parameters should be? Thank you again!
[Moto X4 Guides, News, & Discussion] munchy_cool:
sudo chmod 777 flash-all.sh

I am not even sure why you cant Google such a simple thing.

results are on page 1 of Google search

https://askubuntu.com/questions/229...ript-executable-so-it-can-be-run-from-termina