1. 电脑连接手机,进入adb模式:adb shell

2. 获取手机root权限:su

3. 下载tcpdump;

4. 将tcpdump放到手机/data/local/目录下:adb push c:\tcpdump /data/local/tcpdump

5. 赋予/data/local/tcpdump对应权限:chmod 6755 /data/local/tcpdump

6. 进入路径:cd /data/local

7. 开始抓包:/data/local/tcpdump -i any -p -s 0 -w /sdcard/test.pcap

    命令参数:

        # "-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)

 停止抓包ctrl+c

8. 导出/sdcard/test.pcap文件:adb pull /sdcard/capture.pcap d:/

9.使用WireShark查看即可。