【问题标题】:Android fanotify_init: Function not implementedAndroid fanotify_init:功能未实现
【发布时间】:2017-03-31 14:20:37
【问题描述】:

我正在尝试在 Android 上使用 fanotify,并希望将其存档为可执行文件(使用 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) 和三星 I9300 armeabi-v7a (Android 6) 上使用 CM13(均已植根)进行了尝试。 x86 模拟器的内核版本:3.4.67+ 和三星设备的内核版本:3.0.101-CM-g9c98896

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

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 并重新编译内核 - 但和以前一样的问题.. 我忽略了什么吗?

【问题讨论】:

    标签: android linux android-ndk fanotify


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2016-06-25
      • 2021-12-12
      • 2021-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-28
      相关资源
      最近更新 更多