Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top