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)