cpdump对于TCP/IP协议相关的都可以使用这个来抓
ex: adb shell tcpdump -s 10000 -w /sdcard/capture.pcap.比如抓mms下载的时候的UA Profile,browser上网的时候使用proxy的APN下载,streaming的相关内容包括UA Profile等。
Android利用tcpdump抓包
command:
adb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap
-i any: Listen on any network interface
-p:disable promiscuous mode
-s 0:capture the entire packet
-w: write packets to a file
如果执行此命令无效,请下载tcpdump文件,http://dl.dbank.com/c0nhafqfyx. 然后push到/system/bin目录下
Real time packet monitoring
command:
adb shell tcpdump -n -s 0
-n:skip DNS lookups
See HTTP traffic
command:
adb shell tcpdump -X -n -s 0 port 80