Wednesday, October 16, 2013

How to solve adb server is out of date issue

I was facing the adb issue yesterday after reboot my laptop.
>adb devices
adb server is out of date.  killing...
ADB server didn't ACK
* failed to start daemon *
error: unknown host service



Finally, here is the solution:
Step1: find if the adb port is occupied
> netstat -ano |grep 5037
 TCP    127.0.0.1:5037         127.0.0.1:65151        ESTABLISHED     6980


Step2: find the process name
>>tasklist /fi "pid eq 6980

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
tadb.exe                      6980 Console                    1      5,112 K

Step3: kill that process (tadb.exe for this case)

How to use tcpdump on Android devices


>adb push tcpdump /sdcard/tcpdump
>adb shell
>su
>cp /sdcard/tcpdump /data/local/tcpdump
>chmod 6755 /data/local/tcpdump
>cd /data/local
>/data/local/tcpdump -p -vv -s 0 -w /sdcard/capture.pcap
ctl+c
>adb pull /sdcard/capture.pcap c:\