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
    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.


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

    FYI i did both
    sudo reload udev
    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

  9. November 2nd, 2010 at 17:00 | #11

    if `sudo reload udev` or `sudo service udev reload` do not work, try `sudo restart udev`

  10. Fabian
    December 7th, 2010 at 09:02 | #12


    I had the same problem on Ubuntu 10.10. Thanks!

  11. revanth
    January 4th, 2011 at 04:22 | #13

    how to run adb ?? adb command not found iam getting

    • January 4th, 2011 at 06:11 | #14

      You’ll need to install the Android SDK and add the proper directory that contains the adb script to your PATH.

  12. January 9th, 2011 at 06:57 | #15

    @Alan LaMielle Thanks. lower case letters worked for me.
    Before running “adb devices” you should remount the device.

  13. gtwod
    January 26th, 2011 at 11:27 | #16

    Thnaks works for Nexus S too, I “assumed” it would be samsung vendor.

  14. hwejbej
    February 25th, 2011 at 10:02 | #17

    Hi, even though I have the udev rule setup correctly, and I can work with my device (shell, logcat, install apks), I still see this when I run ‘adb devices':

    List of devices attached
    ???????????? device

    Eclipse fails to recognize it – it does show it in the manager, but fails to upload APKs, I have to do it by hand. Does anyone know what could be the problem?

  1. March 11th, 2011 at 07:42 | #1