[Moto G Q&A, Help & Troubleshooting] newklear85:
So I don't have a procedure to fix it but the guys at #android on Freenode gave me a bunch of tips which eventually made my phone work. It loaded a custom rom (liquid smooth) and I can make calls.

Sorry if I can't give you a more precise solution... if someone can figure out the exact reason why I was able to install a custom rom properly, it would help us find a solution to fix the GPT.BIN error.

In a nutshell, I was getting errors when trying to install a custom rom via TWRP (bypassing the stock rom errors) but now I'm able to install a custom rom and run it fine. Please read the logs despite all the crap around it.

Here is the chat log... follow though and do what I did - the solution might be in some fastboot commands I tried:

[08:31] <Jonnyw2k> what does "fastboot oem unlock" say

[08:31] <asdfsdfsadf> (bootloader) Device already unlocked! FAILED (remote failure) finished. total time: 0.003s

[08:39] <asdfsdfsadf> writing 'partition'... Preflash validation failed FAILED (remote failure)

[08:39] <asdfsdfsadf> mfastboot

[08:40] <asdfsdfsadf> not sure what the error is.....

[08:40] <Khaytsus> Well that just looks vulgar at a glance

[08:42] <Jonnyw2k> asdfsdfsadf there is a "fastboot oem fb_mode_clear" command that apparently sometimes helps, but that seems to be more todo with a fastboot issue

[08:42] <asdfsdfsadf> ... OKAY [ 0.002s] finished. total time: 0.003s

[08:43] <asdfsdfsadf> same error when I flash gpt.bin

[08:43] <DrChandra> Perhaps the partition is damaged.

[08:43] <Jonnyw2k> try flashing the gpt now

[08:43] <Aevum> what phone is it ?

[08:43] <asdfsdfsadf> moto g xt1032

[08:44] <DrChandra> Consider the erase and format commands within fastboot

[08:45] <Aevum> motorola havehttp://xdaforums.com/showthread.php?t=2542219

[08:45] <asdfsdfsadf> just did -w

[08:45] <Aevum> motorola havehttp://xdaforums.com/showthread.php?t=2542219

[08:45] <Aevum> fdoijghfiodjhadt

[08:45] <Aevum> try this http://xdaforums.com/showthread.php?t=2542219

[08:45] <asdfsdfsadf> formatting 'userdata' partition... Creating filesystem with parameters: Size: 6173884416 Block size: 4096 Blocks per group: 32768 Inodes per group: 8192 Inode size: 256 Journal blocks: 23551 Label: Blocks: 1507296 Block groups: 46 Reserved block group size: 367 Created filesystem with 11/376832 inodes and 50150/1507296 blocks sending 'userdata' (98165 KB)... writing 'userdata'... OKAY [ 9.953s] erasing 'cache'... OKAY [ 0.24

[08:46] <asdfsdfsadf> Aevum: tried that twice... to give you some insight, I upgraded to 4.4.4 GPE on a non-gpe device, many people got bricked when they tried to downgrade

[08:47] <asdfsdfsadf> After fastboot -w command, same error when trying to partition

[08:47] <Aevum> i dont know what flashing tools motorola uses, becuase theres usuayl the fastboot and ADB

[08:47] <Aevum> and also a proprietary tool from the manufacturer for bathc flashing

[08:48] <asdfsdfsadf> RSD Lite doesn't detect hte phone in fastboot

[08:49] <Aevum> theres usualy a fastboot and a flashing mode

[08:49] <DrChandra> RSD might be asking for a fastboot version and mismatching against whatever is being returned by the bootloader. It could e part of what Motorola uses to prevent anything but their own tool from being used.

[08:52] <Aevum> can you get ADB access ?

[08:52] <The0x539> y'know what

[08:52] <asdfsdfsadf> Aevum: yes ADB works

[08:52] <The0x539> I'll wait until I actually get it

[08:52] <DrChandra> I don't think he can boot, so he won't have adb

[08:53] <asdfsdfsadf> ADB works from stock and custom recovery

[08:53] <asdfsdfsadf> They both can get pushed files

[08:53] <asdfsdfsadf> But when it's time to install

[08:53] <asdfsdfsadf> they fail

[08:53] <DrChandra> asdf: So the main OS is what isn't booting?

[08:53] <asdfsdfsadf> Yes

[08:53] <asdfsdfsadf> But main os can't even get installed

[08:53] <DrChandra> Can you mount anything from recovery?

[08:53] <asdfsdfsadf> Anything I throw at it gives a partition error

[08:54] <asdfsdfsadf> Let me go to recovery and I'll give you the exact errors

[08:54] <Aevum> you are pre flashing the correct boot.img for every rom before, no ?

[08:54] <DrChandra> I wish fastboot could boot directly into recovery. I have to operate it from the screen to get there, or double boot.

[08:54] <asdfsdfsadf> Aevum: yes

[08:55] <Aevum> and the hboot versions coinside ?

[08:55] <DrChandra> Damaged flash memory

[08:55] <Jonnyw2k> you can "fastboot boot recovery.img"

[08:55] <asdfsdfsadf> Jonnyw2k: lfashes but nothing works after it finishes

[08:55] <Aevum> i would format the whole internal memory and start over with a stock image

[08:56] <DrChandra> Jonnyw2k: Yes, but you're not booting what's on the device, and transferring it takes forever.

[08:56] <Jonnyw2k> he's trying that its the partition table that is messed up but he cant flash a new one

[08:56] <asdfsdfsadf> >adb push Rom.zip /sdcard/

[08:56] <asdfsdfsadf> Let me transfer this

[08:56] <asdfsdfsadf> IT's a rom

[08:56] <asdfsdfsadf> And I'll give you the message in TWRP{

[08:56] <DrChandra> I use TWRP

[08:57] <asdfsdfsadf> TWRP works here... it just can't install ****

[08:57] <asdfsdfsadf> Let me get the message

[08:57] <asdfsdfsadf> 1 minute

[08:57] <Sloth514> how come i feel like this conversation should b in #android-root

[08:58] <DrChandra> Well, if the main OS partition (system) is messed up, you can't mount it, and/or you can't write it, so trying to get TWRP to install Rom.zip isn't going to work.

[08:58] <asdfsdfsadf> wow

[08:58] <asdfsdfsadf> mother****ers

[08:58] <asdfsdfsadf> rom booting :/

[08:58] <asdfsdfsadf> PC detecting phone during boot

[08:59] <DrChandra> ADB to main OS?

[08:59] <asdfsdfsadf> I adb'd liquidsmooth rom.zip

[08:59] <asdfsdfsadf> and ran it from TWRP

[08:59] <asdfsdfsadf> IT installed with no issue

[08:59] <asdfsdfsadf> Rebooted

[08:59] <DrChandra> Oh, ran it. YOu didn't install it.

[08:59] <asdfsdfsadf> Liquid smooth is now loading...

[09:00] <asdfsdfsadf> Still loading. I guess the first time is slow

[09:00] <Jonnyw2k> DrChandra he flashed the rom.zip from TWRP, and now is booting the rom

[09:00] <DrChandra> He didn't say he flashed it

[09:02] <DrChandra> asdfsdfsadf: Did you do an Install from TWRP, and select Rom.zip from the sdcard?

[09:02] <asdfsdfsadf> Yes DrChandra

[09:02] <asdfsdfsadf> After pushing it with ADB

[09:02] <DrChandra> OK, he flashed it

[09:02] <asdfsdfsadf> But I tried that before and got errors

[09:02] <asdfsdfsadf> Some command I typed in fastboot must have fixed it...

[09:03] <DrChandra> How is it that TWRP knows how to write the system partition and all the flash tools don't?

[09:03] <asdfsdfsadf> But right now the issue is that I'm stuck at the animated boot scren (never got this far)

[09:03] <asdfsdfsadf> normally it takes time, but not several minutes, right?

[09:03] <Jonnyw2k> you can try and reboot

[09:03] <Jonnyw2k> press and hold power till it turn off

[09:04] <Jonnyw2k> then turn it on again

[09:10] <DrChandra> Well, if the device is badly broken enough, even fastboot won't work.

[09:10] <Khaytsus> fastboot will _always_ work unless you somehow broke the bootloader

[09:10] <DrChandra> logcat is miles above that

[09:10] <asdfsdfsadf> fastboot works, it just won't flash gpt.bin... wait let me try that again now that liquidsmooth actually got flashed though TWRP

[09:10] <Khaytsus> logcat requires the system be at least in some normal condition, even if it's boot looping or something

[09:10] <Leeds> Khaytsus: it seems that - at least at one point - fastboot was working in the sense of responding, but not working because the partition table was so screwed that it couldn't read/write partitions

[09:11] <Khaytsus> Leeds: Heh. Interesting. I suppose if you break _partitions_, yeah....

[09:13] <Khaytsus> fastboot flash partition gpt.bin <-- looks like this is what you do

[09:13] <asdfsdfsadf> So: fastboot flash partition gpt.bin Gives me: writing 'partition'... (bootloader) Preflash validation failed FAILED (remote failure) finished. total time: 0.423s

[09:14] <asdfsdfsadf> Which is the original error

[09:14] <DrChandra> I've never seen fastboot write to "partition" before. It's always "system", "boot", "userdata", or "cache"

[09:15] <asdfsdfsadf> The only difference between now and then is that the rom actually boots but just stays stuck on the animation screen

[09:15] <Khaytsus> That error means unsigned or unrecognized img file

[09:15] <Khaytsus> You sure this file is valid?

[09:15] <asdfsdfsadf> Yes, tried 2 copies

[09:15] <asdfsdfsadf> Ok something just happened

[09:15] <asdfsdfsadf> Rom just loaded

[09:15] <asdfsdfsadf> I'm on the home screen

(Rebooted twice after it was stuck on loading screen)