How to capture packets using tcpdump in Android
Tcpdump and Root permissions are required for Packet Capturing. tcpdump will be downloaded after this article.
First, pass tcpdump to your mobile phone and use the adb command (sometimes it may be a problem to put the SD card. I can use it once, but it won't work after I brush another ROM ):
Adb push tcpdump/data/local/
Connect the computer to the mobile phone, open CMD, and execute:
Adb shell
Chmod 6755/data/local/tcpdump
Cd/data/local/
./Tcpdump-p-vv-s 0-w/sdcard/capture. pcap
To stop, press ctrl + c. If you do not have the root permission, the system prompts no suitable device found.
After the device is stopped, use WireShark (a packet capture tool on the computer to search and download it by yourself) to open capture. pcap in the SD card and you will see the data packet.
You can use adb pull/sdcard/capture. pcap to directly export files to your computer.
Download tcpdump:
Free in http://linux.bkjia.com/
The username and password are both www.bkjia.com
The specific download directory is in the/June/Android network packet capture method
For the download method, see
Linux network has two very useful commands: ip address and TcpDump
Use TcpDump in Linux
Linux TcpDump command details
Linux TcpDump packet capture Analysis