Home > Android > Nexus One USB in Ubuntu 9.10

Nexus One USB in Ubuntu 9.10

My shiny new Google Nexus One wasn’t connecting properly over USB to my Ubuntu 9.10 (Karmic) notebook using the Android SDK.  Here’s how I fixed it.

After a few days of debating whether or not to buy a Nexus One, I finally gave in a bought one.  Rachael ended up getting a Droid Eris (Verizon) for Christmas, so in the course of a few weeks I gained access to two fantastic Android-powered phones.  I had been compiling a list of mobile application ideas and the fact that I now have the hardware to test on motivated me to start looking into Android development.

After getting the Android SDK setup I needed to connect my N1 and push an application to it for testing on real hardware.  I found some Android documentation that discussed connecting up an Android device over USB.  However, after following the steps on this page, I was still seeing strange output when running adb devices:
List of devices attached
????????????    no permissions

This led to some searching which turned up a blog post.  Basically, the Google Android team hasn’t added the Vendor ID for the Nexus One.  Apparently HTC’s USB Vendor ID isn’t correct.  So, I followed these steps to fix it:

  1. Create/edit a udev rules file:
    sudo vim /etc/udev/rules.d/51-android.rules
  2. Add the following line to this file:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18D1", MODE="0666"
    (Note the vendor ID of 18D1. This was changed from the HTC vendor code of 0BB4.)
  3. Restart udev using either
    sudo reload udev
    or
    sudo service udev reload
  4. Connect your Nexus One.
  5. Run
    adb devices
    and you should see something like
    List of devices attached
    ############ device

Hopefully Google updates the documentation to include the Vendor ID 18D1 rather than making us hunt for this number ourselves.  Enjoy!

  1. NioX
    February 20th, 2010 at 11:55 | #1

    Big thanks! :)

  2. linuxluver
    April 7th, 2010 at 03:27 | #2

    To get the vendor ID of a USB device on Linux “lsusb” will tell you what’s what:

    steve@media:~/android-sdk-linux/tools$ lsusb
    Bus 002 Device 003: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
    Bus 002 Device 002: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 011: ID 18d1:4e12
    Bus 001 Device 006: ID 04b8:011f Seiko Epson Corp. Perfection 1670
    Bus 001 Device 003: ID 1058:1003 Western Digital Technologies, Inc.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    • April 7th, 2010 at 11:16 | #3

      Thanks for the tip. It isn’t immediately clear that the ’18d1:4e12′ line corresponds to my N1, but process of elimination will leave only that as the line for it.

  3. April 18th, 2010 at 18:11 | #4

    If you try this and it doesn’t work, make sure the vendor id matches exactly. Mine was lowercase, so I had to enter this line: SUBSYSTEM==”usb”, SYSFS{idVendor}==”18d1″, MODE=”0666″

    • April 19th, 2010 at 08:24 | #5

      I never had an issue with upper vs. lower case, but this doesn’t mean others won’t. Thanks for the tip!

  4. Carl
    May 1st, 2010 at 13:40 | #6

    @Jeremy I had this same exact issue. I have followed this about 10 times through different installs, 9.10 and 10.04 betas with no issue. I just did a 10.04 final release install and it was cases sensitive. Very odd.

  5. May 13th, 2010 at 21:50 | #7

    BIG Thanks! My HTC Incredible does have the Vendor ID of “0bb4″ but I didn’t know about reloading the udev service. Thanks!

    nick@swissnavywater:~/Programs/android-sdk-linux_86/tools$ lsusb
    Bus 001 Device 006: ID 0bb4:0c9e High Tech Computer Corp.
    nick@swissnavywater:~/Programs/android-sdk-linux_86/tools$ ./adb devices
    List of devices attached
    emulator-5554 device
    HT043HJ04437 device

  6. Phi
    May 24th, 2010 at 18:32 | #8

    About the lowercase’s issue, I had it on Ubuntu 9.04.
    Putting ”18d1″ work well, not “18D1″.

    Thanks for the tip, I have searched for some times.

    Phil.

  7. July 8th, 2010 at 08:38 | #9

    FYI i did both
    sudo reload udev
    or
    sudo service udev reload

    did not work in 10+ but restarted the OS worked :-)
    thanks for the help

  8. August 30th, 2010 at 15:56 | #10

    +1 on the case-sensitivity.
    ‘lsusb’ was very useful.
    And thanks Alan.

    Ubuntu 10.04 LTS

  1. No trackbacks yet.