__app test technology of N-way method for mobile phone data grasping packet

Source: Internet
Author: User

In the process of analyzing the quality index of mobile data service, it is necessary to carry on the packet analysis in the terminal side of mobile phone. Because the Android system is one of the current mainstream systems, it is important to carry out the packet analysis on the handset side of the Android system to analyze the quality index of mobile data service.

Method One: tcpdump Order grab Bag

Tool Preparation:

1, root of the Android phone

2, Android SDK development tools

3, grasping the package procedure Tcpdump

Download http://pan.baidu.com/share/link?shareid=375938&uk=3290099006

steps:

1, we use the data cable to connect the Android phone to the computer side, open the Windows Command Prompt window. Using the command to open the folder where Android is located, I am in the D-packing directory, because we want to use the Adb.exe, so we have to open to the ADB directory.

2, the Tcpdump program copy to the Android phone (the command in front of the directory file for the local address, the following directory for the purpose of the mobile phone end address)


3, modify the permissions of the Tcpdump

(1) Enter the ADB shell to enter the right to modify, if after 4.0 of the system, and then enter the ADB shell, we also need to enter the SU command, after the operation of the SU directive, the mobile phone terminal desktop will appear the appropriate information to confirm your root operation recognition.

(2) When the #, enter chmod 777/data/local/tcpdump (tcpdump position on the phone)

4, the Operation Tcpdump carry on grasping the bag

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

In the mobile phone to carry out the corresponding need to carry out the analysis of the operation, after the completion of the command Prompt window to execute CTRL + C interrupt the grab package process.

Copy the results of the grab to the local (the front directory is the mobile-phone address, the following directory is the local address)

Use tools such as Wireshark to view grab file Capture.pcap.

method Two: The computer does WiFi hotspot, the handset connects on the computer uses the Wireshark to grab the bag

This method does not need to root, and is suitable for all kinds of WiFi-enabled mobile phones (IOS, Android, etc.), tablets and so on. As long as the computer's wireless network card has a wireless hosting function, you can. The method is as follows:

1. Make the computer network a hotspot

2. Open WiFi hotspot, the mobile phone is connected to the hotspot;

3. Start Wireshark, select the network card as hotspot, click Start to start grasping package;

4. Operation of mobile phone, you can crawl to the phone all the network interaction with the packet, if you want to stop, directly click on the Wireshark stop.

method Three: Use Fiddler to crawl

This method is only suitable for crawling HTTP. The biggest advantage of this approach is that HTTP can be intercepted or received, and HTTP request and response data can be modified. Therefore, this method can simulate some special scenes (such as packet no response, simulate some error codes that are difficult to appear, etc.).

It is best to have a computer with a wireless network card.

1. Computers and mobile phones are connected to the same local area network (such as computers and mobile phones connected to the same WiFi)

2. The computer opens Fiddler, under Fiddler, Tools-fiddler Options, in the Connections tab sets listens the port number and the tick chooses "Allow remote computers connect", clicks "OK"

3. Mobile phone in the WiFi option, select * * for "manual", and then the host name to fill in the computer's IP address, the port number to fill in the "8888" just set, save

4. After setting up, direct operation of the mobile phone can be seen on the computer's fiddler HTTP code flow.

Not to be continued ~ ~

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.