androidandroid-ndkfilesystemsfuse

Android userspace filesystem driver on non-rooted device?


Can I write a custom userspace file system that can be run on non-rooted factory devices through the standard available utilities?

I am aware of the existence of fuse-android, however as far as I have understood, it requires a rooted device. If that is not the case, please do correct me.

The goal I am trying to achieve is create a 'fake' FS that actually is mounted to a file.


Solution

  • I had the same need some time ago and came to the point where I had to admit that's not possible at all (mostly). It shouldn't be a problem to build libfuse for android, also the Java wrapper is no problem.

    The real problem is that most of the systems I have seen aren't build with fuse support buildin nor do they provide modules which may be loaded (which would require root, but anyway).

    You can easily find out if fuse is enabled by reading /proc/filesystems. It should list fuse, otherwise you will need root. But it's very likely that most android devices are build without fuse support.

    My other ideas were to use another filesystem to "fake" something like fuse. This may be possible with nfs or some other network filesystem where you can implement the server by yourself. This whould enable you to write a fake fuse but I don't think it's worth it.

    Edit: And even if many devices would have fuse support buildin chances are high they wouldn't let you mount it as a user, you would need root access as your app wouldn't have the privileges to mount fuse filesystems.