0
我想在Android上使用fanotify,並想用可執行文件(用ndk編譯)將其歸檔。我正在使用fsmon(調用fanotify systemcall的小應用程序)啓動顯示器。但在執行(一個植根設備作爲根上)的文件我收到以下錯誤:Android fanotify_init:功能未執行
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(均爲root)。 內核版本的x86模擬器的:3.4.67+
三星設備和:3.0.101-CM-g9c98896
然後我看看到x86的模擬器金魚內核文件中/goldfish/fs/notify/fanotify/Kconfig
:
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
並重新編譯內核 - 但像以前一樣的問題..我忽略了什麼?