是否有可能使用JPCAP与Android? [英] Is it possible to use JPCAP with Android?

查看:561
本文介绍了是否有可能使用JPCAP与Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个模块,捕获的数据包(如鲨鱼在Android的应用程序根目录)。

我可以用JPCAP库(Java)的?我是否需要铲除我的Andr​​oid手机捕获数据包?


解决方案

  

我可以使用JPCAP库(Java)的?


不能直接。它依靠JNI,presumably访问的libpcap 。您需要修改构建过程中使用Android的NDK。可以想象的是,这将需要无code的变化,但,从一定的远

此外,可能的是在Java code代表JPCAP要求不在的Andr​​oid类


  

我是否需要铲除我的Andr​​oid手机捕获数据包?


最有可能的。一切使用的libpcap 在Android上(例如,鲨鱼根)需要它。即使是桌面Linux还挺需要它。

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

这篇关于是否有可能使用JPCAP与Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆