我试图在Android上使用扇形,并且喜欢用一个可执行文件(用ndk编译)将其存档。我正在使用fsmon (小型应用程序,它调用fanotify系统调用)来启动监视器。但是,在执行文件(在根设备上作为根)时,我会得到以下错误:
generic_x86:/data/local/tmp # ./fsmon -B fanotify /storage/emulated/0/
fanotify_init: Function not implemented在内核版本> 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并重新编译内核--但是问题和以前一样。我忽略了什么吗?
发布于 2017-04-01 10:23:35
好的,显然用大写"Y“代替小写"y”是错误的.
https://stackoverflow.com/questions/43143020
复制相似问题