Record the first time to grab the bag under Android

Source: Internet
Author: User

Using tcpdump to grab a bag

1. To the phone root, a lot of ways

2. Installing ADROID-SDK

3. Enter the command: adb version, if the versions of ADB are displayed normally, the previous environment variable setting is not a problem, and the Adb.exe itself is complete, it is possible that the Adb.exe itself is corrupt, the environment variable is set incorrectly, Or the environment variable has not been set in effect, please check it yourself

If an environment variable is not configured, you can enter the ADB installation directory platform-tools the command

4. Download tcpdump Copy to/data/local/directory

Push prompt protocol failure, check data said USB interface power supply, switch to the back end of the USB port can be

If the copy fails and it is possible that the permissions are not correct, give the file directory all permissions

5. Use tcpdump to grab the packet and write the result to a pcap file to save, 2-5.

    • Use the command su command in the Command Prompt window to get administrator privileges;
    • Enter the command in the current shell: /data/local/tcpdump-p-S 0-w/sdcard/001.pcap;
    • On the Android phone to do related operations, generate communication packets, the communication behavior after the completion of the command Prompt window with the Ctrl + C key combination to exit the current shell to stop grasping the package.

In the above procedure ,theparameters of the tcpdump command have the following meanings:
# "-P": Disable promiscuous mode (does not use promiscuous mode)
# "-S 0": Capture the entire packet (-s parameter to specify the packet capture length, specified here as 0, meaning to crawl the complete packet)
# "-W *.pcap": Write packets to a file (writes the result to a pcap file instead of displaying directly on the terminal)

4. Download the capture results to your local PC. To use commands in a command prompt window: adb pull/sdcard/001.pcap <LocalPath of Pcapfile >

5. Use the Wireshark and other protocol analysis tools to view the results of the capture package.

Record the first time to grab the bag under Android

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.