Androidはtcpdumpを使用してパケットをキャプチャします



Android Uses Tcpdump Capture Packets



アンドロイドマシンがトラフィックを使用する場合、インターフェースに問題があると考えられるため、いくつかの素晴らしい理由でアプリが正しく動作しないため、tcpdumpを使用してパッケージを取得して確認してください。

処理する

1、電話はルートでなければなりません、ルート解決する方法はそれ自体を解決します
2、tcpdumpをダウンロードします
https://github.com/zencodex/hack-android/raw/master/arm-bin/tcpdump-pie/tcpdump
3、ルート電話はadbコマンドを使用してプッシュインします



adb root adb push /Users/tom/Downloads/tcpdump /data/local/tcpdump

4、tcpdumpを有効にします

//Enter the shell adb shell / / The following instructions are executed in the shell environment su cd /data/local chmod 6755 ./tcpdump ./tcpdump -p -vv -s 0 -w /sdcard/capture.pcap / / At this point, start listening to the port, press ctrl + c to end the listen and generate capture.pcap / / File in the sdcard directory / / Execute in a non-shell environment adb pull /sdcard/capture.pcap /Users/tom/Downloads / / Export the captured packets to the computer, you can view through wireshark