如何在 Android 上使用 libudev
作为低级监控应用程序的一部分,需要监控 sysfs 中的一些变化,我应该使用 udev 接口而不是 inotify。很明显,大多数 Android 设备以及我真正需要运行此应用程序的所有设备都使用 udev 来枚举设备并应用策略。从 C 应用程序与 udev 交互的标准方法是使用 libudev (libudev.h),但 /lib 目录中没有 libudev.so,也根本没有包含目录。所以我需要获得这个库的 ARM 端口或者在这里做一些解决方法。请帮助我解决这个问题,因为我不擅长交叉编译和 libudev 特定问题。
注意:我在所有要运行此应用程序的设备上都具有 root 访问权限。
As a part of low-level monitoring application, that needs to monitor some changes in sysfs I should use udev interface instead of inotify. It's pretty clear that most of android devices, and all devices that I really need to run this application on, are using udev for enumerating devices and apply policies. The standard way to interact with udev from C-application is to use libudev (libudev.h), but there is no libudev.so in /lib directory and no include directory at all. So I need to get ARM port of this library or do some workaround here. Please, help me with this problem, since I'm not good in cross-compiling and libudev specific questions.
Note: I have root access on all devices, that I going to run this application on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论