[X 2014 Original Android Development] bbs2web:
CM 13 - Full installation notes for Moto X 2014 (2nd generation)

I got mine only August last year and sought it out for its form factor and brilliant display. The battery could be bigger as I only get about 4 hours of active use, but standby on Marshmallow is superb.

Many thanks to crpalmer and all other contributors for their excellent work! My personal experience is that everything simply works. My niggles:

FC on clock at boot.

Bluetooth - car kit occassionally switches to handset

Bluetooth - car (merc cla220) unable to read SMS message for about 1.5 weeks now

Here are my end-to-end notes as updated on the 31st of March 2016:

CyanogenMod 13 for Moto X 2014

CyanogenMod ROM	: [url]http://download.cyanogenmod.org/?device=victara[/url]
Google Apps	: [url]http://xdaforums.com/slimroms/general/gapps-official-slim-gapps-trds-slimkat-t2792842[/url]
Java SDK	: [url]http://www.oracle.com/technetwork/java/javase/downloads/index.html[/url]
Android SDK	: [url]http://developer.android.com/sdk/index.html[/url]
Motorola Device Manager	: [url]https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481[/url]
UniversalADB Drivers	: [url]https://github.com/koush/UniversalAdbDriver[/url]
TWRP for victara	: [url]https://twrp.me/devices/motorolamotox2014.html[/url]

1. Unlock boot loader
1. Install 'Java SE Development Kit' known as 'JDK' (confirmed to have worked with Java SE Development Kit 8 Update 77 x64)
eg jdk-8u77-windows-x64.exe
2. Install Android SDK
Launch 'Android Studio', this will download and install latest available tools
3. Install Motorola USB drivers
NB: This restarts your PC!
4. Boot windows with driver signing disabled
Start -> Settings -> Update & Security -> Recovery -> Advanced startup (Windows 10 x64)
5. Install UniversalADB Drivers
1. Start -> Run -> notepad "C:\Program Files (x86)\ClockworkMod\Universal Adb Driver\usb_driver\android_winusb.inf"
2. Navigate to '[ClockworkMod.NTamd64]' and add:
MotorolaADBInterface	= USB_Install, USB\VID_22B8&PID_2E76&REV_0228&MI_01
MotorolaBootLoaderInterface	= USB_Install, USB\VID_22B8&PID_2E80&REV_0100
6. Unlock boot loader
1. Connect Phone and wait for device drivers to finish installing
2. Open an Administrator command prompt
1. cd C:\Users\Syrex\AppData\Local\Android\sdk\platform-tools
2. fastboot devices
3. fastboot oem get_unlock_data
Sample output: 3A35426583305299#5441337563900039353030585431303935000000#BB47C58D4835EF6D6475866EF4F1AF54A11E33A2#89364E0D0B0000000000000000000000
4. Navigate to [url]https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b[/url]
5. fastboot oem unlock 44GCLETLBWOH3Q6NIVMI
7. Replace warning message about unlocked boot loader:
1. On phone: Settings -> About phone -> Tap 'Build number' repeatedly until you're a developer
2. On phone: Settings -> Developer options -> USB debugging -> Enable
3. Extract 'Replace unlocked boot loader warning logo.zip' to 'C:\Users\Syrex\AppData\Local\Android\sdk\platform-tools'
4. Open an Administrator command prompt
1. cd C:\Users\Syrex\AppData\Local\Android\sdk\platform-tools
2. adb reboot bootloader
3. fastboot flash logo logo.bin
8. Install TWRP Custom Recovery
1. Open an Administrator command prompt
1. cd C:\Users\Syrex\AppData\Local\Android\sdk\platform-tools
2. adb reboot bootloader
3. fastboot flash recovery twrp-3.0.2-0-victara.img
4. fastboot reboot
5. Doesn't work? Try once off fastboot boot twrp-3.0.2-0-victara.img
9. Upgrading? Perform full backup
1. Boot in to Recovery (TWRP)
2. Perform full backup
3. Copy full backup to PC
1. This PC\Moto X 2014\Internal Storage\TWRP\BACKUPS
2. Copy backup folder eg TA095007V9
10. Copy CyanogenMod + Google App zip packages to phone
1. Open an Administrator command prompt
1. cd C:\Users\Syrex\AppData\Local\Android\sdk\platform-tools
2. adb push cm-13.0-20160331-NIGHTLY-victara.zip
3. adb push Slim_zero_gapps.BETA.6.0.build.0.x-20160331-1608.zip
11. Install CyanogenMod + Google Apps
1. In custom Recovery:
1. Mounts and Storage -> Format /system
2. Mounts and Storage -> Format /data
3. Mounts and Storage -> Format /cache
4. Install ZIP -> Install ZIP from sideload
adb sideload cm-12.1-20150611-NIGHTLY-victara.zip
5. Install ZIP -> Install ZIP from sideload
adb sideload gapps-lpmr1-20150503-signed.zip
11. Upgrading CyanodenMod + Google Apps
1. In custom Recovery:
1. Install ZIP: cm13
2. Install ZIP: Slim_zero_gapps	(you don't need to do this every time)
3. Wipe cache and dalvik
4. Reboot

Work around for TWRP not booting after having upgraded to CM13:
8. Install custom recovery
1. Open an Administrator command prompt
1. cd C:\Users\Syrex\AppData\Local\Android\sdk\platform-tools
2. adb reboot bootloader
3. fastboot devices
4. fastboot flash recovery twrp-2.8.6.0-victara.img
5. Doesn't work? Try once off fastboot boot twrp-2.8.6.0-victara.img
2. Boot in to CM, then ensure 'Update Cyanogen recovery' is disabled in 'Developer Options'
3. Repeat steps 8 above to go back to TWRP 3.0.2