找到了.
在对
bug report的非常有教育意义的评论中:
~# adb devices
adb.c::main():Handling commandline()
adb_client.c::adb_query():adb_query: host:devices
adb_client.c::_adb_connect():_adb_connect: host:version
transport.c::writex():writex: fd=3 len=4: 30303063 000c
transport.c::writex():writex: fd=3 len=12: 686f73743a76657273696f6e host:version
transport.c::readx():readx: fd=3 wanted=4
^Z
[1]+ Stopped adb devices
嗯……文件描述符3?
# pgrep adb
5982
# ls -l /proc/5982/fd/
total 0
lrwx------ 1 root root 64 Jun 14 18:04 0 -> /dev/pts/0
lrwx------ 1 root root 64 Jun 14 18:04 1 -> /dev/pts/0
lrwx------ 1 root root 64 Jun 14 18:04 2 -> /dev/pts/0
lrwx------ 1 root root 64 Jun 14 18:04 3 -> socket:[96863]
socket 96863?
# lsof | grep 96863
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/leo/gvfs
Output information may be incomplete.
adb 5982 root 3u IPv4 96863 0t0 TCP localhost:55463->localhost:5037 (ESTABLISHED)
# netstat -antp | grep LISTEN | grep 5037
tcp6 0 0 :::5037 :::* LISTEN 2419/java
AVA? java是什么?
# ps -Alf | grep java
1 S root 2409 1 0 80 0 - 4620 hrtime 16:20 ? 00:00:07 /opt/traccar/bin/./wrapper /opt/traccar/bin/../conf/wrapper.conf wrapper.syslog.ident=traccar wrapper.pidfile=/opt/traccar/bin/./traccar.pid wrapper.name=traccar wrapper.displayname=traccar wrapper.daemonize=TRUE wrapper.statusfile=/opt/traccar/bin/./traccar.status wrapper.java.statusfile=/opt/traccar/bin/./traccar.java.status wrapper.script.version=3.5.19
0 S root 2419 2409 0 80 0 - 810286 futex_ 16:20 ? 00:00:41 /usr/lib/jvm/java-6-oracle/jre/bin/java -Djava.library.path=../lib -classpath ../lib/wrapper.jar:../tracker-server.jar -Dwrapper.key=ja2Mz5xiI18XmG4C -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.disable_console_input=TRUE -Dwrapper.pid=2409 -Dwrapper.version=3.5.19 -Dwrapper.native_library=wrapper -Dwrapper.arch=x86 -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp org.traccar.Main /opt/traccar/conf/traccar.cfg
0 S leo 3549 3421 2 80 0 - 853194 futex_ 16:24 ? 00:02:59 /usr/bin/java -Xms40m -Xmx512m -XX:MaxPermSize=256m -jar /home/leo/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar -os linux -ws gtk -arch x86_64 -showsplash /home/leo/Downloads/eclipse//plugins/org.eclipse.platform_4.2.2.v201302041200/splash.bmp -launcher /home/leo/Downloads/eclipse/eclipse -name Eclipse --launcher.library /home/leo/Downloads/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807/eclipse_1502.so -startup /home/leo/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.overrideVmargs -exitdata 148007 -vm /usr/bin/java -vmargs -Xms40m -Xmx512m -XX:MaxPermSize=256m -jar /home/leo/Downloads/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
0 S root 6280 4662 0 80 0 - 2360 pipe_w 18:24 pts/0 00:00:00 grep --color=auto java
grrrrr!为什么?为什么? adb为什么没有超时或什么?为什么traccar(一个也有Android客户端的软件)使用ADB的端口5037作为其IntelliTrac组件?他们使用所有端口5000到5040.
# /etc/init.d/traccar stop
Stopping traccar...
Stopped traccar.
# adb start-server
# adb devices
List of devices attached
016814F11001F009 device