简体   繁体   English

如何在不使用任何root权限的情况下在Android中捕获网络数据包

[英]How to capture network packet in Android without using any root permissions

I want to capture network data packets on android app. 我想在Android应用程序上捕获网络数据包。 Do you have any suggestions or source code to help me understand if this is possible? 您是否有任何建议或源代码可以帮助我了解这是否可行?

Without root you will have to use a pass-thru method. 没有root,你将不得不使用pass-thru方法。

  1. Setup your PC/Mac to share your wired connection through the wireless adapter 设置PC / Mac以通过无线适配器共享有线连接
  2. Connect to the wireless adapter with your Android device 使用Android设备连接无线适配器
  3. Run wireshark 运行wireshark

most apps that filter/sniff/account network traffic in android without root use the loopback vpn trick, where you setup a vpn and inspect the traffic (or whatever you want) 在没有root的情况下在android中过滤/嗅探/帐户网络流量的大多数应用程序使用loopback vpn技巧,你设置一个vpn并检查流量(或任何你想要的)

for sniffer, check tpacketcapture , but i don't think you have the source... try to contact then, or check fdroid for a similar open source app 对于嗅探器,检查tpacketcapture ,但我不认为你有源...尝试联系然后,或检查fdroid的类似开源应用程序

这应该只是中间人的方法 - 考虑建立一个代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM