• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Guide][Video/Text] How to Flash Official/Factory Firmware (Moto X4)

Search This thread

ardvrk571

Member
Feb 1, 2013
43
18
Sorry I must have been smoking crack when I posted that ?

It should have said TWRP, not Magisk
I would be very careful unlocking bootloader on the X4. You can't go back. Factory images from Motorola are not available. I had a fight with them for months. Ended up flashing files from this site. Motorola support wanted me to pay for them to flash it. I even asked for MD5 hashes of the files, rejected!
I had a Nexus at the time. Got this phone for partner. It was extremely hard compared to Nexus
 
May 13, 2014
18
2
Mumbai
Google Pixel 5
Sorry I must have been smoking crack when I posted that

It should have said TWRP, not Magisk
I would be very careful unlocking bootloader on the X4. You can't go back. Factory images from Motorola are not available. I had a fight with them for months. Ended up flashing files from this site. Motorola support wanted me to pay for them to flash it. I even asked for MD5 hashes of the files, rejected!
I had a Nexus at the time. Got this phone for partner. It was extremely hard compared to Nexus

Thank you for your clarification!
But isn't that what he was doing?

For example, if I only want to install Magisk on my existing stock ROM
(not even TWRP - I'm happy with the stock recovery, and the FAQs at https://www.didgeridoohan.com/magisk/MagiskInstallation mention flashing TWRP sometimes increases chances of bootloops),
I'd:
  1. go to the bootloader,
  2. boot (not flash) TWRP, (take a nandroid backup maybe),
  3. install/flash the Magisk zip from TWRP,
and then boot back into android, correct?
(As per my understanding, only if I were to be installing a ROM would I need to reboot between flashing TWRP and magisk to change the active boot slot.)


Also on your point of unlocking the X4's bootloader being permanent, what exactly changes permanently?
If I take a TWRP backup of all my partitions, I should be good regardless of what I mess up later, right?

I don't care about OTAs and Safetynet (I'm happy on Oreo and don't use Netflix/Android Pay etc), everything else would stay the same, right? The wifi/radios, Moto Display & Moto Actions ,Camera2API etc would still work just like before, right?

(I can deal with the warning screen during boot too.)

Btw thanks a ton for your help! I'm honestly super grateful to people like you on the online community who help others out!
 

ardvrk571

Member
Feb 1, 2013
43
18
@just_another_guy

In theory that should work. I was going to try something similar but don't look after the phone anymore (my ex's)

Motorola don't provide full factory images. There are images available, just not from Motorola. You can't update. You need to full flash if you want to update
 
  • Like
Reactions: just_another_guy

nogods

Senior Member
Dec 10, 2014
81
12
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.
 

Dagur

Member
Oct 21, 2009
11
0
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?
 

ag-android

New member
Sep 7, 2020
2
0
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.
 
Last edited:

mdkf

New member
Sep 12, 2020
1
0
Need help recovering X4

I just tried it on my X4 that turned off and wouldn't boot again. Always had stock firmware. Here's what happened. Any advice?
Code:
C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>flash-all.bat

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot flash partition gpt.bin
(bootloader) slot-suffi: not found
(bootloader) partition-typ: not found
(bootloader) max-downlo: not found
target didn't report max-download-size
sending 'partition' (37 KB)...
FAILED (remote: unknown command)
finished. total time: 0.002s

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot flash bootloader bootloader.img
(bootloader) current-slott: not found
error: Failed to identify current slot

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot reboot-bootloader
(bootloader) slot-countott: not found
(bootloader) slot-suffixes: not found
rebooting into bootloader...
OKAY [  0.001s]
finished. total time: 0.002s

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>ping -n 9 127.0.0.1  1>nul

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>Fastboot --set-active=a
< waiting for any device >
(bootloader) slot-suffi: not found
error: Device does not support slots

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot flash modem_a NON-HLOS.bin
(bootloader) max-download-siz: not found
target didn't report max-download-size
sending 'modem_a' (76252 KB)...
(bootloader) Requested download size is more than max allowed

FAILED (remote failure)
finished. total time: 0.009s

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot flash fsg_a fsg.mbn
(bootloader) slot-countad-siz: not found
(bootloader) slot-suffi: not found
(bootloader) partition-: not found
target didn't report max-download-size
sending 'fsg_a' (5752 KB)...
(bootloader) Requested download size is more than max allowed

FAILED (remote failure)
finished. total time: 0.005s

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot erase modemst1
(bootloader) slot-countad-: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
erasing 'modemst1'...
(bootloader) Invalid partition name modemst1on-
FAILED (remote failure)
finished. total time: 0.005s

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot erase modemst2
(bootloader) slot-suffi: not found
(bootloader) partition-typ: not found
erasing 'modemst2'...
(bootloader) Invalid partition name modemst2on-typ
FAILED (remote failure)
finished. total time: 0.005s

C:\Users\michaelf\Downloads\XT1900-1_PAYTON_FI_9.0_PPWS29.69-39-6-9_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml>fastboot flash bluetooth_a BTFM.bin
(bootloader) slot-counttyp: not found
(bootloader) slot-su: not found
(bootloader) max-download-: not found
target didn't report max-download-size
sending 'bluetooth_a' (400 KB)...
 

Dukenukemx

Senior Member
Jul 24, 2008
1,109
49
Jersey
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?

Code:
fastboot flash modem_b NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot reboot
 

Dukenukemx

Senior Member
Jul 24, 2008
1,109
49
Jersey
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.
 
  • Like
Reactions: jugoslavpetrovic

vortexmak

Senior Member
Nov 25, 2010
114
6
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.

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
 

Top Liked Posts