2

My Android device Ly-706 is not listed while running adb devices.

I can run emulator using eclipse and install application on emulator using adb except on Real device

I added:

SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666"

in /etc/udev/rules.d/90-android.rules ,still no luck

Same result for samsung galaxy 3(vendor id ="04e8")

I installed GNU/Linux (ubuntu 10.10) because it is not listing in windows.

What am I missing?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Dev.Sinto
  • 6,802
  • 8
  • 36
  • 54
  • Did you try with any other device? Which device you're using? The code you gave doesn't appear in the list provided by android. – Aman Alam Jan 06 '11 at 13:14
  • @sheikh aman ,actually that is a chineese device,I tried with samsung galaxy 3 I got same result -:( – Dev.Sinto Jan 06 '11 at 13:30
  • @trojanfoe,I new to ubantu ,please tell me how can i do that ...? – Dev.Sinto Jan 06 '11 at 13:32
  • 2
    "sudo /etc/init.d/udev restart" will do it – trojanfoe Jan 06 '11 at 13:35
  • @trojanfoe,yeah I tried that but I got same same result -:( – Dev.Sinto Jan 06 '11 at 13:49
  • Thanks guys for spending your valuable time for me,I got my problem fixed -;) I added #samsung galaxy SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666" in 70-persistent-net.rules files( in /etc/udev/rules.d/) So I guess later version of unbantu 9.2 we need to add that vender id of device to that file – Dev.Sinto Jan 07 '11 at 10:06

7 Answers7

8

I always run adb as root the first time, and as normal user thereafter. But I run a virtual machine that I suspend so I don't have to do it often.

ou have the right idea, the solution is most definately that you need the permission in the file within rules directory. The only suggestion I can make is that you are using the wrong vendor id.

Look it up here

Also, to make sure you're running the correct adb under root, run both of:

sudo adb kill-server
adb kill-server

before:

sudo adb start-server

I have found just running the one doesn't always work.

Hamid
  • 4,410
  • 10
  • 43
  • 72
  • hi hamid,thanks for the reply I tried with samsung galaxy got same result...... – Dev.Sinto Jan 06 '11 at 13:37
  • hi again,when I run sudo adb start-server ,I got 'sudo adb command not found error' At the same time can run without including sudo in command – Dev.Sinto Jan 06 '11 at 13:53
  • You need to copy the adb binary to the /bin directory in linux. I forgot to mention this. Because root has a different path to your normal user. Don't forget to chmod it to make it executable too. That will solve the not found problem. As for the Galaxy Tab, I develop daily with one, the vendor ID is 04e8 I can confirm. – Hamid Jan 06 '11 at 15:24
  • Thanks guys for spending your valuable time for me,I got my problem fixed -;) I added #samsung galaxy SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666" in 70-persistent-net.rules files( in /etc/udev/rules.d/) So I guess later version of unbantu 9.2 we need to add that vender id of device to that file not in 51-android.rules – Dev.Sinto Jan 07 '11 at 10:43
  • Shouldn't make a difference while file it's in, but 04e8 isn't the vendor you posted in the initial question, maybe that's what was wrong? – Hamid Jan 09 '11 at 21:20
  • Starting adb in root mode helped me to resolve issue – srinik Feb 24 '13 at 02:46
  • This hepled me to connect a wiko lenny2 in 2017. – rocksteady Jul 28 '17 at 18:51
2

As a temporary workaround you could try starting the adb daemon as root:

sudo adb kill-server sudo adb devices

This worked for me until I managed to get udev set up properly.

Adrian
  • 1,652
  • 2
  • 22
  • 32
  • 1
    This is not a good way. As you should **not** let any process to run as su until it is absolutely necessary. This may be the problem with your rule itself, for e.g., you may not be setting the group for the rule, see my [answer](http://stackoverflow.com/a/14622480/1523910) for more info. – Avinash R Jan 31 '13 at 09:40
  • 2
    Hence the 'temporary workaround' part of the reply. – Adrian Jan 31 '13 at 13:47
1

The rule SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666" would actually give access to the device, but the problem might be that your user may not have the permission for accessing the device.

Because you are not giving the groups for the rule, I don't know which group will have the default access to the device (i'm guessing maybe the udev group will have it), and if you would have followed the google's path of device setup (see section 3, third point, subsection a), you will realize that you have missed out the GROUP clause in the rule.

So basically your rule should be.

UBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE=="0666", GROUP="plugindev"

also check if you are in the group plugindev using the command groups. else you can give there whatever as long as you are in the group

Avinash R
  • 3,101
  • 1
  • 27
  • 47
1
sudo /etc/init.d/udev restart

as suggestend by trojanfoe is worth trying, but i guess, you did some restarts in between anyways.

Did you try to restart the adb server BEFORE you usb-plug your device? That helped me out.

Martin Booka Weser
  • 3,192
  • 5
  • 28
  • 41
1

In my case it suddenly stopped detecting my device, but from time to time it detected it, which drived me crazy.

After many kills and restarts, it ended up being something wrong with the USB cable. Changing it solved the problem, tho I have no clue why this could happen.

Maragues
  • 37,861
  • 14
  • 95
  • 96
0

Until Ubuntu 10 LTS the correct command is simply copying the adb which comes with the Google SDK, to /bin directory, insert the line according to your device in

/etc/udev/rules.d/70-persistent-net.rules:

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

Then restart udev and adb

sudo service udev restart
adb kill-server ; adb kill-server

It seems to change in Ubuntu 11, also, there is probably a possibility to make Ubuntu read any file you specify .rules, I just don't know how yet.

Leandro
  • 23
  • 3
-1

I was getting the same error until I edited sudoers. You can get path of your platform-tools and tools folder of android SDK and type :

sudo gedit /etc/sudoers
edit line `<<<<<      Defaults      secure_path=" >>>>>` 

add complete the path there and enjoy.

Tiago Almeida
  • 14,081
  • 3
  • 67
  • 82
phoenix911
  • 3
  • 2
  • 5