[Moto X Q&A] duendemago:
Dear XDA community. After several days of trying alot of things I dare to bother you because Im really in need of your expertise (Excuse my english please, Im not native speaker).

I will explain everything in ordered manner, so the help may come easily:

Original state when device was gifted to me:

Device: Moto X XT1058 (Ghost Version 2013)

Bootloader: Unlocked

Rooted: Yes

Android Version: 4.4.4 (RETAIL-BR_4.4.4_KXA21.12-L1.26_52_cid12_CFC_1FF)

FIRST PROBLEM DETECTED: Wifi suddenly stopped working

Fix attempted: Hard reset (wipe, etc etc).

Result: Nothing changed

Alternate fix: Installed Lollipop 5.1 and wifi stayed the same (I used the method of going from 5.0.2 to 5.1).

Lollipop versions used: Blur Version 221..41.31 and 38 (5.0.2) and 222.21.2 (5.1) all of them ending in ghost_row.Brasil.en.BR

MEthod used: ADB, succesfull install (The tutorial I followed asked for use OTA for installing the first upgrade of the 5.0.2, but my wifi is not working and I havent payed my phone, so no Data for me this month :( )

So until that, everything was fine except wifi. I read in some forums that I should try the original stock rom for the device, so I succesfully downgraded to 4.2.2 version---> WIFI STILL NOT WORKING

Ok. I know Im stubborn, so I said, what the hell, lets return to the 4.4.4 version I used to have. I re installed and EVERYTHING WAS FINE also there.

Now, here is where it gets super weird because I really made a bad mistake, but I know there is some hope in this forums: I tried to install again 5.1 for the second time (using the little by little upgrade from 5.0.2 to 5.1) but I forgot that the first time, the tutorial demanded to install the 5.0.2 through OTA (By placing the file inside the root folder of the device). But as you may probably know, unless you have wifi or data the OTA wont let you go with the update (and I as I explained above, I dont have nether!!!, so thats why I used ADB with good results), so I stupidly tried to flash the 5.0.2 directlty from the device using recovery mode instead of using ADB (as an alternate step to OTA)--->Device bricked???

This is all the error list I have after all that mess, and I dont know what else to do:

-------------------------

START OF LIST

Status Code: 0 (it was on 3 before)

Boot Mode: Working but seems to be locked (used to have the "unlocked bootloader warning" before)

Error Showing when starting phone:

"downgraded security version

update gpt_main version failed

Failed to hab check for gpt backup: 0x35

CID Read Failure

Invalid CID Status 0x69 Customer ID error. Contact Dealer: 0xdead

Fastboot reason: Invalid CID"

Error showing when trying to go to Recovery Mode:

Boot Up Failed

Fix #1 attempted: Flashing Team Win Recovery from Fast Boot and Moto Fast Boot

Error #1 Shown on CMD prompt on PC:

"(bootloader) Variable not supported!

target reported max download size of 805306368 bytes

sending 'recovery' (9136 KB)...

OKAY [ 0.835s]

writing 'recovery'...

(bootloader) Permission denied

FAILED (remote failure)"

Error #1 Shown on device:

"Fastboot Reason: Invalid CID

USB Connected

getvar partition-type: recovery

getvar max-download-size

downloading xxxx (9355264) bytes

done"

Fix #2 attempted: Flashing stock rom using different Fastboot commands (RDB doesnt recognice device, but Fastboot do recognice device) such as "fastboot oem, etc etc--> its a big list)

Error #2 shown: Variable not supported! (in all cases)

Fix #3 attempted: Trying to re unlock bootloader in case is still locked using "fastboot oem get_unlock_data" command

Error #3 shown on CMD window: Could not get unlock data!

Error #3 shown on device: Process oem command: get_unlock_data

Fix #4 attempted: Trying to flash the stock rom from fastboot (version RETAIL-BR_4.4.4_KXA21.12-L1.26_52_cid12_CFC_1FF.img)

Error #4 shown on CMD on PC:

"(bootloader) Variable not supported!

target reported max download size of 805306368 bytes

sending 'recovery' (1 KB)...

OKAY [ 0.279s]

writing 'recovery'...

(bootloader) Permission denied

FAILED (remote failure)

finished. total time: 0.379s"

Error #4 shown on device:

"getvar partition-type: recovery

getvar max-download-size

downloading 1364 bytes

done"

Possible solution found (not working for me): To open the stock file with note pad and erase all get var lines and save, and try again. This stock rom im using doesnt have those lines. But any way, any attempt of flashing whatever ends in a "not valid" or something similar error :(

END OF LIST

____________________________

So I guess I have tried many things, I know Im missing something but Im not but a noob user, so I dont know how to interpetrate this errors and messages!! My only guess is that my device became "non rooted" and the bootloader is screwed in some way. I just... I just dont know what to do, I seriously need your help guys!!!!! I know it maybe is easier to go to a repair technician but I really would appretiate your help so I can learn from my mistakes!!!

Questions: Is there a way to root the device and fix the bootloader from Fastboot mode?

Thanks and more thanks to you all!!!!! May the gods of technology help us all!!! :angel: