监视文件或目录中的更改?

时间:2021-12-21 17:00:01

In Android, how do I monitor changes made by others (app, internet, bluetooth, dll) to a file or directory

在Android中,我如何监视其他人(应用程序、互联网、蓝牙、dll)对文件或目录的更改

2 个解决方案

#1


28  

I think FileObserver is what you are looking for

我想FileObserver就是你要找的

#2


1  

No, in standard android, you don't monitor for activities of others, app, internet etc.

不,在标准的安卓系统中,你不会监控其他人的活动,应用程序,互联网等等。

Your program can only track and access your data directory. Others uses its own directories.

您的程序只能跟踪和访问您的数据目录。其他公司则使用自己的目录。

But, if you have rooted a telephone, you can write/start a root process or suid process. But this solution is only valid for rooted telephones..

但是,如果您已经对电话进行了根目录,您可以编写/启动根目录进程或suid进程。但是这个解决方案只对有根的电话有效。

#1


28  

I think FileObserver is what you are looking for

我想FileObserver就是你要找的

#2


1  

No, in standard android, you don't monitor for activities of others, app, internet etc.

不,在标准的安卓系统中,你不会监控其他人的活动,应用程序,互联网等等。

Your program can only track and access your data directory. Others uses its own directories.

您的程序只能跟踪和访问您的数据目录。其他公司则使用自己的目录。

But, if you have rooted a telephone, you can write/start a root process or suid process. But this solution is only valid for rooted telephones..

但是,如果您已经对电话进行了根目录,您可以编写/启动根目录进程或suid进程。但是这个解决方案只对有根的电话有效。