Android模拟器:如何监视网络流量? [英] Android emulator: How to monitor network traffic?

查看:806
本文介绍了Android模拟器:如何监视网络流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何监控网络流量,发送和从我的Andr​​oid模拟器收到?

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:

  1. 复制并在模拟器上运行 ARM兼容的tcpdump二进制 ,输出写入到SD卡上,或许(如 tcpdump的-s0 -w /sdcard/emulator.cap )。

  1. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆