How to capture packets using tcpdump in Android

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.