2017-03-31 6 views
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는 커널 버전에서 사용할 수 있습니다 (5 + 안드로이드에서 제공됩니다)> 2.6.37.

필자는 x86 에뮬레이터 (Android 7) 및 CM13 (모두 뿌리 박힌)이 장착 된 Samsung I9300 armeabi-v7a (Android 6)에서 시험해 보았습니다. 는 x86 에뮬레이터의 커널 버전 : 3.4.67+와 삼성 장치의 : 나는 Y에 모두를 설정, 그래서

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. 

: 다음 3.0.101-CM-g9c98896

나는 /goldfish/fs/notify/fanotify/Kconfig에서 86 에뮬레이터 금붕어 커널 파일에보고했다 , make clean 그리고 커널을 재 컴파일해라. - 이전과 같은 문제. 내가 뭔가를 간과 했는가?

답변

0

Ok는 소문자 "y"대신 대문자 "Y"를 사용하는 것으로 나타났습니다.