Android模拟器:如何监视网络流量? [英] Android emulator: How to monitor network traffic?
问题描述
我如何监控网络流量,发送和从我的Android模拟器收到?
How do I monitor network traffic sent and received from my android emulator?
推荐答案
有两种方法可以从Android仿真器捕获网络流量的直接
There are two ways to capture network traffic directly from an Android emulator:
-
复制并在模拟器上运行 ARM兼容的tcpdump二进制 ,输出写入到SD卡上,或许(如
tcpdump的-s0 -w /sdcard/emulator.cap
)。
Copy and run an ARM-compatible tcpdump binary on the emulator, writing output to the SD card, perhaps (e.g.
tcpdump -s0 -w /sdcard/emulator.cap
).
运行模拟器-tcpdump emulator.cap -avd my_avd
来写你的PC上的所有仿真器的流量到本地文件
Run emulator -tcpdump emulator.cap -avd my_avd
to write all the emulator's traffic to a local file on your PC
在这两种情况下便可以分析使用tcpdump或者Wireshark的正常的PCAP文件。
In both cases you can then analyse the pcap file with tcpdump or Wireshark as normal.
这篇关于Android模拟器:如何监视网络流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!