- Be sure you have installed either CWM or TWRP recovery.
- Your Moto X bootloader should already be unlocked (see the how to unlock bootloader of any Motorola devices).
- Make sure you firstly backup your existing data because you will need to perform a factory reset as the part of the instructions.
- Remember to perform the instructions only you are sure your device is Moto X (1st Gen) not any other models.
- You need to also enable Moto X USB Debugging mode.
- Follow the instructions here by your own choice, none should be held responsible if you end up bricking or damaging your phone, all the risks are yours.
- Have a sufficient battery power before proceeding to the flashing instructions.
Install CM 12 Android 5.0 ROM On Motorola X (1st Gen)
- Download Dirty Unicorns Android 5.1.1 Lollipop ROM here (Basket Build site).
- Download Gapps here (Dirty Unicorns site).
- When you've done downloading all the files above now it's time to connect your phone to your PC with the help of a USB cable.
- Transfer all the zip files to your phone internal storage (Recommended on Root directory).
- Now disconnect your Moto X from computer after the zip files successfully transferred to your phone's internal storage.
- Power off your Moto X then boot to recovery mode by utilizing these buttons; Power + Volume Down + Home buttons for about 3 or 4 seconds then release them and boot menu will show up.
- Inside the recovery, perform a factory reset by selecting the Wipe Data/Factory Reset.
- Head to the the main menu then perform another cleaning like Wipe Cache Partition and then to Advanced menu to choose Wipe Dalvik Cache. Afterward you need to also clean data partitions and system.
- Then go back to main recovery menu to further selecting Install Zip From SD Card and then Choose Zip From SD Card to get the Dirty Unicorns zip file inside your phone's internal storage. Flashing process will begin !
- To flash the Gapps just repeat the above process.
- Now you can *****Go Back***** to reboot your phone by selecting Reboot System Now option.