-1

ウイルス対策を作成したいのですが、たとえば、アプリケーションがSDカードにファイルを作成したことを検出します。しかし、FS のログ アクセスを検出する方法や、他のアプリケーションでファイルを作成する方法が見つかりません。

ご協力ありがとうございました。

4

1 に答える 1

3

Use FileObserver. Here is a description.

However, be warned that the FileObserver API does not allow you to block the file operations. You will only be able to react to them after the fact. By that time the application that has written the file may be already gone.

If your intention is to create a robust general antivirus (or to learn how one could be created), you will need to go a harder way. Learn about avflt and redirfs kernel modules, learn to root your device and to load these modules.

If you succeed, you will be able to use the libav library, reliably detect the calling process (av_event.pid) and be able to delay or reliably deny requests that you don't like.

You will still not be in a good position to market your antivirus generally because of various issues with rooting, but it is about the only sound approach for the general task technically.

于 2012-06-03T20:40:23.253 に答える