[Moto X Android Development] Ctrl-Freak:
Intro: Below are the instructions for 3 steps to get Kitkat 4.4 (140.44.3.ghost_att) running on the AT&T moto x with locked bootloaders:

Install full 139.44.44.ghost_att (leaked) rom

Patch the rom to 140.44.3.ghost_att (ota to leak)

Patch the modem to the 140.44.3.ghost_att version

The updates came in stages, otherwise it would not have been my intention for this to be so long and messy. I soon hope to create a single rom and simplify the instructions. Testers can help with the WIP items below...

WARNING: I AM NOT RESPONSIBLE IF YOU MESS UP YOUR PHONE.

This rom is simply a flashable zip made from the ATT 4.4 leak which will install version 139.44.44. It is intended for the ATT moto x with locked bootloaders, however it should work with an unlocked bootloader if you fastboot flash the included boot.img. The flashable zip does not modify the bootloader or anything besides /system, but the full instructions will wipe out everything.

Prerequisite:

Att moto x with either the .51 (original) or .54 (1st OTA) stock rom

BACKUP ANYTHING YOU DON'T WANT TO LOSE. THESE INSTRUCTIONS WILL WIPE YOUR USERDATA AND SDCARD.

Instructions for ATT moto x with locked bootloader:

root with PwnMyMoto or RockMyMoto (for .51 or .54 respectively, thanks jcase)

install safestrap (thanks Hashcode and Team Win)

download rom to sdcard (motox-att-kitkat-leak-44.zip, link below)

download supersu flashable to sdcard (link below, thanks Chainfire)

enter safestrap recovery (TWRP) and activate the stock-slot

flash rom (motox-att-kitkat-leak-44.zip) to the stock-slot using TWRP recovery

immediately flash supersu using TWRP recovery

within TWRP reboot to bootloader

flash boot.img (included in ROM) to boot: fastboot flash boot boot.img

flash same boot.img to recovery: fastboot flash recovery boot.img

erase cache: fastboot erase cache

erase userdata: fastboot erase userdata (This wipes everything) This is not necessary. Thanks HeroSon.

powerup normally and enjoy

Update 11/17/2013: I made a patch to safely apply the ota that was received by people running the att 4.4 leak. This will bring the system build up to 140.44.3.ghost_att. The patch script DOES NOT modify anything except /system, and should be safe. The updated kernel (boot.img) is included in the zip. In case something goes wrong, backup your data to be on the safe side. Here are the Instructions:

Complete the installation of the att 4.4 leak (above instructions)

Reinstall safestrap This is not necessary. Thanks HeroSon.

Download the patch to sdcard (motox-140.44.3.ghost_att-ota-safepatch.zip, link below)

Reboot into safestrap recovery (TWRP)

Install the patch (motox-140.44.3.ghost_att-ota-safepatch.zip)

within TWRP reboot to bootloader

flash boot.img (included in the patch) to boot: fastboot flash boot boot.img

flash same boot.img to recovery: fastboot flash recovery boot.img

powerup normally

Update 11/18/2013: I attached a link to the modem patch that will update the 139.44.44 modem to a 140.44.3 modem. I really wanted to create a fastboot flashable NON-HLOS.bin image, but I haven't tested the procedure. Here are the instructions for the modem patch that I have tested:

Download the modem patch to the sdcard (motox-140.44.3.ghost_att-modem-patch.zip, link below)

Fastboot flash NON-HLOS.bin (included within the zip): fastboot flash modem NON-HLOS.bin

erase modemst1: fastboot erase modemst1 (I've done these erases a few times. They are prudent when you flash a modem.)

erase modemst2: fastboot erase modemst2

Reboot into safestrap recovery TWRP

Install the modem patch (motox-140.44.3.ghost_att-modem-patch.zip)

Powerup normally

Notes:

I am running the modem from the .54 ota, and it works with kitkat. I am not sure about the original .51 modem. The 140.44.3 modem is necessary after running patch to 144.44.3. This fixes the settings->security force close.

The safestrap "recovery or continue" screen still appears when you boot. If you erased userdata, reinstall safestrap to get all of the program back.

You should always be able to flash back to stock, as this procedure does not modify your bootloader.

There is a new version of safestrap. These instructions work with either v3.63 and v3.65. (Thanks HeroSon.)

I get a FC in settings->security on the 140.44.3 (patched) version. So far this is the only problem I have noticed. This force close is fixed by the modem patch.

WIP: I would like testers to help with the following:

What happens if you skip step 12 and don't erase useradata (this will keep [more of] safestrap intact)?

How do you remove safestrap manually?

Safestrap has been updated. Does the original 139.44.44 rom now run in a rom slot with 4.2.2 running in the stock-slot? What about the patches? I tried it - doesn't work.

Once 4.4 is installed in the stock-slot, can you backup the stock slot and restore to a rom-slot? (I'm guessing it works this way.) I guessed wrong. This doesn't work. Apparently safestrap needs a bit of tweaking to work with KK.

Is it possible for Safestrap TWRP to flash boot.img to the stock slot? (My experience is that it did not flash boot.img when using a rom-slot)

To clean up this mess, I am considering making a single rom that includes the base 4.4 version with the safepatch included. PM if you want to help by testing this all in one rom once I have it finished. There is a new rom of the official att 4.4.

I have an 100MB ext4 image of /modem. I would like guidance making a fastboot flashable non-HLOS.bin image. (Otherwise I wont be able to combine the leak and the patch.) I see instructions that might work if someone wants to try it and report their findings: http://xdaforums.com/showthread.php?t=1588461 The official att 4.4 SBF includes NON-HLOS.bin

Part of the stock modem procedure is to flash "fsg.mbn", but I have not done that because I have been able to confirm that you can downgrade after flashing it. Can anyone confirm that this is safe on the moto x? (http://xdaforums.com/showthread.php?t=2529569) This works.

139.44.44 rom download : http://www.androidfilehost.com/?fid=23212708291677349

rom patch to 140.44.3 download: http://www.androidfilehost.com/?fid=23212708291678076

modem patch to 140.44.3 download: http://www.androidfilehost.com/?fid=23212708291678561

supersu: http://xdaforums.com/showthread.php?t=1538053 (download "CWM / TWRP / MobileODIN installable ZIP")

Original source files: http://rootzwiki.com/topic/107721-att-moto-x-44-leak/ (thanks designgears)