Monday, May 27, 2013

Install Cyanogenmod 10.1 on HTC One X

My setup
Be warned, this will void your warranty, and could render your phone useless / bricked. Continue at your own peril.

Before you start this procedure, you have to unlock the bootloader. I have described this process in an earlier post.

After you have downloaded the Android SDK, open a shell and navigate to the "platform-tools" directory. It contains an executable called "fastboot" that we will use later on.

First download Clockwork ROM manager from http://clockworkmod.com/rommanager. Put the file (in this case recovery-clockwork-5.8.4.0-endeavoru.img) in the "/tmp" directory.

Then download Cyanogenmod 10.1 and place it in "/tmp". At the time of this writing, the newest build for my HTC One X is a release candidate that I found here: http://wiki.cyanogenmod.org/w/Endeavoru_Info

Open up the Cyanogenmod zip file and extract the file called boot.img to "/tmp".

Now you want to transfer the zip file you downloaded to the internal SD card. This is easier said than done, since the device is not recognized as a mass USB storage device.

This info is specific for Ubuntu 12.04 and may vary on other installations. Start with opening two shells.

Shell #1:

sudo apt-get install golang-go libusb-1.0-0-dev
mkdir /tmp/mtpfs
cd /tmp/mtpfs
export GOPATH=/tmp/mtpfs
go get github.com/hanwen/go-mtpfs

mkdir /tmp/mtpfs/onex
/tmp/mtpfs/bin/go-mtpfs /tmp/mtpfs/onex

Shell #2:

mkdir "/tmp/mtpfs/onex/Internal storage/roms"
cp "/tmp/cm-10.1.0-RC2-endeavoru.zip" "/tmp/mtpfs/onex/Internal storage/roms/"
fusermount -u /tmp/mtpfs/onex

You have now copied Cyanogenmod to the phones internal storage, and you are ready to continue.

First we have to boot the phone into the bootloader. This is done by holding down the power button and the volume up button when the phone is starting.

When you are presented with an old school menu, scroll to "Fastboot" using the volume up/down keys, and select it with the power button.

Alternatively, you can just run "./adb reboot-bootloader" which I find much easier.

First we flash in the new bootloader with "sudo ./fastboot flash boot /tmp/boot.img". Not sure if it is required, but after I did this, I selected the option to reboot the bootloader.

When the bootloader is up again, go into fastboot mode and flash in the recovery image we downloaded earlier:

"sudo ./fastboot flash recovery /tmp/Downloads/recovery-clockwork-5.8.4.0-endeavoru.img"

When that is done, we boot the phone into recovery mode by selecting "HBOOT" in the fastboot options.  You are now presented with multiple choices. Select "RECOVERY" and press the power button.

When you are presented with the ClockworkMod Recovery menu, it is wise to select backup.

Then "Wipe data/factory reset", "Wipe cache partition" and "Advanced/Wipe Dalvik Cache".

We are now ready to install Cyanogenmod. Select "install zip from sdcard" and "choose zip from sdcard." Navigate to the "roms" directory and select the cyanogenmod zip file we transferred earlier.

Installation will now continue. When you are done, go back and select "reboot system now." The phone should now boot up into Cyanogenmod. You are done!

3 comments:

  1. Keep up the great work guys! You are rock stars in the world of Android :D

    ReplyDelete
  2. This was really useful. Thanks!

    ReplyDelete
  3. Would this work on a HTC One X+?

    ReplyDelete