In Eclipse, Run Configurations, I added additional emulator command line option “-tcpdump emulator1.cap” and it started to capture emulator’s network traffic which can be opened by Wireshark. Cool!
Now I wonder how to capture only certain host IP address somehow? I could use Display filter but file gets too big.
You could try running tcpdump directly on the device’s command line. Then you can specify arbitrary filters and options as shown in the man page for tcpdump.
Then, for example:
When you’re done:
Make sure your emulator instance has enough sdcard space for the capture.