'adb devices' returns an empty list

5,374 views
Skip to first unread message

argongold

unread,
Apr 4, 2011, 1:02:55 PM4/4/11
to android-platform
Hi,
I've a mini MID device and I am trying to use it for development/
debugging purpose. But after all the setting steps( see below) . I am
still not able to get device listed when I issue 'adb devices'
command.

Things I have done as follows:
1. enable USB debugging on the device under Settings->Applications-

>Development->USB debugging

2. I have changed the following file on my computer .
/etc/udev/rules.d/51-android.rules and added the following line.
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", ATTR{idProduct}=="0001",
SYMLINK+="android_adb", MODE="0666", OWNER="MYNAME"

3. (on Computer)
Command Issued >> lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 1690:0741 Askey Computer Corp. [hex]
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 062a:6301 Creative Labs
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 18d1:0001
Bus 001 Device 003: ID 0408:1fc3 Quanta Computer, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Note: device is connect to usb bus at Line no. 9 above .

4 .(on Computer)
Command Issued >> adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached

5. (on Device itself)
Command Issued >> adbd
cannot bind 'tcp:5037'

6. (on Device itself)
command issued >> which adbd
/system/bin/adbd

7. (on Device itself)
command issued>> ps -aux | grep adbd

(catch nothing)

8. (on Device itself)
Command Issued >> netstat -a | grep 5037

nothing returns from above command.


About Device -> Mini MID
Build Number
(Mircowell.generic-eng 2.1-update1 ECLAIR eng.
20110328.183228.PPC-400.V0.0.1)
Kernel Version
(linux2.6.29-ssl)


If you have experienced such issue please let me know steps to resolve
it. It seems the problem is on device side for which adbd returns
'cannot bind 'tcp:5037' .

Thanks for your strong support.

regards,
argon

Shachar Shemesh

unread,
Apr 4, 2011, 1:22:42 PM4/4/11
to android-...@googlegroups.com
On 04/04/11 20:02, argongold wrote:

> Hi,
> I've a mini MID device and I am trying to use it for development/
> debugging purpose. But after all the setting steps( see below) . I am
> still not able to get device listed when I issue 'adb devices'
> command.

> 2. I have changed the following file on my computer .


> /etc/udev/rules.d/51-android.rules and added the following line.
> SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", ATTR{idProduct}=="0001",
> SYMLINK+="android_adb", MODE="0666", OWNER="MYNAME"
>
>

If you run the adb server as root, does it still not find the device? If
it works as root, then that is a permission problem.

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

argongold

unread,
Apr 4, 2011, 9:12:39 PM4/4/11
to android-platform
Hi Shachar

> If you run the adb server as root, does it still not find the device? If
> it works as root, then that is a permission problem.

I have issued command as root user as well but with same results

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


I think the problem is adbd is not running on the device when I issue
the command on step 5 below
5. (on Device itself)
Command Issued >> adbd
cannot bind 'tcp:5037'

under what condition adbd gives above error message 'cannot bind 'tcp:
5037'?

argon

Artur Mazurek

unread,
Apr 5, 2011, 5:02:42 AM4/5/11
to android-...@googlegroups.com
Hi,

Have you tried using only "ps" on the device shell? It's quite funny
but this invocation returns a proper list of processes (on mine
gingerbread emulator) while "ps -aux" returns an empty list.

When talking about the "cannot bind" error, for me it happened only
when adbd was already running on target so the port was already bound.

Hope it helps at least a bit.

Also when starting adb server on host machine it doesn't always find
devices immediately. Have you tried calling 'adb devices" again when
it is already running?

Best Regards,
Artur

2011/4/5 argongold <argon...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>
>

andrew_esh

unread,
Apr 5, 2011, 10:49:53 AM4/5/11
to android-platform
What Artur says about ps is true. It's a busybox implementation of ps,
so it doesn't have a lot of functionality. The same is true for
netstat. The -a flag is ignored.

When I run netstat on my device, when adb is running and connected, I
see this:
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 0 127.0.0.1:5037 0.0.0.0:*
LISTEN

And I see adbd like this:
# ps | grep adbd
ps | grep adbd
root 129 1 3536 192 ffffffff 0000ee84 S /sbin/adbd

On the other end of the USB connection (Windows, for me), I see an
"adb.exe" running in the process list, which persists after any adb
shell is closed. DDMS connections can cause this adb.exe to get
started.

I run CyanogenMod on my device, so I have a fully functional "lsof". I
don't know if that is available on standard android. Here's what I see
when I dump everything adbd has open while a shell and DDMS are
connected to it:
# lsof -p 129
lsof -p 129
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
adbd 129 root cwd DIR 0,1 0 1 /
adbd 129 root rtd DIR 0,1 0 1 /
adbd 129 root txt REG 0,1 138368 32 /sbin/adbd
adbd 129 root DEL REG 0,4 483 /dev/ashmem/
system_properties
adbd 129 root 0u CHR 1,3 0t0 400 /dev/null
adbd 129 root 1u CHR 1,3 0t0 400 /dev/null
adbd 129 root 2u CHR 1,3 0t0 400 /dev/null
adbd 129 root 3u unix 0xc58ad900 0t0 671 socket
adbd 129 root 4u unix 0xc58ad740 0t0 672 socket
adbd 129 root 5u IPv4 673 0t0 TCP localhost:5037
(LISTEN)
adbd 129 root 6u CHR 10,47 0t0 386 /dev/
android_adb_enable
adbd 129 root 7u unix 0xc58ad580 0t0 675 socket
adbd 129 root 8u CHR 10,48 0t0 385 /dev/
android_adb
adbd 129 root 9u unix 0xc22a43c0 0t0 345580 socket
adbd 129 root 10u CHR 10,52 0t0 377 /dev/ashmem
adbd 129 root 11u unix 0xc09e2ac0 0t0 394651 socket
adbd 129 root 12u unix 0xc5981200 0t0 808 socket
adbd 129 root 13u unix 0xc5b53580 0t0 1256 socket
adbd 129 root 14u unix 0xc5b53200 0t0 1271 socket
adbd 129 root 15u unix 0xc22a4740 0t0 457754 socket
adbd 129 root 16u unix 0xc09e2900 0t0 457780 socket
adbd 129 root 17u unix 0xc09e2c80 0t0 455641 socket
adbd 129 root 18u unix 0xc09e2200 0t0 2747 socket
adbd 129 root 19u unix 0xc27eae40 0t0 322422 socket
adbd 129 root 20u CHR 5,2 0t0 410 /dev/ptmx
adbd 129 root 21u unix 0xc5b53040 0t0 111032 socket
adbd 129 root 22u unix 0xc197cc80 0t0 463031 socket
adbd 129 root 23u unix 0xc09e2e40 0t0 394652 socket
adbd 129 root 24u unix 0xc22a4ac0 0t0 457759 socket
adbd 129 root 26u unix 0xc22a4e40 0t0 457761 socket
adbd 129 root 27u unix 0xc27ea3c0 0t0 457763 socket
adbd 129 root 28u unix 0xc09e2580 0t0 457765 socket
adbd 129 root 29u unix 0xc58ad200 0t0 457782 socket
adbd 129 root 30u unix 0xc197a580 0t0 457784 socket
adbd 129 root 31u unix 0xc197c580 0t0 463032 socket
adbd 129 root 32u unix 0xc197ce40 0t0 463117 socket
adbd 129 root 33u unix 0xc197c900 0t0 463118 socket
adbd 129 root 34u CHR 5,2 0t0 410 /dev/ptmx
adbd 129 root 35u unix 0xc197c040 0t0 457802 socket
adbd 129 root 36u unix 0xc197c200 0t0 457803 socket
adbd 129 root 37r CHR 10,41 0t0 394 /dev/log/
events
adbd 129 root 41u unix 0xc5361ac0 0t0 462780 socket
adbd 129 root 42u unix 0xc5361e40 0t0 462781 socket
#

Sayiram K N

unread,
Apr 6, 2011, 9:38:47 AM4/6/11
to android-...@googlegroups.com
can you tryout
 ./adb kill-server
./adb start-server
 
then do ./adb devices


--
Reply all
Reply to author
Forward
0 new messages