[Moto E Q&A, Help & Troubleshooting] abhi98228:
Hi,

I was trying to flash stock rom to my Moto E Indian version. It was running Cm 12 but suddenly it stopped detecting sim card. so I used this script to flash the stock firmware

mfastboot.exe oem lock begin

mfastboot.exe flash partition gpt.bin

mfastboot.exe flash motoboot motoboot.img

mfastboot.exe flash logo logo.bin

mfastboot.exe flash boot boot.img

mfastboot.exe flash recovery recovery.img

mfastboot.exe flash system system.img_sparsechunk.0

mfastboot.exe flash system system.img_sparsechunk.1

mfastboot.exe flash system system.img_sparsechunk.2

mfastboot.exe flash modem NON-HLOS.bin

mfastboot.exe erase modemst1

mfastboot.exe erase modemst2

mfastboot.exe flash fsg fsg.mbn

mfastboot.exe erase cache

mfastboot.exe erase userdata

mfastboot.exe oem lock

pause

mfastboot.exe reboot

but flash wasnt successful and its now stuck at recovery loop. If I try to flash any custom rom from recovery it says unable to mound data and system. Tried everything I know but doesnt help.

when I flash the above script it shows CM boot logo and gets stuck there

Using this stock firmware RETAILDSDSALL_XT1022_4.4.4_KXC21.5-40_cid7_CFC

C:\MotoTool\ADB>"Retail+lock.bat"

C:\MotoTool\ADB>mfastboot.exe oem lock begin

...

(bootloader) Ready to flash signed images

OKAY [ 0.089s]

finished. total time: 0.092s

C:\MotoTool\ADB>mfastboot.exe flash partition gpt.bin

target max-sparse-size: 256MB

sending 'partition' (32 KB)...

OKAY [ 0.028s]

writing 'partition'...

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.577s

C:\MotoTool\ADB>mfastboot.exe flash motoboot motoboot.img

target max-sparse-size: 256MB

sending 'motoboot' (1669 KB)...

OKAY [ 0.099s]

writing 'motoboot'...

(bootloader) Motoboot: Preflash validation for tz

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.574s

C:\MotoTool\ADB>mfastboot.exe flash logo logo.bin

target max-sparse-size: 256MB

sending 'logo' (460 KB)...

OKAY [ 0.083s]

writing 'logo'...

OKAY [ 0.144s]

finished. total time: 0.233s

C:\MotoTool\ADB>mfastboot.exe flash boot boot.img

target max-sparse-size: 256MB

sending 'boot' (10200 KB)...

OKAY [ 0.391s]

writing 'boot'...

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 1.101s

C:\MotoTool\ADB>mfastboot.exe flash recovery recovery.img

target max-sparse-size: 256MB

sending 'recovery' (10280 KB)...

OKAY [ 0.399s]

writing 'recovery'...

OKAY [ 1.757s]

finished. total time: 2.161s

C:\MotoTool\ADB>mfastboot.exe flash system system.img_sparsechunk.0

target max-sparse-size: 256MB

sending 'system' (243072 KB)...

OKAY [ 7.676s]

writing 'system'...

(bootloader) Invalid signed image

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 8.348s

C:\MotoTool\ADB>mfastboot.exe flash system system.img_sparsechunk.1

target max-sparse-size: 256MB

sending 'system' (257254 KB)...

OKAY [ 8.128s]

writing 'system'...

(bootloader) Invalid signed image

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 8.197s

C:\MotoTool\ADB>mfastboot.exe flash system system.img_sparsechunk.2

target max-sparse-size: 256MB

sending 'system' (201709 KB)...

OKAY [ 6.381s]

writing 'system'...

(bootloader) Invalid signed image

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 6.447s

C:\MotoTool\ADB>mfastboot.exe flash modem NON-HLOS.bin

target max-sparse-size: 256MB

sending 'modem' (46132 KB)...

OKAY [ 1.507s]

writing 'modem'...

OKAY [ 4.589s]

finished. total time: 6.101s

C:\MotoTool\ADB>mfastboot.exe erase modemst1

erasing 'modemst1'...

OKAY [ 0.012s]

finished. total time: 0.013s

C:\MotoTool\ADB>mfastboot.exe erase modemst2

erasing 'modemst2'...

OKAY [ 0.022s]

finished. total time: 0.025s

C:\MotoTool\ADB>mfastboot.exe flash fsg fsg.mbn

target max-sparse-size: 256MB

sending 'fsg' (649 KB)...

OKAY [ 0.106s]

writing 'fsg'...

OKAY [ 0.127s]

finished. total time: 0.237s

C:\MotoTool\ADB>mfastboot.exe erase cache

erasing 'cache'...

OKAY [ 0.366s]

finished. total time: 0.369s

C:\MotoTool\ADB>mfastboot.exe erase userdata

erasing 'userdata'...

OKAY [ 1.415s]

finished. total time: 1.419s

C:\MotoTool\ADB>mfastboot.exe oem lock

...

(bootloader) sst lock failure!

OKAY [ 0.043s]

finished. total time: 0.046s

C:\MotoTool\ADB>pause

Press any key to continue . . .

C:\MotoTool\ADB>mfastboot.exe reboot

rebooting...

finished. total time: 0.002s

C:\MotoTool\ADB>