HTC Desire USB Host Mode HOWTO

I have my kernels loading, but the device is unusable, locking up for 5-10 seconds at a time and constantly prompting to “wait or close” applications. Investigating…..


New instructions, trying to get ICS working on HTC Desire with USB Host Mode:

  1. Boot into recovery mode (volume down + power etc…) – I’m running Revolutionary CWM v4.0.1.4
  2. Go to Advanced > Partition SD card
  3. I have a 2GB sd card, I selected 1024 mb for the “ext” partition and 256mb for swap partition. Took about a minute to format.
  4. This will setup an app2sd partition for you so that all installed apps go directly on the sd card, handy because the HTC desire only has like 250mb of storage and ICS will fill this up very quickly causing all sorts of issues.
  5. Then install ICS on phone as per these instructions:
  6. Make sure you select the Tiamat Kernel from the ICS Custom Installation menu
  7. Don’t worry about step 7 (Install patched A2SDX) in the above instructions, just reboot the device (and wait quite a few minutes for it to start first time)
  8. (more coming soon)

Building custom kernel 2.6.38 with USB Host Mode Support for ICS installation

  1. See here: for my step by step
  2. sudo apt-get install lib32ncurses5-dev for make menuconfig to work
  3. git reset –hard  (this will reset our cloned kernel folder to original, deleting all changes)
  4. git clean -f -x -d (this will reset our cloned kernel folder to original, deleting all changes)
  5. patch -p1 < ../HTC_Desire_Hostmode_kernel_2-6-37.patch
  6. make tiamat_bravo_defconfig
  7. make menuconfig (needed to do a sudo apt-get install lib32ncurses5-dev to get this step working )
  8. (if you are using the arm-linux-androideabi-4.4.3 toolchain (instead of arm-eabi-4.4.0) then change the kernel Makefile as per this post)
  9. select all the USB modules you want to build
    1. make sure “Support for Qualcomm MSM7201/QSD8X50 on-chip EHCI USB controller” is selcted
    2. (full list coming)
  10. exit menuconfig and save configuration
  11. make -j4
  12. cp arch/arm/boot/zImage ../new-kernel/kernel/
  13. find . -name “*.ko” -exec cp {} ../new-kernel/system/lib/modules \;
  14. zip up new-kernel along with other files from ( same format at this file )
  15. push zip to android in recovery mode and install zip

EDIT: old instructions that worked once for me, but no longer work. Just for reference:

  1. Follow the “Gaining S-OFF” instructions from here:
  2. Download the Cyanogenmod ZIP file: (or another version from )
  3. Download the USB Host Mode enabled kernel from here: ( more details about kernel here: )
  4. Download Google Apps ZIP file from here: ( or another version from )
  5. Format the SD card (fat32) from your Desire (mine was a 2GB one) and copy the 3 zip files to the SD card.
    1. (full instructions here )
    2. Hold volume down + power, select recovery, wait a few moments, run both “wipe” options
    3. then choose the “install zip” option and “select zip” option and install all 3 zip files:  then then
    4. press back and choose the restart option
    5. the phone will now boot into the new “cyanogenmod” with usb host mode support
  6. Follow the instructions from here: Connect the USB device, then over a shell/terminal enter these commands: insmod /system/lib/modules/$(uname -r)/kernel/drivers/usb/core/usbcore.ko insmod /system/lib/modules/$(uname -r)/kernel/drivers/usb/host/ehci-hcd.ko
  7. Install one of these apps through Google Play store to check any problems and see if it’s working:

2 thoughts on “HTC Desire USB Host Mode HOWTO

  1. uldics

    Not working the insmod part, both gives me:
    insmod: init_module ‘usbcore.ko’ failed (Exec format error)


Leave a Reply

Your email address will not be published. Required fields are marked *