Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zmalltalker/715264 to your computer and use it in GitHub Desktop.
Save zmalltalker/715264 to your computer and use it in GitHub Desktop.
This is a proven udev rule for running adb in Fedora 14

I had trouble getting the Android toolchain working under Fedora 14 with my Nexus One. The Android documentation only gives the correct udev rules for Ubuntu, so I had to dig around to find something that worked.

The solution

My solution is to add the following into /etc/udev/rules.d/51-nexus-one.rules. You should not need anything besides this to get it working.

SUBSYSTEM=="usb", ATTRS{idProduct}=="4e12", ATTRS{idVendor}=="18d1", MODE="0666" SYMLINK+="android_adb"

After which you run udevadm control --reload-rules, and plug in your phone. At this point, lsusb should display your Nexus in the listing.

In order to have adb recognize the device, you need to kill the server

adb kill-server

after which

adb devices

should display your device.

Tools if you're stuck

Try the above first. If you get stuck, these tools can be helpful:

  • Tailing /var/log/messages will display what happens when you plug in your phone
  • Running udevadm control --reload-rules as root will reload your rules
  • Running lsusb will tell you which USB devices are plugged in.

As long as my rules file was invalid, the phone would not show up when I ran lsusb. There is no need to do anything with adb until the device shows up with lsusb. An invalid rules file will prevent the phone from being listed by lsusb, if you comment out everything in the file, the phone should show up.

Once you have a rules file that works with your phone, you should be able to use adb (after killing the server first) as normal.

@aldafu
Copy link

aldafu commented Jan 6, 2011

Thanks, that helped. Wonder why the idVendor changed though, hm.

@hkoba
Copy link

hkoba commented Jan 10, 2011

Thank you for good article!

Here is my minor suggestion.
If someone wants more strict permission than MODE="0666", replace it to:

GROUP="dialout"

and run:

su -c "usermod -aG dialout $USER"

and logout-login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment