Android's own packet capture tool tcpdump

Recently, there is a network problem. Use the packet capture tool to locate and check the source code of the android system. In fact, android has now integrated the tcpdump toolkit.

Toolkit source code path: / external / tcpdump /

The path of the toolkit in the device: / system / xbin / tcpdump

If the package is not available on the device, after compiling with the source code, push to the device and add execute permission to the file to grab the network package.

Run the packet capture command of tcpdump:

tcpdump -p -vv -s 0 -w /sdcard/capture.pcap

You can capture the network data packet of the device to /sdcard/capture.pcap. If you need to interrupt the packet capture, crtl + c.

After capturing the network packet, pull the file capture.pcap to the PC, and use the PC tool Wireshark tool to analyze the packet.

 

 

 

Published 142 original articles · praised 258 · 160,000 views

Guess you like

Origin blog.csdn.net/conconbenben/article/details/105496048