[X 2014 Q&A, Help & Troubleshooting] jeffy210:
So, after owning my beautiful Moto X for 1 month, I found that the screen is not nearly as shatter resistant as my old iPhone 4S. After managing to completely shatter it, I called Motorola up for a replacement (which for a customized Pure cost $125) and it was on its way, but before that I needed to get my old data off. Luckily I have unlocked my bootloader and rooted my phone in advance, but i had turned off USB debugging and had a passcode lock. All of the guides for making a full backup assume that you have screen access. After messing around for a few days, I finally managed to make a full backup of my phone. I thought I'd put together this guide for anyone else who has the same issue.

Assumptions

Your bootloader is unlocked and phone rooted (do not try to unlock it now or it will wipe the phone)

Your phone is not encrypted (there's still a way around this which I'll cover but I did not have to use)

You have ADB/fastboot set up on your computer (and have tested it at least once)

Required files/guides

CWM recovery file - http://motoxroot.com/cwmtwrp-recovery-for-moto-x/

Lock Screen removal guide - http://xdaforums.com/showthread.php?t=1409304

SQLite DB editor (I'm on Windows) - http://sqliteadmin.orbmu2k.de/

Androidscrencast - https://code.google.com/p/androidscreencast/

ADB keystroke events - http://thecodeartist.blogspot.com/2011/03/simulating-keyevents-on-android-device.html

Steps

The first thing I did was download the customer CWM image for the 2014 Moto X which can be found here:

http://motoxroot.com/cwmtwrp-recovery-for-moto-x/

Next I went rebooted the phone into bootloader mode by holding "Volume Down + Power" for about 15 seconds. I could not see images on the screen but I could tell when it lit up.

Note: If you have an encrypted phone, you can use an OTG cable and a standard USB keyboard to type in the password blind. I used something similar for the PIN code, however this guide does not actually need to worry about that

Test that you have fasboot access by running

fastboot devices

You should see your device listed

Boot the CWM recovery image (you do not have to flash it which is nice)

fastboot boot XT1095recovery.img

Wait a few seconds and verify that you can now access your phone via ADB

adb devices -l

If this works, you now have a shell to be able to do the next part which is removing the passcode and enabling USB Debugging I followed the guide at http://xdaforums.com/showthread.php?t=1409304 to do remove the lock screen

Mount the data partition of your phone by running

adb shell mount data
adb shell mount system

Grab the settings DB from the phone and copy it locally (Other guides say to copy to an intermediary, but since you're using a recovery ROM the files can be directly accessed)

adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db

Open the file in your SQLite editor of choice and run the following statements

UPDATE secure SET value=65536 WHERE name='lockscreen.password_type';
UPDATE secure SET value=0 WHERE name='lock_pin_autolock';

While we have the settings DB open, it's also a good time to enable ADB Debugging by running the following statements (credits to http://stackoverflow.com/questions/13326806/enable-usb-debugging-through-clockworkmod-with-adb though I had to mod some more stuff)

UPDATE global SET value=1 WHERE name='adb_enabled';
UPDATE global SET value=1 WHERE name='development_settings_enabled';

Push the file back to it's original location

adb push settings.db /data/data/com.android.providers.settings/databases/settings.db

From here, the next set of commands should be run within the shell. You can access it by running

adb shell

Remove some existing property files

rm /data/property/persist.service.adb.enable
rm /data/property/persist.sys.usb.config

Add in the ADB settings

echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop

Correct the permissions for the settings.db file

chown system:system /data/data/com.android.providers.settings/databases/settings.db
chmod 660 /data/data/com.android.providers.settings/databases/settings.db

At this point, everything is ready to go and we're ready to reboot to your real install with no pin code and ADB enabled.

Reboot your phone

adb reboot

Run androidscreencast (don't worry about the keyboard/mouse instructions they don't work). Chances are the screen will be blank, press the Power button your phone and wait (it's got a *very* slow refresh rate)

Once you see your desktop, you can now run an ADB backup. I like getting everything, but this will take a while because it grabs all images, music, SD card stuff, etc.

adb backup -apk -shared -all -f backup.ab

On the screencast you'll see the prompt pop up asking you to enter a password and confirm. This was the part that took me a while and you have to do it fairly quickly otherwise it'll time out. In a separate windows run

adb shell input text <yourpassword>
adb shell input keyevent 61
adb shell input keyevent 61
adb shell input keyevent 66

At this point, you should see a full backup kicking off and running. You can run a logcat to watch the process of it. In some cases a full backup may hang if a resource has a file open, the two commands to work with this are:

adb shell logcat | grep BackupManagerService

To kill a process the backup is hanging on, enter the shell

su
ps | grep <nameOfProcess>
am force_stop <nameOfProcess> (the clean way)
kill <pid> (the dirty way)

Hope this helps! This took me a little while to figure out but now I have a full backup and my new Moto X will be here within the

week.