[X 2014 General] JulesJam:
MoFo will NOT work on 5.1 so do NOT upgrade to the 5.1 bootloader or partition table if you want to use MoFo.

This method involves purchasing a piece of software named mofo.exe that allows you to flash a modified, unsigned system image to your device despite its locked bootloader. The cost is $20. Links to the modified images for the XT1096 and XT1097 are found in the OP of the MoFo support thread:

http://xdaforums.com/general/paid-software/mofo-root-turbo-t3064404

This Method Does Not Disable Write Protection. Please read the following post if you don't know what that means:

http://xdaforums.com/showpost.php?p=60412113&postcount=292

This Method Trips the Root Checker and Your qe Will Convert to qe 1/1 Permanently! What this means is that if you boot your phone into recovery, you will see qe 1/1, which means you are currently running modified software. The qe will stay at 1/1 even if you flash back to stock.

1. Check Your Software Version and Enable USB Debugging

Go to Settings -> About Phone and read your Android Version – it should say 5.0 on the XT1096 and 5.0.2 on the XT1097. If not, and it says 4.4.4, you are still on 4.4.4 and as long as you have not modified your system by flashing using mofo.exe, you should still be stock and can take the 5.0 or 5.0.2 OTA.

If you haven’t already, go into Settings -> About Phone and click on Build Number repeatedly until you get the message you are developer now (or something like that). Then hit the back button and you will see that the Developer Options now appear. Click on Developer Options and check USB Debugging.

2. Install Motorola Device Manager (MDM) and Drivers to Your Computer

You can download MDM and the drivers here:

https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481

Install MDM on your computer after you download it. MDM should install the drivers.

3. Download Copies of Adb and Fastboot

You can get these from the Adroid SDK but you don’t need the whole Android SDK. Root Junky has the files you need on his site here:

http://rootjunkysdl.com/?device=Adb Fastboot Files

I made a folder on my computer named c:\mx2014 and put the zip file in there. Then I unzipped it with 7-zip.

http://www.7-zip.org/

4. Download a Copy of the Official Firmware

Root Junky has a copy of the XT1096 5.0 official firmware here:

http://rootjunkysdl.com/?device=Moto X 2014&folder=Official Firmware

and the XT1097 5.0.2 fxz is here:

http://www.filefactory.com/file/1cekivswpakf/VICTARA_ATT_XT1097_5.0.2_LXE22.46-34_cid1_CFC.xml.zip

You should download it into a separate folder (I put mine in a folder named c:\mx2014\lollipop) and unzip it so if you have any problems you can flash back to stock. Place a copy of fastboot.exe, adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll in the folder with the lollipop official firmware.

Also if you are planning on taking the 5.1 OTA when it is released, you would need to flash your system back to stock so it is a good to have it ready. And if you are planning to update to 5.1 via MDM I would still flash back to stock because if you don't, IME MDM will detect that you are running a modified software and will wipe your device when it upgrades you to 5.1. If you flash back to stock first, MDM will not wipe your data and sdcard when it upgrades you to 5.1.

5. Test the Drivers and Adb

Once you have completed Steps 1-3, you can test the drivers and adb. Power on your phone and after it boots, connect it to your computer via the data cable. Open a command prompt, and then navigate to the directory where you have adb and fastboot by typing:

cd c:\mx2014 (or wherever you have adb and fastboot stored)

and hitting enter. Then type:

adb devices

You should then see a prompt on your phone asking you to authorize your computer. Check always allow and click OK. Adb should show you the serial number (not the IMEI) of your device.

Now type:

adb reboot bootloader

to get into bootloader (BL) mode (aka fastboot mode).

6. Test the Drivers and Fastboot

Once you are in BL mode, double check that on your phone’s screen right above the first green line you see this:

Transfer Mode: USB Connected.

If it does not say that, go to Root Junky’s site and download the Motorola drivers and manually install them.

http://rootjunkysdl.com/?device=Android Drivers&folder=Motorola

Then type:

fastboot devices

and hit enter. Fastboot should return your device’s serial number.

7. Test Getting into Recovery and Wiping Cache

While in BL mode, scroll down to Recovery by pressing the vol dwn button to highlight Recovery. Then select Recovery by pressing vol up. You should see the dead android with a red triangle having an exclamation point in it coming out of its stomach. Then press the pwr button for a couple of seconds and then press and release the vol up button and then release the pwr button to get into the recovery menu. Use the vol dwn button to scroll to wipe cache partition and then press the pwr button to select it. You should see that the cache is being formatted.

When cache is done being wiped, the recovery menu should reappear and you should hit the pwr button to reboot into system.

8. Test That You Know How to Get Into Bootloader Mode Using Buttons

Disconnect your phone from your PC, power down your phone and then hold down volume down and then press and hold the power button. Hold both buttons simultaneously for about 4 seconds and then release the power button and then the volume down button. This should put you in Bootloader mode (aka fastboot flash mode). Alternatively, you can try pressing volume down + volume up + power and holding for about 4 seconds then releasing.

Once in BL mode, you can either hit the power button to boot back into Android or if you want to test that you know how to flash back to a stock system, complete the instructions in Step 9.

NOTE – flashing the system partition does NOT affect your apps/settings/text messages/call history, which are stored on the data partition, not the system partition. Updates to system apps since 5.0/5.0.2 was rolled out will be lost as well as any system app settings that are relevant to the updates or stored on the system partition.

NOTE – flashing the system partition does NOT affect your stored media (e.g, pictures, music, videos), which are stored on the sdcard partition, not the system partition.

9. Test That You Know How to Flash Stock System (Optional)

While in BL mode you can test that you know how to flash back to a stock system. This is optional but if you have never done it before, it is a good idea to do it IMO. When you flash a system.img, you do not lose your apps/data/texts or your media unless the app is a system app, then you will lose the updates since 5.0 was rolled out (but those can be re-downloaded from the Playstore). However, it is always a good idea to backup before you flash in case you do something wrong. I use SMS Backup and Restore to backup my texts and my photos are backed up to my Google account.

Put your device in BL mode and then connect it to your computer. Open a command prompt and navigate to where you have the stock 5.0/5.0.2 image stored on your computer. Type the following:

fastboot flash system system.img_sparsechunk1

and then hit enter to flash the first sparsechunk. Repeat for the other sparsechunks until you have flashed all 9 of them. Then boot into recovery, wipe cache and boot into system.

10. Purchase MoFo.exe

First you should go to:

http://xdaforums.com/general/paid-software/mofo-root-turbo-t3064404

and read all of the information. And be sure to watch Root Junky’s video here:

https://www.youtube.com/watch?v=AXAYjbf76II&feature=youtu.be

The high level summary of what you will be doing is this:

1. Verifying that your device qualifies for purchasing mofo.exe by using MoVerify;

2. Using the link generated by MoVerify to navigate to where you can purchase mofo.exe; and

3. Purchasing and downloading mofo.exe.

11. Download, UnZip and Flash a Pre-rooted Ext4 Image

The OP of the MoFo thread has links to the pre-rooted images that are available for the XT1096 and XT1097. Once you download one of them, unzip it and move the image file to wherever you have mofo.exe stored on your computer. Put your device into BL mode and connect it to your PC. Then navigate to where mofo.exe is stored on your computer, click on mofo_gui.bat and a command window will open. Type the following at the command prompt:

mofo.exe flash [Insert name of image file here]

then hit enter. Of course you do not put brackets around the name of the image file. Once the pre-rooted image has been flashed (about 25 minutes), boot into recovery and wipe the cache then boot into system.

It may take a few seconds for the boot animation to start so don’t panic. Once the system has booted, to check that you are rooted, download root checker basic from the Playstore and confirm that you are rooted. Your device will also bypass the subscription check when you turn on WiFi hotspot.

The copy of mofo.exe that you buy is specific to your device. It cannot be used on any other device, including any warranty replacement devices that you may get in the future. But you can use it on your device as much as you want once you purchase it - unless you upgrade to a higher version of Android. If you upgrade to a higher version of Android, once that higher version of Android is supported by MoFo for your device, you can re-download mofo.exe for the higher Android version.

http://xdaforums.com/showpost.php?p=60471334&postcount=432

Mofo will NEVER be updated to support 5.1 as the exploit was closed with the 5.1 bootloader.