Is it possible to use JPCAP with Android?

家住魔仙堡 提交于 2019-12-10 16:02:50

问题


I want to create a module that capture packets ( like Shark for Root app in Android).

Can i use JPCAP library (Java)? Do i need to root my Android phone to capture packets?


回答1:


Can i use JPCAP library (Java)?

Not directly. It relies upon JNI, presumably for accessing libpcap. You would need to modify the build process to use Android's NDK. It is conceivable that this would require no code changes, but that's far from certain.

Also, it is possible that the Java code for JPCAP requires classes that are not in Android.

Do i need to root my Android phone to capture packets?

Most likely. Everything else that uses libpcap on Android (e.g., Shark for Root) needs it. Even desktop Linux kinda needs it.



来源:https://stackoverflow.com/questions/8260977/is-it-possible-to-use-jpcap-with-android

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