Tuesday, January 27, 2009

udev fun!

That was a rough day! I spent most of it trying to get my Android Dev phone to be recognized by my CentOS box. It turns out the Google supplied udev rules don't work under Fedora or CentOS.

The output of udevinfo is different on the different OSes, hence the udev rule is different. This one works for Fedora 10:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c01", SYMLINK+="android_adb"

and this one works on CentOS 5:

SYSFS{idVendor}=="0bb4", SYSFS{idProduct}=="0c02", SYMLINK+="android_adb"

Note that the spaces after the commas are important and they're both supposed to be on one line.

If you put these rules into 50-android.rules like it's suggested, you will get a device node called /dev/android_adb. With this setup you'll have to run adb as root. To fix that
problem, do these two things:
  1. put MODE="0666" (with a comma and a space!) in either of the above line, and
  2. change the name of the file to 51-android.rules.
You can restart udev with start_udev or udevcontrol reload_rules.

No comments:

Post a Comment