Android OS Forum banner
1 - 19 of 19 Posts

·
Developer
Joined
·
84 Posts
Ok, so I was hopping along the bunny trail... and realized, nobody has ever posted a set of uDev rules for Ubuntu that work with any device and Ubuntu version > 7.10... (up until now, there's udev results for specific devices, some wrong, some crazy, none all together)... so, I though I'd do the honor


Here's the low down, read and complete all of the steps before telling me it doesn't work, please.

  • First, remove any rules you already set up for your Android Device (If any), they'll be very obvious if you look in /etc/udev/rules.d/

    Code:
    sudo ls /etc/udev/rules.d/
  • Now, open an editor for the rules at /etc/udev/rules.d/99-android.rules:

    Code:
    gksudo gedit /etc/udev/rules.d/99-android.rules
  • Now, paste all of the rules below:

    Code:
    #Acer<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"<br />
    #Dell<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"<br />
    #Foxconn<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"<br />
    #Garmin-Asus<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"<br />
    #Google<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"<br />
    #HTC<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"<br />
    #Huawei<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"<br />
    #Kyocera<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"<br />
    #LG<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"<br />
    #Motorola<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"<br />
    #Nvidia<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"<br />
    #Pantech<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"<br />
    #Samsung<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"<br />
    #Sharp<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"<br />
    #Sony Ericsson<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"<br />
    #ZTE<br />
    SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
  • Save and close the file.
  • Change the file permissions:
    Code:
    sudo chmod a+r /etc/udev/rules.d/99-android.rules
  • Now, unplug all Android Devices...
  • Restart the udev service:
    Code:
    sudo service udev restart
  • Kill and restart adb:
    Code:
    adb kill-server
    Code:
    adb start-server
  • Done... you should now be able to work with a device from almost any manufacturer. Plug your phone in to test.

If you're unable to start adb from a command line anywhere (without sudo), you've been lazy with your setup (I am too at times)... you may want to scan my "Dev Box Setup" series of blog posts.

At any rate, just wanted to share these udev rules.

-Dustin
 

·
Android Lover
Joined
·
179 Posts
I've been trying to get this to work for 2 days and need help.

If I type lsusb it displays my device, but adb devices returns a blank. No?????? or anything about permissions (I set udev rules already anyway). It just acts like the device isn't there. USB debugging is on, I checked that repeatedly.
 

·
Developer
Joined
·
84 Posts
Discussion Starter · #8 ·
mwaters33 said:
I've been trying to get this to work for 2 days and need help.

If I type lsusb it displays my device, but adb devices returns a blank. No?????? or anything about permissions (I set udev rules already anyway). It just acts like the device isn't there. USB debugging is on, I checked that repeatedly.
Based on your explanation, I'm at a loss for answers... I'm going to open up a support thread for my Blog Series, you may wish to post in there and see if anyone else has an answer for you.
 

·
Developer
Joined
·
194 Posts
Updated udev rules according to Google as of 8/14/2011:

Code:
#Acer<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666<br />
#ASUS<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666<br />
#Dell<br />
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666<br />
#Foxconn<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666<br />
#Garmin-Asus<br />
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666<br />
#Google<br />
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666<br />
#HTC<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666<br />
#Huawei<br />
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666<br />
#K-Touch<br />
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666<br />
#KT Tech<br />
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666<br />
#Kyocera<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666<br />
#Lenevo<br />
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666<br />
#LG<br />
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666<br />
#Motorola<br />
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666<br />
#NEC<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666<br />
#Nook<br />
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666<br />
#Nvidia<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666<br />
#OTGV<br />
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666<br />
#Pantech<br />
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666<br />
#Philips<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666<br />
#PMC-Sierra<br />
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666<br />
#Qualcomm<br />
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666<br />
#SK Telesys<br />
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666<br />
#Samsung<br />
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666<br />
#Sharp<br />
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666<br />
#Sony Ericsson<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666<br />
#Toshiba<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666<br />
#ZTE<br />
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666
 

·
Dev Lackey
Joined
·
142 Posts
The Setting-Up-a-Dev-Box series has gone 404.... can y'all bring it back? I am getting a new computer soon, and i do *not* want to try to have to remember how i hacked it together on my box now....

The uDev stuff here has been fantastic! thank you very much!
 

·
Veteran of the G1 Era
Joined
·
357 Posts
Can't seem to get this to work on Linux Mint 11...

Set up the rules, set permissions, etc. Checked "lsusb" and the device exists on the USB connection as:
Bus 001 Device 007: ID 0bb4:6860 High Tech Computer Corp.

which is ID 0bb4, that does exist in the rules file.

Yet, I still get the error:
List of devices attached

???????????? no permissions

Have tried everything.... Restarted Udev, double and triple checked the permissions file and permissions on the file, restarted the entire computer, etc.

It works if I start ADB with root, but the whole point is to not have to do that!

Any ideas anyone?
 

·
Tweaker
Joined
·
1,210 Posts
The Setting-Up-a-Dev-Box series has gone 404.... can y'all bring it back? I am getting a new computer soon, and i do *not* want to try to have to remember how i hacked it together on my box now....

The uDev stuff here has been fantastic! thank you very much!
I would also like to see the "Setting Up a Dev Box" series. Anyone have it by chance?
 

·
Professional Stuff Breaker
Joined
·
1,402 Posts
Just to help things out, I've made a little script you can run to quickly and easily add the udev rules. Just run the following:

Code:
sudo su -<br />
wget [URL=http://goo.im/devs/drmacinyasha/wiki/udev-adder.sh]http://goo.im/devs/drmacinyasha/wiki/udev-adder.sh[/URL]; chmod a+x udev-adder.sh; ./udev-adder.sh; rm udev-adder.sh
 

·
Banned
Joined
·
2,166 Posts
Can't seem to get this to work on Linux Mint 11...

Set up the rules, set permissions, etc. Checked "lsusb" and the device exists on the USB connection as:
Bus 001 Device 007: ID 0bb4:6860 High Tech Computer Corp.

which is ID 0bb4, that does exist in the rules file.

Yet, I still get the error:
List of devices attached

???????????? no permissions

Have tried everything.... Restarted Udev, double and triple checked the permissions file and permissions on the file, restarted the entire computer, etc.

It works if I start ADB with root, but the whole point is to not have to do that!

Any ideas anyone?
In the same boat, except I used to have them setup on ubuntu 11.10, then upgraded to 12.04 and lost them. Tried setting them up again, but I am in the same boat as you.

Edit: Hmmm... still getting no permissions when starting with sudo even
 

·
Registered
Joined
·
2 Posts
So 3 things.

1. The OP should update the first post with the updated list that Tahl put up.
2. Is there a difference between SYSFS{idVendor}==1949 and SYSFS{idVendor}=="1949", that is, with the quotes around the number? Just pointing it out.
3. There should also be an entry for the Amazon Kindle Fire. Here is the udev rule:

Code:
<br />
#Amazon<br />
SUBSYSTEM==usb, SYSFS{idVendor}==1949, MODE=0666<br />
 
1 - 19 of 19 Posts
Top