[Moto G Q&A, Help & Troubleshooting] OhRats:
Hi all, last night I was using my rooted Moto G 4g LTE quite happily, until gapps crashed, I clicked ok, didn't want to send a report and it kept looping itself not allowing me to do anything. I decided to switch my phone off and then on again. When it switched on, the boot splash appeared and after that had finished it just stayed on a black screen, not displaying much at all, but the backlight was on, so I could tell the phone was switched on.

I tried to go into recovery to restore my backups, but it just sat at "Teamwin" for 10 minutes.

I've decided to send me phone off for repair and so I wanted to flash my phone to stock. Following various guides on here, I did the following. Apologies for sometimes missing steps, going back and having to repeat myself. The guide I followed/adapted mildly was this one http://xdaforums.com/moto-g/general/help-moto-g-lte-rebooting-to-bootloader-t2807628

:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# ls
boot.img gpt.bin mfastboot NON-HLOS.bin system.img_sparsechunk.0 system.img_sparsechunk.2 TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml
fsg.mbn logo.bin motoboot.img recovery.img system.img_sparsechunk.1 system.img_sparsechunk.3
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash partition gpt.bin
target max-sparse-size: 256MB
sending 'partition' (32 KB)...
OKAY [ 0.064s]
writing 'partition'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.450s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash logo logo.bin
target max-sparse-size: 256MB
sending 'logo' (1060 KB)...
OKAY [ 0.100s]
writing 'logo'...
OKAY [ 0.085s]
finished. total time: 0.185s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash motoboot motoboot.img
target max-sparse-size: 256MB
sending 'motoboot' (1953 KB)...
OKAY [ 0.139s]
writing 'motoboot'...
(bootloader) flashing tz ...
(bootloader) flashing rpm ...
(bootloader) flashing sdi ...
(bootloader) flashing aboot ...
(bootloader) flashing sbl1 ...
OKAY [ 1.160s]
finished. total time: 1.299s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash logo logo.bin
target max-sparse-size: 256MB
sending 'logo' (1060 KB)...
OKAY [ 0.131s]
writing 'logo'...
OKAY [ 0.047s]
finished. total time: 0.178s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash boot boot.img
target max-sparse-size: 256MB
sending 'boot' (10240 KB)...
OKAY [ 0.373s]
writing 'boot'...
OKAY [ 0.718s]
finished. total time: 1.091s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash recovery recovery.img
target max-sparse-size: 256MB
sending 'recovery' (10240 KB)...
OKAY [ 0.411s]
writing 'recovery'...
OKAY [ 0.674s]
finished. total time: 1.085s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash system system.img_sparsechunk1
target max-sparse-size: 256MB
error: cannot load 'system.img_sparsechunk1': No such file or directory

:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# ls
boot.img gpt.bin mfastboot NON-HLOS.bin system.img_sparsechunk.0 system.img_sparsechunk.2 TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml
fsg.mbn logo.bin motoboot.img recovery.img system.img_sparsechunk.1 system.img_sparsechunk.3
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash system system.img_sparsechunk.0
target max-sparse-size: 256MB
sending 'system' (260845 KB)...
OKAY [ 8.239s]
writing 'system'...
OKAY [ 9.138s]
finished. total time: 17.377s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash system system.img_sparsechunk.1
target max-sparse-size: 256MB
sending 'system' (236289 KB)...
OKAY [ 7.477s]
writing 'system'...
OKAY [ 7.056s]
finished. total time: 14.533s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash system system.img_sparsechunk.2
target max-sparse-size: 256MB
sending 'system' (257395 KB)...
OKAY [ 8.178s]
writing 'system'...
OKAY [ 8.067s]
finished. total time: 16.245s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash system system.img_sparsechunk.3
target max-sparse-size: 256MB
sending 'system' (26772 KB)...
OKAY [ 0.890s]
writing 'system'...
OKAY [ 13.011s]
finished. total time: 13.902s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash modem NON-HLOS.bin
target max-sparse-size: 256MB
sending 'modem' (59132 KB)...
OKAY [ 1.905s]
writing 'modem'...
OKAY [ 0.989s]
finished. total time: 2.895s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot erase modemst1
erasing 'modemst1'...
OKAY [ 0.011s]
finished. total time: 0.011s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot erase modemst2
erasing 'modemst2'...
OKAY [ 0.011s]
finished. total time: 0.011s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot flash fsg fsg.mbn
target max-sparse-size: 256MB
sending 'fsg' (661 KB)...
OKAY [ 0.097s]
writing 'fsg'...
OKAY [ 3.196s]
finished. total time: 3.293s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot erase cache
erasing 'cache'...
OKAY [ 0.015s]
finished. total time: 0.015s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot erase userdata
erasing 'userdata'...
OKAY [ 0.021s]
finished. total time: 0.021s
:~/Downloads/(Moto_G_LTE_XT1039)_TESCO-GB_4.4.4_KXB21.14-L1.46_cid7_CFC_1FF.xml# sudo ./mfastboot reboot
rebooting...

finished. total time: 0.001s

Nothing changed. When I try and switch the phone on, it displays the boot splash (same as before) and goes into the black screen still. If I try and go into recovery, it still freezes on "Teamwin". I've no idea why since it should be the standard recovery image.

Advise is gratefully received.