How do I monitor network traffic sent and received from my android emulator?
There are two ways to capture network traffic directly from an Android emulator:
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 -s0 -w /sdcard/emulator.cap
Run emulator -tcpdump emulator.cap -avd my_avd to write all the emulator's traffic to a local file on your PC
emulator -tcpdump emulator.cap -avd my_avd
In both cases you can then analyse the pcap file with tcpdump or Wireshark as normal.
2.1m questions
2.1m answers
60 comments
57.0k users