Sunday, 17 January 2010

Nexus One ADB access on Ubuntu Karmic and Lucid

Do you get this error when you connect the Nexus One to your Ubuntu desktop for ADB? I did on stock 64 bit Karmic and Alpha 2 Lucid versions of Ubuntu.

$ adb devices
List of devices attached
???????????? no permissions

To be able to have non-root users talk to the Nexus, you need to edit the udev permissions as follows:

# /etc/udev/rules.d/99-android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"


You then need to restart udev and check that the Nexus One has shown up.

$ sudo restart udev
$ adb devices
List of devices attached
HT9CNP810278 device


You may need to kill the adb server as follows:

$ adb kill-server
$ adb start-server


Success, fame, and ADB access should now be yours.

7 comments:

  1. Thanks dude for the tip about restarting the adb server. That's what I was missing.
    ReplyDelete
  2. My nexus one doesn't even show up. When I run adb devices, I get "List of devices attached" and nothing after. I tried your instructions but they did not work. Know of any other ways to get this working? I've tried everything:

    http://groups.google.com/group/android-developers/browse_thread/thread/7b5e7119329902f3?hl=en
    ReplyDelete
  3. Joey: "Wow, I feel like an idiot. Somewhere down the line I turned off my debug settings, so no matter what I did with the udev rules, it wouldn't show up. Now that I turned it on, it's working. Thanks for trying to help. :/"
    ReplyDelete
  4. i needed to restart my N1 to get permission... =D
    ReplyDelete
  5. As of this post (http://3dgo.net/2010/01/26/nexus-one-adb-on-ubuntu-9-10/), now my 70-android.rules file is like this:

    SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
    SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", SYMLINK+="android_adb"
    SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"

    (The last line is from this post)

    I've unplugged my N1 and plugged it in again and turned of my USB Storage and now it works.

    I'm on Ubuntu 10.10

    Thank you so much.
    ReplyDelete