Android under Tcpdump grab Bag

Source: Internet
Author: User

Reference: http://www.cnblogs.com/likwo/archive/2012/09/06/2673944.html

Recently, because of testing needs, to catch the mobile app package.

A. The phone must have root authority

B. Download Tcpdump http://www.strazzere.com/android/tcpdump

C. Use adb push to copy tcpdump files to/data/local in the original text but when I do this, I find that the permissions are not enough (the phone is root) switch with the manager to run CMD or not, and finally decided to directly on the phone through the re browser directly to the tcpdump copy to/ The data/local directory.

D. running ADB shell

1 adb Shell 2 su      //Here the root manager of the phone will pop up to allow, click Allow to switch from $ to #3# run tcpdump grab bag 4 ./data/local/tcpdump-i Any-p-S 0

Command parameters:

# '-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 your want to capture and then ^c to stop it ...

Grab the packet according to the port:

1 adb shell tcpdump-x-n-s 0 Port 80

Write the captured content to a file for easy use Wireshark

1 ./data/local/tcpdump-i any-p-S 0-w/mnt/sdcard0/test.cap

Android under Tcpdump grab Bag

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.