HTC Desire (rooting)

Rooting your Android with ClockWorkMod Recovery & CyanogenMod

Introduction

Warning this upgrade is not for novices. Neither SoSLUG or the author of this article will take responsibility for any damage or loss of data to your phone since it is possible you will lose your contacts and any sms messages stored on your phone. Eeven if this data is something you have taken care to backup it is still possible you will lose your GApps Market (This at least we can show how you can get this application back).

This article covers only the upgrade installation for the HTC Desire. The upgrade may work with other phones, we just don't know. This is not something we have tried.

What follows is a series of relatively complex tasks associated with the HTC Desire which you are advised to complete in a certain order. Due to the fact that you are reading this article on a Linux site and because Android is also Linux there are no instructions listed for Microsoft Windows users sorry.

Tasks

This is perhaps a very simplistic view of the equipment and task required to root your Android with ClockWorkMod Recovery

  1. Obtain Unrevoked software from website and download onto your Linux PC into your Downloads folder UnRevoked.com
     
    unrevoked_1.preview unrevoked_2.preview unrevoked_3.preview  
     
  2. Use archive manager to untar the file you have downloaded or use your terminal window

    #> cd Downloads #> tar xvf reflash.tar.gz

  3. Do not connect your Android phone yet - Open a terminal window and enter the following command

    #> sudo su

    In order to communicate with your Android phone you must have the following items

    1. A HTC Desire Phone
    2. A PC or Laptop installed with Linux
    3. A USB Data cable to attach both previous items

You should now be root user, you can check that you are the root user by entering the following command at the terminal window

#> whoami
root

  • Now run the Unrevoked software you downloaded and untared from within the root terminal window by entering the following command note we use the "period and forward slash" before the executable command in this case "reflash".
  • ./reflash

  • You should now have the Unrevoked program running and displayed on your screen which should look like this your phone should now be connected. It is important it does look like this since that indicates that you are root user and that you can communicate with your Android phone.
     

    urevoked-3.21_2.preview

  • Now things should get a little more interesting, access your phone and click settings, you can do this by pressing the menu button on your phone once you have unlocked the screen. With "settings" selected you are presented with a list of options on your phone, select Applications from the list available. You now have five options, ensure you have checked the "Unkown sources" with a tick and click. Development at the bottom of the list. In the Development options ensure the following are checked with a tick, USB debugging, USB debugging notify and Stay awake are all selected. Allow mock locations should be off and not selected, close the screens by pressing the Menu button on your Phone.
  • Now connect the data cable supplied with your phone to both the PC and your Phone, the Orange charging light should come on the top right of your phone, you may need to jiggle your cable to keep this light on.
  • On the screen of your phone, at the top left, you should have some warning notifications. With one of your fingers draw down from top left of the screen. USB tethering may well be indicated, if so, click this item with your finger and select charging only.
  • You should now sit back and allow the software to run and follow any of the instructions which indicate some intervention - there should be none. We have become aware the only possible exception to this is that the pin code used to lock the phone,must be entered immediately your access request appears.
  • You should now have rooted your phone
  • You can test this principle by going to your applications and opening a terminal emulator. If one is not provided download one with the "Market Application", once open type su on the screen. If this allows root access a message will be displayed to the screen temporarily.
  • From my humble inexperience "ClockWorkMod" seems to provide the base Kernel of the system. I may have this wrong but will leave others to correct me on this, however this install did not eradicate my data of sms messages and contacts, whilst the same can not be said of CyanoGenMod. Warning - "Cyanogen installation destroys GApps market" you will need to reinstall this apk and it can be difficult.

    1. The very first thing to do is obtain a copy of GApps....zip file. This was not easy to find but eventually after many hours looking I came across what I wanted and this was after I installed CyanogenMod. Funnily enough it is Cyanogen that provide the apk but it is very hard to find so although I cannot guarantee it, I have provided a link below which I hope proves useful.
       
      GApps Market Download this zip file and install onto your installed sdcard in your phone using the data cable and selecting USB data Storage instead of "charging only" on your phone notifications, use your PC to download and store to your Phone sdcard.
    2. You can find out a lot more about CyanoGenMod from this link CyanogenMod for HTC Desire
    3. In order to install CyanogenMod you will need to root your phone before doing anything else. CyanogenMod is like the Desktop application as far as I can tell, I found the least complicated way to install CyanogenMod was using a ROM manager from GApps Market. (Note It is extremely important your gmail account is the first active account or you will not be able to download any Market apps to your phone). If you haven't already done so install this application to your Phone.
    4. From available applications select ROM manger while ignoring the recovery section, unless an update for ClockworkMod recovery is found in which case install it. Select Download ROM from the list of options and then select CyanogenMod. There may be a few to choose from but again select the latest and stable release, obviously you will need to be able to access a local wifi network.
    5. Allow the phone to do it's own thing and CyanogeMod will be installed
    6. Once complete, access the ROM Manager again and select "Fix permissions" from the list

    It is quite possible all your data and contacts are now lost, sorry about that but I did warn you earlier. However if you access your applications you will find something else missing, your "Google Market Apps". If you have followed this article you will have installed to the prescribed place, as mentioned above, the apk zip file required. What follows are some instructions to install the GApps Market from the sdcard only.

    I must eat my own words here - it is true I lost my contacts and it is true I made a backup little realising gmail does one for you. Well I was still unable to see my contacts but I got a call the other day from someone I knew, well hey presto the name of the individual was displayed on the screen. What is going on? Well it turns out I only needed to adjust my contacts display settings. So to give you a heads up in case you face a similar problem this is what you do.

    Select Contacts icon on your screen
    Select Menu Button on phone
    Select Display options
    Select Email address
    Scroll to the bottom of screen
    Select All other contacts
    In fact it seems to do no harm to select and tick all items under this category

    Then sit back and ooh I got my contacts back. Yeah!!!!!!!!!

    1. With Cyanogen installed you should have a few extra options when you press and hold the power button. Unlock the screen of your phone in the usual manner and press and hold the power button. Select Reboot option and then select Recovery option. I can say this is true but only for the HTC Desire, other Phones may vary.
    2. Using the volume control on the side of your Phone select the option to "install .zip from sdcard" this should be somewhere towards the centre of the list, see below. To select this option press the central trackball located centre and bottom of your Phone.

      reboot system now
      apply sdcard:update.zip
      wipe data/factory reset
      wipe cache partition
      install .zip from sdcard backup and restore
      mounts and storage
      advanced

    3. Again using the volume control on the side of the phone select "choose zip from sdcard" options are:-
      apply sdcard:update.zip
      choose zip from sdcard
      toggle signature verification
      toggle script asserts
    4. From the next to last screen select from the list the GApps.....zip file you had downloaded to your sdcard
    5. Confirm your selection by scrolling down and selecting the file to install. Output should look similar to this:-

    no.....
    no.....
    no.....
    no.....
    no.....
    GApps.....zip
    no.....
    no.....
  • Reboot your phone from the menu
  • This was hard for several reasons, installing zip file to sdcard, Rebooting into recovery and the long winded way to install a file from the sdcard and back to the Phone, most of all it was difficult because it took such a long time to find out where it was and how to install it.