HowTo set up the Android SDK on Ubuntu for HTC Phones

In this post I will explain how I set up the Android SDK on Ubuntu for my HTC Desire.

I first followed the steps for Ubuntu as described in Setting up a Device for Development:

With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator. Before you can start, there are just a few things to do:

  1. Declare your application as “debuggable” in your Android Manifest.In Eclipse, you can do this from the Application tab when viewing the Manifest (on the right side, set Debuggable to true). Otherwise, in the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.
  2. Turn on “USB Debugging” on your device.On the device, go to the home screen, press MENU, select ApplicationsDevelopment, then enable USB debugging.
  3. Setup your system to detect your device.
    • If you’re developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.
      1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.For Gusty/Hardy/Maverick Meerkat, edit the file to read:
        `SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"`</p> 
        For Dapper, edit the file to read:
        `SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"`</li> 
          * Now execute:
            `chmod a+r /etc/udev/rules.d/51-android.rules`</ol> </li> </ul> </li> </ol> 
        You can verify that your device is connected by executing `adb devices` from your SDK `platform-tools/` directory. If connected, you&#8217;ll see the device name listed as a &#8220;device.&#8221;</blockquote> 
        When I executed **_adb devices_** the name of my HTC Desire just looked like &#8220;??????????&#8221;. After executing **_reload udev_** then disconnecting and connecting my phone again, everything looked fine. Now I could see the name of my HTC Desire after running _**adb devices**_.
        Maybe this post helps you in setting up your Android SDK on Ubuntu. If it does please drop me a comment below.
        (Thanks to the post of <a title="" href="" target="_blank"></a>)
        ### Related articles {.zemanta-related-title}
        <ul class="zemanta-article-ul">
          <li class="zemanta-article-ul-li">
            <a href="">Install Android SDK and NDK</a> (
          <li class="zemanta-article-ul-li">
            <a href="">Download Android 3.0 SDK</a> (
          <li class="zemanta-article-ul-li">
            <a href="">Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 10.10)</a> (
          <li class="zemanta-article-ul-li">
            <a href="">Download Android SDK, Install and Develop Android Apps</a> (
        <div class="zemanta-pixie">
          <a class="zemanta-pixie-a" title="Enhanced by Zemanta" href=""><img class="zemanta-pixie-img" src="" alt="Enhanced by Zemanta" /></a>