As there're several, more or less well working howtos about creating udev rules to allow access to the USB debug devices of Android phones out there in the wild, I decided to write my own one. The udev rules file I provide here works at least for the HTC Dream models (aka T-Mobile G1 and Google Devphone) and the ZTE Blade (aka Orange San Francisco), probably for other phones, too.
As a computer may be used by more than one user, I've decided to create a group called androiddev. Members of the group will be allowed to access the debug interface. Running (hint: become root first)
addgroup --system androiddev
will create the group for you. Add your developers to the group with
adduser username androiddev
(of course replace username with the user you'd like to add) and we're ready to configure udev. Open /etc/udev/rules.d/android.rules in an editor and add the following lines:
# HTC G1. Maybe other models, too
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c01", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c02", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0fff", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
# ZTE Blade
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1354", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
That's it. Udev will reload and activate the new ruleset. Don't forget to re-login to make sure your new shiny group will show up! Now have fun with adb and fastboot
Thanks to TauPan from #debian/freenode.net who gave me the idea for this blog post.
Second Update: Added the proper line for fastboot and cleaned up the howto.
Third Update: Adding lines for ZTE Blade (aka Orange San Francisco).
I followed the instructions for creating udev rules in "/etc/udev/rules.d/50-android.rules", but still when I call "./adb devices" the list of devices is blank.
My HTC Dream G1 was idle at the Home screen. Tried logging off, rebooting, re-seating the USB connector, etc..
Is there anything else I need to do before or after setting the udev rules?