I was recently asked to help someone to root their HTC Legend and update it to the latest Cyanogenmod. Upon inspection, the phone was running Froyo with a software build 3.15.707.3, as such it would need to be downgraded before we could proceed.
There were a number of guides found in various places on the internet but no single guide managed to cover all of the issues that cropped up as part of the installation.
As such I thought it would be good to condense them all into one location.
Download and install the Android Developer Toolkit
If you have mucked around with Android devices before you might already have these installed, otherwise…
The installer for this can be found here
Specifically, it is the “Android SDK Tools” and “Android SDK Platform-Tools” packages that are required to be installed.
Download and install HTC Sync
Not having owned a HTC branded phone for some time, I first needed to download HTC Sync. (for drivers, etc)
Version 2.0.33 was required for later steps, it can be obtained here.
There were a large number of tools available with various methods of how to make a Goldcard.
The most simple one (which also worked) could be found here and it features a helpful gui tool and good instructions.
Preparing for the Downgrade
This is where most of the dramas occurred. Most guides talked about simply downloading hack4legend and using crackin.bat, but this process never seemed to work properly.
Despite numerous attempts to powercycle the phone, reset it to factory defaults and redo the goldcard, it simply wouldn’t finish in a way that allowed us to proceed with the downgrade (same error as here)
You will need to either have adb in your path (such that you can just open a command promt and type “adb devices” and get a list of your connected devices), or unzip hack4legend-v5.zip into your or sdk/platform-tools (version 11 moves the ADB file from sdk/tooks to sdk/platform-tools) directory so your pushes will work properly. (hacklegend needs to use ADB)
Once this was done, the process required was:
1. Connect the phone in charge only mode.
2. run crackin.bat
3. even if you end up with the cr–rw—- download and install modaco visionairy apk (either install it using adb install or htc sync)
4. temproot phone.
5. in cmd, type adb shell, then ”su” and accept super user permissions on phone
You should see a # <this means you have the permissions.
6. in cmd, type: /data/local/flash_image misc /data/local/misc1-2.img
Your device is now ready to be downgraded.
The RUU package that is needed to downgrade the phone can be found here.
For this to detect your phone, you will need to have HTC Sync installed (versio 2.0.33, as mentioned above)
When attempting to run RUU, I found that it would proceed to the point where it was “waiting for bootloader” (with the phone on a black screen with a HTC logo) but would not move past this. (leading to an eventual error 170 when it timed out)
I tried disconnecting and reconnecting the phone after drivers had been installed but it still wouldn’t detect it. Upon checking in device manager I found that the phone was being detected using a generic Android Bootloader driver. To resolve this, I simply selected to update the driver, after which windows downloaded an updated driver and the driver name to “HTC Bootloader”. After this the device as detected and RUU applied the update without any dramas.
Rooting the downgraded phone
- After this, the process followed the process found here. (adapted below)
- This required the download of the HTC Legend Rooting Tools. Once downloaded, unzip them on your computer and navigate to that folder in command prompt.
- Turn off your phone and turn it back on by holding down Back and Power until you see Fastboot come up on the screen. Push the Power button while highlighting Fastboot on the phone and Fastboot should show up in red now on the phone (if it doesn’t push Power again until it does).
- Plug the phone in via USB cable to the computer.
- Open the folder you extracted to the C drive and double click “step1-windows.bat” and wait for it to finish.
- Once you see the menu on the phone come back up, navigate to BOOTLOADER and push power, then navigate to RECOVERY using the volume buttons to navigate and the power button to select and the phone should boot to the ! screen.
- Now on the computer double click the “step2-windows.bat” file and wait for it to finish. (UPDATE 12.13.10 – You MUST have HTC Sync version 2.0.33 not a newer version for step2 to work. Please uninstall HTC Sync and download and install this version instead, unplug then plug your phone back in, then rerun step2-windows.bat).
- Now you should see a custom recovery screen, using the optical trackpad navigate to Wipe and push on the trackpad to select it. Then navigate to Wipe data/factory reset and select that.
The previous step will leave you with a perfectly good rooted system, but we were after Cyanogenmod.
The guide for flashing Cyanogenmod can be found here.
The steps that were followed were:
- Download the latest version of CyanogenMod.
- Optional: Download the Google Apps for the device.
- Select Mount USB-MS from the main menu of the recovery menu. (so we can copy the files onto the SD card from the computer)
- Place the CyanogenMod update.zip and the Google Apps .zip on the root of the SD card also.
- Select Install zip from sdcard.
- Select Choose zip from sdcard.
- Select the CyanogenMod update.zip.
- Install the Google Apps by performing steps 5 – 7 again and choosing the Google Apps update.zip.
- Once the installation has finished, select +++++Go Back+++++ to get back to the main menu, and select the Reboot system now option. The HTC Legend should now boot into CyanogenMod!
Upon loading into Cyanogenmod, we found that the built in GPS wasn’t working. We found a solution here, and flashed the radio version 7.08.35.21 (using Rom manager to download and install Clockwork Mod to do the update)