简体   繁体   中英

Is it possible to use JPCAP with Android?

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?

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 (eg, Shark for Root) needs it. Even desktop Linux kinda needs it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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