Monday, December 26, 2011

Migrating your Droid X to CyanogenMod

I recently migrated from a stock Gingerbread Moto Blur install of Android on my VZW Droid X to CyanogenMod7 (specifically RevNumbers's CM4DX-GB kang, if you happen to care) and found it to be a rather arduous task to carry all of my data and settings to the new ROM.  I was talking to my cousin over Christmas break and she was curious to learn how to go about doing it as she had never installed a custom ROM before and needed step-by-step instructions (as she didn't feel like bricking like I did a good dozen times or so while I was figuring all of this out).  So I figured I would try to compile a step-by-step guide of how to go from stock to CM7 with *almost* everything still intact.

I will start by outlining the process and then going back and filling in the details as I get the chance, so this may be a bit sparse in some steps until I get more time.  I'll probably do a ToC section link block too eventually, but it's late and I'm just throwing this all down before I go to bed.  Also, there are steps in here specific to the Droid X because that's what I have, but some of this information may be useful to other phones as well.

Update your device
NOTE: If you are currently on Froyo and have already rooted your phone, you need to back up your apps and data first, then sbf to a fresh install of Froyo, then continue.  Updating to stock GB from rooted Froyo messes up your ability to root on GB.  If you have never rooted before, these aren't the warnings you're looking for, move along.

To begin with, you want to make sure you are running the most up-to-date version of Android available from Verizon.  The reason for using an official update is that there are some things that cannot be updated (or are more difficult to update) from unofficial sources.  These include the kernel and the baseband (the firmware for your phone's radio), and perhaps other things I don't know about.  You can check what version you are currently running by pressing the Menu key and selecting Settings>About Phone.

As of this posting, the current Android System version available from Verizon for the Droid X is 2.3.3, and the current Baseband version is BP_C_01.09.13P.  If you have these versions, you're set.  Otherwise, hit Check For Updates.  Go ahead and let the update finish and your phone should reboot.

Root your device
Once you're running stock Gingerbread, you can go ahead and root your phone.  Read up on how to do that here (it says it's for the Droid 3, but it works just fine for the Droid X).  NOTE:  DO NOT TRY THIS IF YOU PREVIOUSLY HAD ROOT ON FROYO WHEN YOU UPDATED TO GB.  If this is the case, you will have to sbf before rooting, meaning you won't be able to do a full backup.  Backup what you can, sbf, and then root.

Install useful tools
The 3 most useful applications I have found for dealing with data backup, ROM customization, and other stuff here are ROM Manager, ROM Toolbox, and Titanium Backup.  All 3 of these have free versions and are available in the Android Market.  I suggest purchasing the Pro versions of each, they have additional features and plus you'll be supporting the developers that make this stuff possible.  If you don't want to purchase them all, I would say ROM Toolbox and Titanium Backup are the most worth it.  Regardless, install whichever version you wish but get all 3 apps.

Install ClockworkMod Recovery
Open ROM Manager and click Flash ClockworkMod Recovery. If you're on the Droid X, when it asks you to confirm phone model, you have the choice between Droid X and Droid X (2nd init).  Select the one that says 2nd init.  The other option is currently useless because 2nd-init is required since the bootloader is locked and it won't work without 2nd-init.  If it prompts you for superuser access, say yes and check the box to remember (basically just do this any time you get this prompt as long as you trust the app; the 3 apps I am using in this guide are all trustworthy).

Understanding each type of backup
There are two main backups going on here, a NANDroid backup and a Titanium Backup, then there is the SMS backup.  There is a reason you are doing both of these.  The NANDroid backup is a system image that allows you to restore your entire phone back to the state it was in at the moment you create the backup.  The Titanium backup backs up all of your applications and associated data in a format that you can then reinstall once you have flashed your new ROM.  This allows you to reinstall all of your apps without having to download them all, and also retains all of your data like game saves and such.  Backing up your SMS allows you to keep all of your text messages (but so far there doesn't seem to be a way to back up your MMS, so you'll need to have saved any photos to your SD card manually).  The SMS database in the stock ROM is incompatible with the one that CyanogenMod uses, so you'll have to use a 3rd party backup solution that stores the messages in a separate format.

Create a Nandroid (system image) backup
Note:  The size of a Nandroid backup will vary, but I would suggest having at least 1.5-2GB free on your SD card before attempting this
Once you have flashed ClockworkMod Recovery, click Reboot into Recovery.  Your phone should reboot and you will be in a text based menu.  You navigate the menu with the volume up/down buttons, the camera button to select, and the hardware "back" button to return to the previous menu.  The power button just turns the screen on and off so if you accidentally hit it and the screen goes off, just hit it again and it will come back.  Select backup and restore->backup and then just wait for it to complete.  Once it's done, back out to the main menu and select reboot phone now.

Backup your applications and data
Note:  The size of the backup will vary greatly depending on how many apps you have installed and what you choose to back up.  Again, I suggest having at least 1GB free on your SD card before attempting the backup.
Open Titanium Backup and press the hardware Menu button and select Batch.  At the very least, select Backup all user apps, but you can backup system data if you want too.  You won't be able to restore the system data into an incompatible ROM, but if it gives you peace of mind to have it backed up, go for it.

Backup your text messages
There are many ways to backup SMS messages, but if you use a 3rd party SMS client, it may very likely have the option to back up your messages.  I use GoSMS Pro, and the option is found by pressing the hardware Menu button and going to the Services tab and selecting SMS B&R.

Install CyanogenMod (CM4DX-GB)
Because the Droid X has still not received a stable release of CyanogenMod, you're stuck installing a nightly release.  Also, the mainline CM7 does not support the Gingerbread kernel, so you'll want to install the RevNumbers releases, which do support the GB kernel.  The kernel does not get updated when you install a ROM, so you need to already have the correct kernel installed before you flash the ROM or you will brick your phone.  Open ROM Toolbox (since the RevNumbers Nightlies in ROM Manager are not kept up-to-date) and select ROM Manager (the button inside of ROM Toolbox, not the app named ROM Manager).  Under the ROM list select RevNumbers CM7 Nightlies (you can pick any ROM you want, but I highly suggest CM7, at least for your first ROM).  Pick the newest version and select download.  Wait for the download to finish.  Also download the latest version of Google Apps, or you won't have an Android Market.

Update: For more up-to-date releases of CM4DX-GB, follow this thread, as ROM Toolbox hasn't updated their list in quite awhile.

I'm going to outline how to install the ROM manually, since ROM Toolbox hasn't been working right with automating ClockworkMod Recovery tasks, although they may have fixed that, I don't know...

In the main menu of ROM Toolbox, select Rebooter, then Reboot Recovery, and you should be back to the text menu of ClockworkMod Recovery.  Select Factory Reset/wipe data, then select install update zip.  Choose select zip from sd card and browse to romtoolbox/downloads/RevNumbers and select the zip in that folder (or browse to the location where you downloaded it, if you got an updated release from the forum thread above).  Repeat with romtoolbox/downloads/gapps.  Now reboot your phone and (if all goes well), it should boot into CyanogenMod.  The first boot WILL take a long time, but if it just plain doesn't boot, check out the troubleshooting guide below.

Restore your applications
Install Titanium Backup.  Batch>Restore User Apps (NOT system data)

Restore your text messages
Use the same app you used to back them up in the first place

TROUBLESHOOTING

Unbricking
It's late, I'm getting tired, for now, Google "[your phone model] Gingerbread sbf" to get the files and  probably a guide.  You'll also need an app called RSD Lite, the latest version (AFAIK) is 4.9.  There is a bug in the software resulting in an error, something like invalid file or filename or something I don't remember, but that error is bogus and there is a workaround I'll get around to posting later... bah... should be enough info to get started, so for now goodnight.