HTC Desire SV

Catch22.eu

How to Root the HTC Desire SV

Rooting the HTC Desire SV boils down to 3 basic steps:

  • Unlocking the bootloader. HTC officially Supports unlocking the bootloader, see htcdev.com . This allows to boot other images on the phone.
  • Booting a Recovery ROM from the phone. For the Desire SV, this is done with ClockWorkMod (CWM) Recovery. This is needed to be able to flash unofficial updates to the phone.
  • Installation of SuperSU via CWM Recovery. This is the actual step of rooting the phone by installing the SU application which allows swithing to the root user which has full read and write permissions on all directories and files on the phone.

Unlock the Bootloader

The procedure described at htcdev.com is quite cumbersome as the most steps describe the extraction of the 3 files needed to actually unlock the bootloader (adb.exe, AdbwinApi.dll and fastboot.exe), while the unlocking part basically consists of 3 steps:

  • Booting the Desire SV in bootloader mode and connecting it to the pc;
  • Extracting the phone's key and sending it to HTC in order to receive the unlock code;
  • Unlocking the bootloader with the unlock code.
These last three steps only take 5 minutes or so. Beware that all user data and settings are deleted during the process. As said, see htcdev.com for the complete procedure.

Obtain CWM Recovery

ClockWorkMod Recovery is needed for rooting the HTC Desire SV. Some recovery images found on the internet may have the can't mount cache errors, which is caused by an incorrect recovery.fstab file. Also, a screen offset issue can be present in these images as well. Download this recovery image directly from Catch22.eu. Unzip the file to retrieve the recovery image. Download: recovery-cm_magnids-eng-ics-0.9.img.zip For comments on this, please use this thread on xda-developers.com. A link to the source files can be found there as well.

Fastboot CWM Recovery

It is possible with the HTC Desire SV to use fastboot once the bootloader is unlocked as mentioned above. Fastboot allows to directly load an image from the PC via USB to the phone's memory and boot into it. This leaves the phone's operating system unchanged and makes it possible to make a backup of the phone's original firmware.

hboot menu The hboot menu. On the left the startup screen with the fastboot option selected, on the right the fastboot screen.

As explained in the previous paragraph, several recovery images and steps were used to ensure images were obtained from known (open source) sources.

  • Put the phone in fastboot mode by turning on the phone with Power + Volume Down pressed simultaniously, and selecting the fastboot option in the HBOOT menu (see picture above). When the Desire SV is connected to the PC via USB, the fastboot command is used to boot a custom recovery image on the phone:
  • For downloading (but not flashing) and booting a CWM recovery image, use the command fastboot boot recovery.img This way a backup of the stock recovery image can be saved to the SD card via the CWM recovery backup option. With an incorrect recovery image (with the can't mount cache issue), it is not possible to install superuser.zip with a non-flashed CWM recovery.
  • For flashing and booting the recovery image, use the command fastboot flash recovery recovery.img This is needed to flash superuser.zip via CWM Recovery. Beware that the stock HTC recovery image is overwritten this way. The previous method is recommended though.

Note 1: Power + Volume Down to reach the HBOOT menu does not work when the "fast boot" option in settings/power is switched on.
Note 2: A more elegant way to boot your phone into HBOOT, is by using adb: adb reboot bootloader.
Note 3: ADB and Fastboot don't show devices? Check in Windows XP if the HTC USB driver has an issue and a restart if the driver is needed.
Note 4: When using VirtualBox, ensure the USB device "htc, Inc Android 1.0 [0100]" is switched on in Virtualbox, and that USB 2.0 (EHCI) Controller is enabled in the settings menu.

Download and Flash ClockWorkMod SuperUser

Gaining root access is done by installing SuperUser on your phone. SuperUser actually consists of two parts:

  • The SuperUser App (superuser.apk), which is the User Interface.
  • The su binary, which is the low-level Android program that controlls root acces rights.

SuperUser by ClockWorkMod is available in Google Play Store, but this requires a rooted phone already. The description in the Play Store also contains a link to the manual installation file which is needed to install su for un-rooted devices: http://download.clockworkmod.com/superuser/superuser.zip .
The superuser.zip file contains both the APK and su binaries for x86 and ARM processors. This file should be downloaded to the root of the SD card in order to flash it with CWM recovery. When the phone is booted in recovery mode, use the menu option install zip via sd card and select the superuser.zip file to flash it to the system partition. The operation was successfull when the phone is booted again, and the superuser app does not show a message about an incorrect superuser binary.

At Catch22.eu root access was gained to the HTC Desire SV successfully this way. Note that the method outlined here does use open source as much as possible. The method also backups the original recovery image. Some words on s-on and s-off: this is not required, the phone at Catch22.eu had s-on during rooting. For a good understanding of s-on, see this explanation from Koushik himself. Beware that the s-on state of the phone does not give permanent root, meaning that a HTC firmware update will undo the root rights, and the superuser.zip file needs to be flashed again.

Next steps after gaining root access

After gaining root access to the Desire SV, some recommended steps how to continue from here:

  • Control which apps may be started at boot with a startup task manager.
  • Install custom ROM's via a ROM manager.
  • Protect your privacy by hiding contacts from programs that don't require this to operate
  • And much more...

Unrooting

Just in case this is needed, here's a few steps how to un-root your phone. This obviously works only when your phone is rooted. Use adb to open a shell to your phone (phone is in normal operation): adb shell Then switch to superuser: su Because the /system is mounted in read-only mode, remount it rw (this code is for the HTC Desire SV only): mount -o rw,remount -t ext4 /dev/block/mmcblk0p25 /system The Superuser app and su binary can be removed with: rm /system/app/Superuser.apk
rm /system/bin/su
It's immediately visible the app is gone from your screen by now. Exit by entering exit twice: exit
exit