IT
在线教育领跑者——麦子学?/p>
http://www.maziedu.com
准备?/p>
1.
手机要有
root
权限
2.
下载
tcpdump
步骤?/p>
1. adb push tcpdump /data/local/tcpdump
2. adb shell chmod 6755 /data/local/tcpdump
3. adb shell, su
获得
root
权限
4. cd /data/local
5. /tcpdump -i any -p -s 0 -w /data/capture.pcap
命令参数?/p>
# "-i any": listen on any network interface
# "-p": disable promiscuous mode (doesn't work anyway)
# "-s 0": capture the entire packet
# "-w": write packets to a file (rather than printing to stdout)
... do whatever you want to capture, then ^C to stop it ...
6, adb pull /data/capture.pcap d:/
7,
在电脑上?/p>
wireshark
打开
capture.pcap
即可分析
log
Execute the following if you would like to watch packets go by rather than
capturing them to a file (-n skips DNS lookups. -s 0 captures the entire packet
rather than just the header):
adb shell tcpdump -n -s 0