Monitor network activity in Android Phones

前端 未结 11 1684
庸人自扰
庸人自扰 2020-11-28 02:47

I would like to monitor network traffic of my Android Phone. I was thinking using tcpdump for Android, but I\'m not sure if I have to cross-compile for the phone.

An

相关标签:
11条回答
  • 2020-11-28 03:39

    If you are doing it from the emulator you can do it like this:

    Run emulator -tcpdump emulator.cap -avd my_avd to write all the emulator's traffic to a local file on your PC and then open it in wireshark

    There is a similar post that might help HERE

    0 讨论(0)
  • 2020-11-28 03:39

    Packet Capture is the best tool to track network data on the android. DOesnot need any root access and easy to read and save the calls based on application. Check this out

    0 讨论(0)
  • 2020-11-28 03:40

    Without root, you can use debug proxies like Charlesproxy&Co.

    0 讨论(0)
  • 2020-11-28 03:41

    Note: tcpdump requires root privileges, so you'll have to root your phone if not done already. Here's an ARM binary of tcpdump (this works for my Samsung Captivate). If you prefer to build your own binary, instructions are here (yes, you'd likely need to cross compile).

    Also, check out Shark For Root (an Android packet capture tool based on tcpdump).

    I don't believe tcpdump can monitor traffic by specific process ID. The strace method that Chris Stratton refers to seems like more effort than its worth. It would be simpler to monitor specific IPs and ports used by the target process. If that info isn't known, capture all traffic during a period of process activity and then sift through the resulting pcap with Wireshark.

    0 讨论(0)
  • 2020-11-28 03:42

    The DDMS tool included in the Android SDK includes a tool for monitoring network traffic. It does not provide the kind of detail you get from tcpdump and similar low level tools, but it is still very useful.

    Oficial documentation: http://developer.android.com/tools/debugging/ddms.html#network

    0 讨论(0)
提交回复
热议问题