Android system mobile phone-side grab packet method

Source: Internet
Author: User

Prerequisites:

    • Root's Android phone
    • SDK Development tools for Android
    • Grab the package program tcpdump, can be downloaded to the following link: http://pan.baidu.com/share/link?shareid=375938&uk=3290099006

Grasping the package steps:

1. We use the data cable to connect the Android phone to the computer side and open the Windows Command Prompt window. Use the command to open the folder where Android is located, my is in the C packing directory, because we want to use to Adb.exe, so we have to open to the ADB directory.

2. Copy the Tcpdump program to the Android phone (the directory file in front of the command is the local address, the latter directory is the destination mobile address)

C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Push C:/tcpdump/data/local/tcpdump

3, modify the permissions of the Tcpdump

(1) First enter the ADB shell access to modify, if after 4.0 of the system, and then enter the ADB shell, we also need to enter the SU command, after running the SU instruction, the mobile terminal desktop will be prompted to confirm your recognition of the root operation.

C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Shell

(2) When # is present, enter chmod 777/data/local/tcpdump

4. Enter Root permission

C:\ANDROID-SDK-WINDOWS\PLATFORM-TOOLS>ADB Shell
$ su Root

After you run the SU command, the phone terminal desktop will be prompted to confirm your recognition of the root operation.

5. Run tcpdump to grab the bag

#/data/local/tcpdump-p-vv-s 0-w/sdcard/test.pcap

On the phone side of the corresponding needs to do the packet-capture analysis of the operation, after the completion of the command Prompt window execution CTRL + C interrupt the capture process.

5. Copy the capture result to local (the front directory is the address of the mobile phone, the directory behind the local address)

6, use Wireshark and other tools to view the capture package file Test.pcap

Android system mobile phone-side grab packet method

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.