We want to see the Web request from our app when we develop the mobile app, and we need to tcpdump the tool to grab the packet. The following steps are required to implement the Tcpdump capture package:
Here is an example of Huawei P6 Android phone
1. Phone root
To use the Tcpdump tool, you must first get the root permission of the phone, tried several root tools, and finally found that the 360 one-click Root tool can be used to P6 this machine root
Download the PC version of the 3,601-key root tool, and then use the USB cable to link your phone to your computer while turning on USB debugging (Settings--Developer Options->USB Debugging)
And then, as he prompts, Root will succeed.
2. Download the ADB tool
I started by downloading the low version of ADB from the Internet, and was always unsuccessful, showing offline. Then you have to download the latest version of ADB
One way is to developer Android to download http://developer.android.com/sdk/index.html download an ADT, where the latest adb
The other is to download the latest 1.0.31, which I packed the ADB upload,
3. After downloading the ADB, you can test its version , CD to its directory first, such as the following command
4. Then, when you use ADB devices this command to find unauthorized, this time to turn off the phone developer options and then open, and then get authorization
Authorization will copy the key from your computer's ~/.android directory to your phone.
Reference post: http://blog.csdn.net/quicksand201/article/details/19190821
After this step, you can guarantee to use the ADB shell, after entering the ADB devices, the following results
5. Download tcpdump
is: Http://www.strazzere.com/android/tcpdump
Then copy the downloaded tcpdump to a directory on your phone
Then log in with the ADB shell, switch to the root user with the SU command after logging in, go to the tcpdump directory, add tcpdump executable permission (with chmod 777 tcpdump)
6. Using tcpdump, open your app and you'll be able to see its packet capture information.
Mac platform uses ADB, tcpdump tools to crawl Android mobile network package