安卓 fanotify_init : Function not implemented

标签 android linux android-ndk fanotify

我正在尝试使用 fanotify在 Android 上,并喜欢使用可执行文件(使用 ndk 编译)将其存档。我正在使用 fsmon (调用 fanotify 系统调用的小应用程序)启动监视器。但是在执行文件时(在根设备上作为根用户)我收到以下错误:

generic_x86:/data/local/tmp # ./fsmon -B fanotify /storage/emulated/0/
fanotify_init: Function not implemented

fanotify 在内核版本 > 2.6.37 中可用(在 Android 5+ 中提供)。

我曾在 x86 模拟器 (Android 7) 和带有 CM13 的三星 I9300 armeabi-v7a (Android 6) 上试过(均已 root)。 x86 模拟器的内核版本:3.4.67+ 和三星设备的内核版本:3.0.101-CM-g9c98896

然后我查看了 /goldfish/fs/notify/fanotify/Kconfig 中的 x86 模拟器 goldfish 内核文件:

config FANOTIFY
    bool "Filesystem wide access notification"
    select FSNOTIFY
    select ANON_INODES
    default n
    ---help---
       Say Y here to enable fanotify suport.  fanotify is a file access
       notification system which differs from inotify in that it sends
       an open file descriptor to the userspace listener along with
       the event.

       If unsure, say Y.

config FANOTIFY_ACCESS_PERMISSIONS
    bool "fanotify permissions checking"
    depends on FANOTIFY
    depends on SECURITY
    default n
    ---help---
       Say Y here is you want fanotify listeners to be able to make permissions
       decisions concerning filesystem events.  This is used by some fanotify
       listeners which need to scan files before allowing the system access to
       use those files.  This is used by some anti-malware vendors and by some
       hierarchical storage managent systems.

       If unsure, say N.

所以,我将两者都设置为 Y,make clean 并重新编译内核 - 但问题与之前一样。我是否忽略了什么?

最佳答案

好吧显然是使用大写“Y”而不是小写“y”的错误......

关于安卓 fanotify_init : Function not implemented,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43143020/

相关文章:

android - 使用 progressBar 的 HttpUrlConnection 多部分文件上传

android - 访问另一个应用程序的数据库

Linux:如何将整个数据包发送到另一台主机上的特定端口?

Android NDK 发布版本

android - 有没有办法为 ndk-build 的输出着色?

python - Buildozer 如何解决 "--ndk-api=21"错误

android - Android Gradle构建速度

Android Studio 不支持的 Gradle 插件版本

c++ - Qt QSerialport拔出设备未关闭

python - linux中如何控制后台进程