Hello guys, I wanted to share something I've discovered so that others will not repeat my same mistake. And yes I'm a noob
A little backstory
I have an Asian XT1033 Moto G, bootloader unlocked, rooted and using Faux's kernel. So, after reading some feedback about 5.1.1 for XT1033, I've been tempted to flash 5.1.1 over my 4.4.4.
The problem
I've downloaded the stock 5.0.2 Asia XT1033 firmware in img format, and proceeded to flash them via fastboot using Minimal ADB and Fastboot. (I tried to fastboot flash 5.0.2 stock firmware directly from 4.4.4 stock). Everything was fine, after flashing each part, Okay messages were shown. After rebooting, my Moto G booted and showed the usual "Warning Bootloader Unlocked" screen. EXCEPT, the "Warning Bootloader Unlocked" screen stayed for more than 10minutes......., I've spent the whole midnight trying to reflash back using 4.4.4 stock Asia firmwares (same stucked at warning screen), baffled, googling for similar problems encountered in hopes of a solution, but found nothing. The next day something came to my mind and I googled "the difference between fastboot and mfastboot" which led me to Mark_Venture's website, and after some reading, I first facepalmed myself hard and then screamed Eureka with my mind
What's causing this
To rephrase Mark_Venture, "fastboot is compatible with almost all Android devices, but is limited on how big the size of files it can actually flash, while Motorola have their own version called mfastboot which surpassed the file size limits of the usual fastboot", so basically when I tried to flash via fastboot, the command I've typed was "fastboot.exe flash partition gpt.bin" which is wrong and should be "mfastboot.exe flash partition gpt.bin", so basically I've used the usual fastboot.exe instead of Motorola's own mfastboot.exe. This probably explains why all the other files from the stock firmware are successfully flashed, EXCEPT the system.img_sparsechunk.0123 files due to their average sizes easily exceeding 256MB (my own take here, correct me if I'm wrong). This probably explains why rebooting after flashing via fastboot doesn't work because the system imgs are not flashed, and hence the phone get stucked at "Warning Bootloader Unlocked" screen because there is no ROM to boot to.
Alternatively, actually much more easier
You can also flash using fastboot a custom recovery, then boot into the custom recovery and either adb push or using USB OTG to install ROM zips. Personally I've used USB OTG with PhilZ Touch Recovery to install custom ROM and my phone finally boots.
TL;DR
Use mfastboot.exe instead of fastboot.exe when flashing via fastboot
Big credits to Mark_Venture and his website
Source: http://mark.cdmaforums.com/MotoX-mFastboot.htm
A little backstory
I have an Asian XT1033 Moto G, bootloader unlocked, rooted and using Faux's kernel. So, after reading some feedback about 5.1.1 for XT1033, I've been tempted to flash 5.1.1 over my 4.4.4.
The problem
I've downloaded the stock 5.0.2 Asia XT1033 firmware in img format, and proceeded to flash them via fastboot using Minimal ADB and Fastboot. (I tried to fastboot flash 5.0.2 stock firmware directly from 4.4.4 stock). Everything was fine, after flashing each part, Okay messages were shown. After rebooting, my Moto G booted and showed the usual "Warning Bootloader Unlocked" screen. EXCEPT, the "Warning Bootloader Unlocked" screen stayed for more than 10minutes......., I've spent the whole midnight trying to reflash back using 4.4.4 stock Asia firmwares (same stucked at warning screen), baffled, googling for similar problems encountered in hopes of a solution, but found nothing. The next day something came to my mind and I googled "the difference between fastboot and mfastboot" which led me to Mark_Venture's website, and after some reading, I first facepalmed myself hard and then screamed Eureka with my mind
What's causing this
To rephrase Mark_Venture, "fastboot is compatible with almost all Android devices, but is limited on how big the size of files it can actually flash, while Motorola have their own version called mfastboot which surpassed the file size limits of the usual fastboot", so basically when I tried to flash via fastboot, the command I've typed was "fastboot.exe flash partition gpt.bin" which is wrong and should be "mfastboot.exe flash partition gpt.bin", so basically I've used the usual fastboot.exe instead of Motorola's own mfastboot.exe. This probably explains why all the other files from the stock firmware are successfully flashed, EXCEPT the system.img_sparsechunk.0123 files due to their average sizes easily exceeding 256MB (my own take here, correct me if I'm wrong). This probably explains why rebooting after flashing via fastboot doesn't work because the system imgs are not flashed, and hence the phone get stucked at "Warning Bootloader Unlocked" screen because there is no ROM to boot to.
Alternatively, actually much more easier
You can also flash using fastboot a custom recovery, then boot into the custom recovery and either adb push or using USB OTG to install ROM zips. Personally I've used USB OTG with PhilZ Touch Recovery to install custom ROM and my phone finally boots.
TL;DR
Use mfastboot.exe instead of fastboot.exe when flashing via fastboot
Big credits to Mark_Venture and his website
Source: http://mark.cdmaforums.com/MotoX-mFastboot.htm
xda-developers