Sniffing network requests

半城伤御伤魂 提交于 2019-12-12 11:26:38

问题


I am looking for a way to sniff the network traffic my Android app is generating. The reason is I want to check and send statistics of the traffic generated by a third party tracking library I am using in my app.

Because of this, I cannot use any tPacketCapture or similars.

I have no access to the http client of this tracking library, so I cannot intercept any request.

I already took a look to VpnService, but I cannot force the user to connect to a VPN every time he is using my app of course.

So I am looking for any advice on how to do this in Android, if it is possible.

I found that there is this library, NetworkEye, which is doing exactly what I would like to do... but for iOS.


回答1:


As far I know, to achieve 'global' packet sniffing in Android OS you have to run on a rooted device. For the library,I would go through the NDK and libpcap for Android



来源:https://stackoverflow.com/questions/35439479/sniffing-network-requests

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!