Using Mfastboot.exe to Flash a Motorola device

Search This thread

ManishRathore6549

New member
Mar 13, 2018
1
0
It shows bootloader error and failed and it doesn't recognise any of the command and I am literally stuck in dummy bootloader for 2 days it reboots after flash but still it come back
What I can do to solve this
 

Mark2014

Senior Member
Jan 21, 2014
346
62
Hi bro
I have a small question
which is command I can use to restore recovery from custom back to stock?
Code:
mfastboot flash bootloader bootloader.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
Can I do it with only one command?
 

sd_shadow

Recognized Contributor / XDA Welcome Team
Sep 21, 2011
18,985
2
10,015
South Dakota
goo.gl
Motorola Droid X
Amazon Fire
Hi bro
I have a small question
which is command I can use to restore recovery from custom back to stock?
Code:
mfastboot flash bootloader bootloader.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
Can I do it with only one command?

Code:
mfastboot flash recovery recovery.img
 
  • Like
Reactions: Mark2014

enzodad

Senior Member
Dec 27, 2010
318
21
Pittsburgh
Hmm i followed Video and all i get is this--- I cant get Modems Bluetooth or wifi on any stock rom, i tried RSD Mfastboot and fastboot and the video

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>eco off
'eco' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot getvar max-sparse-size
max-sparse-size: 268435456
Finished. Total time: 0.003s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot oem fb_mode_set
OKAY [ 0.012s]
Finished. Total time: 0.019s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash partition gpt.bin
(bootloader) is-logical:partition: not found
Sending 'partition' (37 KB) OKAY [ 0.013s]
Writing 'partition' (bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
OKAY [ 0.133s]
Finished. Total time: 0.241s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash bootloader bootloader.img
(bootloader) is-logical:bootloader: not found
Sending 'bootloader' (9520 KB) OKAY [ 0.229s]
Writing 'bootloader' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Committing 'bootloader.default.xml'
(bootloader) - flashing 'xbl.elf' to 'xbl'
(bootloader) - flashing 'prov64.mbn' to 'prov'
(bootloader) - flashing 'cmnlib.mbn' to 'cmnlib'
(bootloader) - flashing 'cmnlib64.mbn' to 'cmnlib64'
(bootloader) - flashing 'abl.elf' to 'abl'
(bootloader) - flashing 'keymaster.mbn' to 'keymaster'
(bootloader) - flashing 'storsec.mbn' to 'storsec'
(bootloader) - flashing 'rpm.mbn' to 'rpm'
(bootloader) - flashing 'pmic.elf' to 'pmic'
(bootloader) - flashing 'hyp.mbn' to 'hyp'
(bootloader) - flashing 'tz.mbn' to 'tz'
(bootloader) - flashing 'devcfg.mbn' to 'devcfg'
OKAY [ 0.322s]
Finished. Total time: 0.723s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash modem NON-HLOS.bin
(bootloader) is-logical:modem__a: not found
Sending 'modem__a' (76256 KB) OKAY [ 1.745s]
Writing 'modem__a' (bootloader) Invalid partition name modem__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash fsg fsg.mbn
(bootloader) is-logical:fsg__a: not found
Sending 'fsg__a' (5756 KB) OKAY [ 0.133s]
Writing 'fsg__a' (bootloader) Invalid partition name fsg__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot erase modemst1
Erasing 'modemst1' OKAY [ 0.013s]
Finished. Total time: 0.020s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot erase modemst2
Erasing 'modemst2' OKAY [ 0.009s]
Finished. Total time: 0.016s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash bluetooth BTFM.bin
(bootloader) is-logical:bluetooth__a: not found
Sending 'bluetooth__a' (400 KB) OKAY [ 0.010s]
Writing 'bluetooth__a' (bootloader) Invalid partition name bluetooth__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash dsp dspso.bin
(bootloader) is-logical:dsp__a: not found
Sending 'dsp__a' (16384 KB) OKAY [ 0.374s]
Writing 'dsp__a' (bootloader) Invalid partition name dsp__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash logo logo.bin
(bootloader) is-logical:logo__a: not found
Sending 'logo__a' (2282 KB) OKAY [ 0.054s]
Writing 'logo__a' (bootloader) Invalid partition name logo__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash boot boot.img
(bootloader) is-logical:boot__a: not found
Sending 'boot__a' (22245 KB) OKAY [ 0.509s]
Writing 'boot__a' (bootloader) Invalid partition name boot__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash system system.img_sparsechunk.0
(bootloader) is-logical:system__a: not found
 

sd_shadow

Recognized Contributor / XDA Welcome Team
Sep 21, 2011
18,985
2
10,015
South Dakota
goo.gl
Motorola Droid X
Amazon Fire
Hmm i followed Video and all i get is this--- I cant get Modems Bluetooth or wifi on any stock rom, i tried RSD Mfastboot and fastboot and the video

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>eco off
'eco' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot getvar max-sparse-size
max-sparse-size: 268435456
Finished. Total time: 0.003s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot oem fb_mode_set
OKAY [ 0.012s]
Finished. Total time: 0.019s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash partition gpt.bin
(bootloader) is-logical:partition: not found
Sending 'partition' (37 KB) OKAY [ 0.013s]
Writing 'partition' (bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
OKAY [ 0.133s]
Finished. Total time: 0.241s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash bootloader bootloader.img
(bootloader) is-logical:bootloader: not found
Sending 'bootloader' (9520 KB) OKAY [ 0.229s]
Writing 'bootloader' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Committing 'bootloader.default.xml'
(bootloader) - flashing 'xbl.elf' to 'xbl'
(bootloader) - flashing 'prov64.mbn' to 'prov'
(bootloader) - flashing 'cmnlib.mbn' to 'cmnlib'
(bootloader) - flashing 'cmnlib64.mbn' to 'cmnlib64'
(bootloader) - flashing 'abl.elf' to 'abl'
(bootloader) - flashing 'keymaster.mbn' to 'keymaster'
(bootloader) - flashing 'storsec.mbn' to 'storsec'
(bootloader) - flashing 'rpm.mbn' to 'rpm'
(bootloader) - flashing 'pmic.elf' to 'pmic'
(bootloader) - flashing 'hyp.mbn' to 'hyp'
(bootloader) - flashing 'tz.mbn' to 'tz'
(bootloader) - flashing 'devcfg.mbn' to 'devcfg'
OKAY [ 0.322s]
Finished. Total time: 0.723s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash modem NON-HLOS.bin
(bootloader) is-logical:modem__a: not found
Sending 'modem__a' (76256 KB) OKAY [ 1.745s]
Writing 'modem__a' (bootloader) Invalid partition name modem__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash fsg fsg.mbn
(bootloader) is-logical:fsg__a: not found
Sending 'fsg__a' (5756 KB) OKAY [ 0.133s]
Writing 'fsg__a' (bootloader) Invalid partition name fsg__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot erase modemst1
Erasing 'modemst1' OKAY [ 0.013s]
Finished. Total time: 0.020s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot erase modemst2
Erasing 'modemst2' OKAY [ 0.009s]
Finished. Total time: 0.016s

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash bluetooth BTFM.bin
(bootloader) is-logical:bluetooth__a: not found
Sending 'bluetooth__a' (400 KB) OKAY [ 0.010s]
Writing 'bluetooth__a' (bootloader) Invalid partition name bluetooth__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash dsp dspso.bin
(bootloader) is-logical:dsp__a: not found
Sending 'dsp__a' (16384 KB) OKAY [ 0.374s]
Writing 'dsp__a' (bootloader) Invalid partition name dsp__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash logo logo.bin
(bootloader) is-logical:logo__a: not found
Sending 'logo__a' (2282 KB) OKAY [ 0.054s]
Writing 'logo__a' (bootloader) Invalid partition name logo__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash boot boot.img
(bootloader) is-logical:boot__a: not found
Sending 'boot__a' (22245 KB) OKAY [ 0.509s]
Writing 'boot__a' (bootloader) Invalid partition name boot__a
FAILED (remote: '')
fastboot: error: Command failed

C:\Users\Turbo-Graphics\Desktop\Moto x4 stuff\platform-tools>fastboot flash system system.img_sparsechunk.0
(bootloader) is-logical:system__a: not found
There are several reasons flashing can fail.
First I would suggest using the flash_all.bat

Is the bootloader unlocked?
Which model # ?
Firmware is for your model and carrier?
Firmware is the same or newer version?

Have you read this thread?
https://xdaforums.com/moto-x4/how-to/guide-how-to-flash-official-factory-t3808348

Sent from my Google Chromebook using XDA Labs
 

enzodad

Senior Member
Dec 27, 2010
318
21
Pittsburgh
There are several reasons flashing can fail.
First I would suggest using the flash_all.bat

Is the bootloader unlocked?
Which model # ?
Firmware is for your model and carrier?
Firmware is the same or newer version?

Have you read this thread?
https://xdaforums.com/moto-x4/how-to/guide-how-to-flash-official-factory-t3808348

Sent from my Google Chromebook using XDA Labs

Yes its unlocked , Its the XT900-1 Moto X4 from the google store (Android one). I had no issues before applying roms. I have tried many firmwares and they all do the same thing. Not install modems- before I changed my rom this time that broke it I was on latest update of stock rooted. Yes i have read that thread- thats the thread I used to swap back to stock. So I know that rom works, but now i get no modems. i have spent two days now trying to get it working- the phone powers on boots everything normal just no wifi and cell
 

CorpChAoS

Member
Aug 1, 2014
18
4
Sacramento
I just recieved fastboot from Lenovo Smart Repair & Recovery

Last night I recieved the adb and fastboot tools from Lenovo's repair utility (Rescue and Smart Assistant) I was able to capture the files.. There is no mfastboot. Here are the executables provided along with their version numbers:

Code:
X:\>adb --version
Android Debug Bridge version 1.0.40
 Version 4986621


X:\>fastboot --version
 fastboot version 26.0.0 rc1-eng.a18317.20171105.083832
Unfortunately, these are only for Windows 7+. I'm looking for the latest fastboot for Linux. A check of https://developer.android.com/studio/releases/platform-tools reveals even later releases:

Code:
$ fastboot --version
fastboot version 30.0.3-6597393

$ adb --version
Android Debug Bridge version 1.0.41
Version 30.0.3-6597393
I will be using fastboot version 30.0.3-6597393 to create an mmcblk0 backup as I believe that mfastboot is deprecated. This is my indication due to the fact that the command options from mfastboot are now available in fastboot for linux and windows versions.

Does anyone have any better information?


Download the Windows tools provided by Lenovo on 7/24/2020: https://github.com/SporadicThought/motorola-ali-g6-ROM/tree/master/adb_fastboot_lenovo
 
Last edited:

jonshipman

Senior Member
Jun 8, 2010
508
57
Moto Z3 Play
Hmm i followed Video and all i get is this--- I cant get Modems Bluetooth or wifi on any stock rom, i tried RSD Mfastboot and fastboot and the video

I could only get radios to flash on an old Windows 7 laptop I have kicking around. Intel 2 Duo (32-bit) and only USB2 ports. Installed 32bit Moto USB drivers (6.4.0) and used the mfastboot in this thread. I am on an Z3 Play and used the firmware from https://mirrors.lolinet.com/.
 
  • Like
Reactions: sd_shadow

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Mfastboot
    Although Mfastboot.exe works with most Motorola Devices, the exact files and flash commands may vary, best to see specific forum/threads for the device.
    I haven't updated this thread for a while.
    Mfastboot still works, but the flash commands have changed for newer devices.
    See Guide: Motorola Firmware


    Watch Videos
    Download
    Verify Files
    • Compare File Size with file size form download site
    • Use Hash Checksums
      • mfastboot-v2.zip (1.36 MB) MD5 Sum: 83650a3589d2ecd7c8115ce860d45a23

    Install Moto Drivers
    • Extract files from zip
    • Run Motorola_End_User_Driver_Installation_....msi
    • Reboot PC

    Setup Mfastboot.exe
    • Extract mafastboot.zip to a local drive
    • Example - C:/Mfastboot
    • Open start menu and type CMD
    • Right click on CMD > select open file location
    • Find cmd.exe, right click and copy
    • Paste into Mfastboot folder

    Show known File Types
    • Open C:/Mfastboot folder
    • Select View>options>Change folder and Search options
    • In Folder Options Select Tab View
    • Uncheck Box: Hide Extensions for Known file Types
    • Select OK

    Short Version - Flashing System Only

    • In some cases only System.img is necessary
    • Type commands
      Code:
      mfastboot flash system system.img
      and
    • Type commands
      Code:
      mfastboot reboot
    • Press enter
      if Device does not boot try Long Version

    Long Version -Using Mfastboot to Flash Firmware

    • Note: The exact files needed will very by device model
    • Extract files from Firmware xml.zip
    • Copy
      Code:
      NON-HLOS.bin
      system.img
      boot.img
      recovery.img
      to Mfastboot folder
    • Boot Device to AP Fastboot Mode (Power Off, Hold Volume Down, Press power button for 2-3 secs then release)
    • Note Click here If you see Low Battery, Click here if you see Fastboot Reason: Sticky bit factory_fastboot
    • Run cmd.exe in Mfastboot folder
    • Type commands
      Code:
      mfastboot flash modem NON-HLOS.bin
    • Press enter
    • Type commands
      Code:
      mfastboot erase modemst1
    • Press enter
    • Type commands
      Code:
      mfastboot erase modemst2
    • Press enter
    • Type commands
      Code:
      mfastboot flash system system.img
    • Press enter this may take several minutes to finish and be flashed in several segments.
    • Type commands
      Code:
      mfastboot flash boot boot.img
    • Press enter
    • Type commands
      Code:
      mfastboot flash recovery recovery.img
    • Press enter
    • Type commands
      Code:
      fastboot erase cache
    • Press enter
    • Optional Data Wipe: Type commands
      Code:
      fastboot erase userdata
    • Press enter
    • Type commands
      Code:
      mfastboot reboot
    • Press enter
    • Device should boot normally, If not see RSD Lite or House of Moto
    1
    Troubleshooting

    Q1: Error: Cannot load system.img: Not enough space.
    Solution: try flashing system.img in chunks with
    Code:
    mfastboot flash system system.img -P
    - Thanks to @Merconium for the tip

    Error: UTAG "bootmode" configured as fastboot
    Solution 1:
    Code:
    fastboot oem fb_mode_clear
    fastboot reboot
    Solution 2:
    Code:
    fastboot erase motoboot
    fastboot flash motoboot motoboot.img
    fastboot reboot