Tcpdump data packet capture on Android

Source: Internet
Author: User

Recently, due to project requirements, tcpdump is currently used

1. Get the root permission on the mobile phone

It is too cumbersome to use the CMD Tool to download the root mobile phone. We recommend a "Zhuo master brush expert" tool ., Master Zhuo (PC): http://www.dashi.com/product/5.html. After the installation is downloaded, The rootprogram is installed on the zookeeper tool.

The root mobile phone may have some problems. At first, I downloaded some files and root them through cmd. As a result, the mobile phone almost crashed and then gave up, I switched to this specialized flash Machine Tool. However, some models may be faulty. I used this software to root the G5, G10, and G13 mobile phones and tried it n times, g10 and G13 are successful if G5 is always root

2. Download tcpdump, address http://www.strazzere.com/android/tcpdump

For example, I downloaded it to the root directory of drive D.

 

CMD command (below is my cmd record ):

ADB Root

ADB remount

ADB push D: \ tcpdump/data/local/tcpdump (put the tcpdump file in the mobile phone/data/local/directory)

ADB shell chmod 6755/data/local/tcpdump (Set permissions)

ADB Shell

CD/Data

CD/data/local (enter the/data/local directory)

./Tcpdump-I any-p-S 0-W/mnt/sdcard/cap. CAP (enter this line when you want to capture the network data of your mobile phone)

ADB pull/mnt/sdcard/cap. Cap D:/(stop packet capture and put the data file cap. cap in the root directory of drive D)

Related Article

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.