You are not logged in.

#1 2012-07-15 09:25:20

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 174

[Android] adb does not detect devices using usb

Hello,

Since a few days, adb does not detect the connected devices anymore. I have tried with two different android phones of different brands.
They appear in the lsusb command but not adb as shown below

$ lsusb
Bus 001 Device 003: ID 0bb4:0cb2 HTC (High Tech Computer Corp.) 
Bus 007 Device 007: ID 05c6:9018 Qualcomm, Inc. Qualcomm HSUSB Device
...
$ adb devices
List of devices attached 

$ yaourt -Qs android
local/android-apktool 1.4.3-1
    a tool for reengineering Android apk files
local/android-sdk r20-2
    Google Android SDK
local/android-sdk-platform-tools r12-1
    Platform-Tools for Google Android SDK (adb, aapt, aidl, dexdump and dx)
local/android-udev 1.3-4
    Udev rules to connect Android devices to your linux box
local/eclipse-android 20.0.0-1
    Eclipse plugin for Android

If it was a udev rules problem it would appear in the devices list with "?????" instead of the brand so I think the problem is somewhere else.
I use 64bits version of arch.

Any idea ?

PS: I have tried on ubuntu (dual boot), I don't have the problem also the 12th release of package-tools.

Edit: it seems to be a problem with the usb connection, not adb when enabling "adb over network" it works.

$ adb connect 192.168.2.9
connected to 192.168.2.9:5555
$ adb devices
List of devices attached 
192.168.2.9:5555	device

Last edited by martvefun (2012-07-15 09:46:53)


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Dell Vostro

Offline

#2 2012-07-22 08:07:44

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 174

Re: [Android] adb does not detect devices using usb

Up one week later. Nobody has an idea how to fix that ?


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Dell Vostro

Offline

#3 2012-07-22 18:58:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,801

Re: [Android] adb does not detect devices using usb

Well, I gave it a shot and -- you are right, it did not detect my device.  I have done development on this Archbox for my HTC in the past hmm

At the time, I was running a custom kernel and systemd.  It is possible I optimized out a module I need.  OTOH, systemd has caused me issues in the past.
Long story short, I rebooted to the stock kernel and the default initscripts and tried again:

ewaller@odin:~[1] 1007 %adb version 
Android Debug Bridge version 1.0.29
ewaller@odin:~ 1008 %adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 

ewaller@odin:~ 1009 %adb devices
List of devices attached 
HT12NHJ02016    device

ewaller@odin:~ 1010 %
ewaller@odin:~ 1010 %uname -a
Linux odin 3.4.6-1-ARCH #1 SMP PREEMPT Fri Jul 20 08:21:26 CEST 2012 x86_64 GNU/Linux
ewaller@odin:~ 1011 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2012-07-23 09:38:10

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 174

Re: [Android] adb does not detect devices using usb

Thank you for your answer.
As you talked about init scripts, I wondered if I forgot to start something so I did:

$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 

$ sudo /etc/rc.d/adb restart
:: Stopping adb                                                          [DONE] 
:: Starting adb                                                          [DONE] 
$ adb devices
List of devices attached 
ZBR3301799022	device

It means it was a permission problem them ?

Last edited by martvefun (2012-07-23 09:38:56)


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Dell Vostro

Offline

#5 2012-07-23 10:00:32

IsSuE
Member
Registered: 2006-04-29
Posts: 309

Re: [Android] adb does not detect devices using usb

You might need to have an udev rule for the device present, see here
http://wiki.cyanogenmod.com/wiki/Udev

Offline

#6 2012-07-23 10:05:51

martvefun
Member
From: The Internets
Registered: 2009-12-19
Posts: 174

Re: [Android] adb does not detect devices using usb

No I don't think so. As I said, without the udev rules, the device would appear with "??????" instead of the model (and that wouldn't explain why it worked once I restarted adb).
For the udev rules, you have the aur package android-udev that does the job pretty well


English is not my native language, sorry for the mistakes
Arch amd64, GNOME, Dell Vostro

Offline

#7 2012-08-20 22:06:53

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [Android] adb does not detect devices using usb

[EDIT]: My apologies. I didn't realize that you'd already tried restarting it through the dæmon. Is it possible that the dæmon runs the server without elevated permissions, even if run at start? [/EDIT]

All the best,

-HG

Last edited by HalosGhost (2012-08-20 22:10:24)

Offline

#8 2012-09-01 04:04:39

tbfly
Member
Registered: 2012-09-01
Posts: 2

Re: [Android] adb does not detect devices using usb

I had meet the same problem. My android phone is S899t, with usb id: 04cc:2323

lsusb's output:
Bus 007 Device 007: ID 04cc:2323 ST-Ericsson Ux500 serial debug port

I tryed the udev rule:
# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04cc", ATTRS{idProduct}=="2323", MODE="0660", OWNER="lite"

while don't work.
Then I found:

cat ~/.android/adb_usb.ini
{{{
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x04cc
}}}

with this modified, now I can "adb shell" in my archlinux.
haha.
Hope this help.

Offline

#9 2012-09-01 05:33:56

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: [Android] adb does not detect devices using usb

tbfly wrote:

I tryed the udev rule:
# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04cc", ATTRS{idProduct}=="2323", MODE="0660", OWNER="lite"

while don't work.

I believe the correct syntax is

...ATTR{idProduct}==...

without the S

Offline

#10 2012-09-02 04:25:11

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [Android] adb does not detect devices using usb

skunktrader wrote:
tbfly wrote:

I tryed the udev rule:
# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04cc", ATTRS{idProduct}=="2323", MODE="0660", OWNER="lite"

while don't work.

I believe the correct syntax is

...ATTR{idProduct}==...

without the S

My functioning rules all have ATTRS. Perhaps both are allowable (I feel like I've always seen the "S" present, though).

All the best,

-HG

Offline

#11 2012-09-02 07:16:11

tbfly
Member
Registered: 2012-09-01
Posts: 2

Re: [Android] adb does not detect devices using usb

In my case.

only create file:
~/.android/adb_usb.ini

Add add contents:
{{{
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x04cc
}}}

will fix my problem.

Just a method for refrence.

Offline

Board footer

Powered by FluxBB