[Moto G Q&A, Help & Troubleshooting] padmakar sawant:
Hi,

I have Moto G XT1033(Dual SIM).

Recently I have installed custom CyanogenMod 13 ROM(marshmallow) which is working fine but I want to get back to stock ROM

whenever I tried to flash, after rebooting It is getting stuck at "Warning, Device is unlocked" screen

Also if I tried to upgrade/install CyanogenMod 13, Its booting fine and also working fine

Please help me to resolve this....

FYI.... I'm using below step to downgrade and getting failed at 1st 2 steps(Output attached below)

fastboot flash partition gpt.bin

fastboot flash motoboot motoboot.img

fastboot flash logo logo.bin

fastboot flash boot boot.img

fastboot flash system system.img_sparsechunk.0

fastboot flash system system.img_sparsechunk.1

fastboot flash system system.img_sparsechunk.2

fastboot flash system system.img_sparsechunk.3

fastboot flash modem NON-HLOS.bin

fastboot erase modemst1

fastboot erase modemst2

fastboot flash fsg fsg.mbn

fastboot erase cache

fastboot erase userdata

fastboot reboot

==================================================================================================================

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash partition gpt.bin

target reported max download size of 536870912 bytes

sending 'partition' (32 KB)...

OKAY [ 0.047s]

writing 'partition'...

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.328s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash motoboot motoboot.img

target reported max download size of 536870912 bytes

sending 'motoboot' (1953 KB)...

OKAY [ 0.094s]

writing 'motoboot'...

(bootloader) Motoboot: Preflash validation for tz

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.391s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash logo logo.bin

target reported max download size of 536870912 bytes

sending 'logo' (1060 KB)...

OKAY [ 0.109s]

writing 'logo'...

OKAY [ 0.109s]

finished. total time: 0.219s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (10240 KB)...

OKAY [ 0.391s]

writing 'boot'...

OKAY [ 0.781s]

finished. total time: 1.172s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash recovery recovery.img

target reported max download size of 536870912 bytes

sending 'recovery' (10240 KB)...

OKAY [ 0.406s]

writing 'recovery'...

OKAY [ 0.766s]

finished. total time: 1.172s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash system system.img_sparsechunk.0

target reported max download size of 536870912 bytes

erasing 'system'...

(bootloader) Erase allowed in unlocked state

OKAY [ 0.609s]

sending 'system' (260949 KB)...

OKAY [ 8.248s]

writing 'system'...

OKAY [ 12.748s]

finished. total time: 21.605s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash system system.img_sparsechunk.1

target reported max download size of 536870912 bytes

erasing 'system'...

(bootloader) Erase allowed in unlocked state

OKAY [ 0.641s]

sending 'system' (248721 KB)...

OKAY [ 7.875s]

writing 'system'...

OKAY [ 10.216s]

finished. total time: 18.732s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash system system.img_sparsechunk.2

target reported max download size of 536870912 bytes

erasing 'system'...

(bootloader) Erase allowed in unlocked state

OKAY [ 0.672s]

sending 'system' (254187 KB)...

OKAY [ 8.026s]

writing 'system'...

OKAY [ 18.983s]

finished. total time: 27.681s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash system system.img_sparsechunk.3

error: cannot load 'system.img_sparsechunk.3'

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash modem NON-HLOS.bin

target reported max download size of 536870912 bytes

sending 'modem' (47152 KB)...

OKAY [ 1.531s]

writing 'modem'...

OKAY [ 1.391s]

finished. total time: 2.938s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot erase modemst1

erasing 'modemst1'...

OKAY [ 0.062s]

finished. total time: 0.062s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot erase modemst2

erasing 'modemst2'...

OKAY [ 0.062s]

finished. total time: 0.062s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot flash fsg fsg.mbn

target reported max download size of 536870912 bytes

sending 'fsg' (102 KB)...

OKAY [ 0.094s]

writing 'fsg'...

OKAY [ 5.641s]

finished. total time: 5.750s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot erase cache

******** Did you mean to fastboot format this partition?

erasing 'cache'...

OKAY [ 0.437s]

finished. total time: 0.437s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot erase userdata

erasing 'userdata'...

OKAY [ 6.394s]

finished. total time: 6.394s

C:\Users\padma\Downloads\Compressed\adb-tools_treiber\adb-tools_treiber\adb-tools>fastboot reboot

rebooting...

finished. total time: 0.016s

=========================================================================================================================