[Updated] 26/10/2013 : HTC Desire S is a relatively older model now and is no longer supported. Easiest and Recommended way to root the device would be to use SuperOneClick. You can follow the steps and download the required executables from this XDA Developers thread
If you still want to root it using old fashioned way, feel free to scroll down.
[Updated] 17/03/2012 : Included Rooting via HTCDev Bootloader Unlocking + Android Flasher Utility. Jump to Update Recently i attended Droidcon India 2011 and had a quick chat with a team installing CyanogenMod for interested attendees there. I finally decided to give it a shot. In this part of tutorial I’ll explain till rooting of the phone. *WARNING: This will void your Manufacturer’s Warranty
What is S-OFF (Security Off)
HTC recently added an extra layer of security on their Android Phones, NAND Security. S-ON basically means read-lock on /system , /recovery partition etc.
What is Flash Custom Recovery
Custom Recovery allows you to do advanced tasks like recovery, installation etc on your Android device that are not possible with the available stock recovery. We are going to use ClockworkMod Recovery for the purpose.
What is Rooting
Rootingis a process that allows users to gain root-access. Its similar to JailBreak in iOS.
1. Revolutionary Method
Always have Backups!
Before proceeding, you should backup as much data as possible (Just in case). As an extra precaution, make a copy of your SD Card as well.
If you have synced contacts at Google account, Good! else export all Phone contacts to SD card.
We are going to use Revolutionary Tool, which is a complete solution for gaining S-OFF, Custom Recovery and Rooting. Revolutionary currently supports the following Android phones and HBOOT versions: (as per RootWiki)
Disable FastBoot on Phone. Click on Settings > Power > FastBoot
Enable USB Debugging on your Android Phone. Click on Settings > Applications > Development > Turn USB Debugging ON.
HBOOT Version and Device Serial No.
To get the HBOOT Version, start your device in Bootloader*. Turn off your phone, now Pressing the Volume Down button start the Phone. You will boot into bootloader (FastBoot must be disabled). Note down the HBOOT Version. You will also notice S-ON written on Top. Reboot now.
Serial No. is written behind battery. or you can see it from Settings >> About Phone >> Phone Identity.
*I’m using HTC Desire S, method may differ for different models. Google up!
Download the Revolutionary Tool. You need Beta key as well. Fill up the form on the site with HBOOT Version and Serial Key, it will generate one for you.
Unzip and run the utility (For Windows – Make sure you have administrative access). Enter the beta key correctly (case sensitive).
Withing minutes your Phone will reboot in FastBoot. You can notice on top, Revolutionary written in pink. and S-OFF below it, which means we have gained S-OFF.
Flash ClockworkMod Recovery
The Revolutionary Tool, next will prompt to download and flash ClockworkMod Recovery. Press Y to start* the installation.
Command prompt will automatically close within a minute indicating that the installation is done. (You are still on the BootLoader screen)
Reboot your Phone. (Use volume keys / power button to navigate the BootLoader)
* Alternatively you can install ROM Manager(rooted phone), which will install ClockworkMod Recovery
HTC released Firmware Over-the-air (FOTA) Upgrade for few Models (like Desire S), and thus the HBOOT Versions have changed. Revolutionary does not support all HBOOT versions as of now, so above method will fail. Example: HTC Desire S (India) has HBOOT 2.00.0002 after the FOTA Update
You can unlock your BootLoader using the official HTC Site. http://htcdev.com/bootloader/. Desire S is not listed in unlockable phones list, but it perfectly works. Choose HTC Desire in dropdown and proceed.
Warning: After unlocking the bootloader, the phone does a factory reset. Backup all your personal data prior to running the procedure.
FastBoot, HTC Sync and USB Debugging
Install HTC Drivers, Disable FastBoot and Enable USB Debugging (Same as above, check Revolutionary Method for the details). Make sure your MicroSD card is formatted.
SuperUser (SU) and Android Flasher
Superuser is the app that manages what apps on your rooted device have access to su. Download the superuser.zip file and place it on MicroSD Card.