Mac platform uses ADB, tcpdump tools to crawl Android mobile network package

Source: Internet
Author: User

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

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.