[G 2014 Q&A, Help & Troubleshooting] Martin Ebenezer:
Okay. I have this titan device of my friend which always boots to fastboot mode with the below message

Fastboot Reason UTAG "flashfail" configured as fastboot

When I connect USB and key in fastboot devices command it does show up.

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>fastboot devices
ZX1D647QP3 fastboot

I somehow managed to get oem_unlock_data and I managed to unlock the bootloader.

I tried to flash the Stock Rom (Marshmallow) and the problem arises here with all commands failing.

Not even a single command gets succeeded.

Including a few error messages.

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash partition gpt.bin
target max-sparse-size: 256MB
sending 'partition' (32 KB)...
OKAY [ 5.002s]
writing 'partition'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 5.336s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash motoboot motoboot.img
target max-sparse-size: 256MB
sending 'motoboot' (2184 KB)...
OKAY [ 5.080s]
writing 'motoboot'...
(bootloader) flashing tz ...
(bootloader) Failed to erase partition
(bootloader) Failed to flash tz
FAILED (remote failure)
finished. total time: 10.991s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash logo logo.bin
target max-sparse-size: 256MB
sending 'logo' (697 KB)...
OKAY [ 5.028s]
writing 'logo'...
(bootloader) Failed to erase partition
(bootloader) Failed to flash partition logo
FAILED (remote failure)
finished. total time: 20.018s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash boot boot.img
target max-sparse-size: 256MB
sending 'boot' (10200 KB)...
OKAY [ 5.338s]
writing 'boot'...
(bootloader) Failed to erase partition
(bootloader) Failed to flash partition boot
FAILED (remote failure)
finished. total time: 10.391s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash recovery recovery.img
target max-sparse-size: 256MB
sending 'recovery' (10280 KB)...
OKAY [ 5.347s]
writing 'recovery'...
(bootloader) Failed to erase partition
(bootloader) Failed to flash partition recovery
FAILED (remote failure)
finished. total time: 10.407s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash system system.img_sparsechunk.0
target max-sparse-size: 256MB
sending 'system' (257467 KB)...
OKAY [ 13.111s]
writing 'system'...
(bootloader) Failed to erase partition
FAILED (remote failure)
finished. total time: 18.203s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash system system.img_sparsechunk.1
target max-sparse-size: 256MB
sending 'system' (255482 KB)...
OKAY [ 13.055s]
writing 'system'...
(bootloader) Failed to flash sparse image
FAILED (remote failure)
finished. total time: 18.215s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash system system.img_sparsechunk.2
target max-sparse-size: 256MB
sending 'system' (257534 KB)...
OKAY [ 13.113s]
writing 'system'...
(bootloader) Failed to flash sparse image
FAILED (remote failure)
finished. total time: 18.192s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash system system.img_sparsechunk.3
target max-sparse-size: 256MB
sending 'system' (244425 KB)...
OKAY [ 12.701s]
writing 'system'...
(bootloader) Failed to flash sparse image
FAILED (remote failure)
finished. total time: 17.780s

C:\Martin's Storage Space\Softwares\Moto G2 Stable OS\Stock>mfastboot.exe flash modem NON-HLOS.bin
target max-sparse-size: 256MB
sending 'modem' (50136 KB)...
OKAY [ 6.599s]
writing 'modem'...
(bootloader) Failed to erase partition
(bootloader) Failed to flash partition modem
FAILED (remote failure)
finished. total time: 11.687s

Please advise as to what can be done.

Looking forward for your support. Thanks in advance.

PS: I am not sure if USB Debugging is turned on in the device because this phone wasn't tweaked much by my friend.