hardcore-sushi / DroidFS

Encrypted overlay filesystems implementation for Android. Also available on gitea: https://forge.chapril.org/hardcoresushi/DroidFS
GNU Affero General Public License v3.0
652 stars 43 forks source link

[Feature Request] Open volume in a file manager #323

Open kulitnov852 opened 1 week ago

kulitnov852 commented 1 week ago

As the DroidFS app doesn't have all the features of a file manager, I myself mostly use Material Files with the expose volume feature, and I think it would be great to be able to mount encrypted volumes from there.

I'm not a developer, but I think there should be a way to do this via (a file with) a custom file extension that points to the volume's gocryptfs.conf file, which each time it's called or opened asks for the password corresponding to the volume.

For this to work properly, I noticed 3 or 4 unsafe features must be enabled.

This might be better than adding a ton of features typical of a file manager.

hardcore-sushi commented 6 days ago

Allowing a volume to be opened from another app would require this app to develop a DroidFS-specific integration. It cannot be achieved by DroidFS alone.

But keep in mind that the current Android APIs limit the efficiency of encrypted file sharing between apps. It should always be faster to access files from the DroidFS built-in explorer.

kulitnov852 commented 5 days ago

I know very little about code, but what I mean is that you've misunderstood a little. I'll try to be a little more precise in my own way (I dare):

The average user can open an encrypted volume from his file manager thanks to an unencrypted .drdfs file located in the volume in question (a unique .drdfs file). This is not due to integration, but simply because the user tells the file manager to always open .drdfs files with the DroidFs app. Each time a .drdfs file is requested to be opened, a DroidFs pop-up asks the user to enter the corresponding password, and if this is correct the volume is opened discreetly in the background (if certain Unsafe features are enabled).

  1. As the .drdfs file is a text file, it must contain the path of the encrypted volume. (And perhaps with the contents of the x.config file)
  2. Parameters such as read-only and timer are also displayed next to the password prompt.
  3. The Exposed open volume will be available in the same way as SAF Android, only the user doesn't go directly to the DroidFs app to open his volumes, he does it from his file manager. (Of course, after setting Unsafe Features).
hardcore-sushi commented 5 days ago

Oh OK, yes I misunderstood. Indeed this could be doable, but on my side I need to manually re-add the exposed volume to Material Files every times it is closed, otherwise it is just displayed as an empty directory. I guess the Android system revokes permissions. If you're also in this case, implementing this feature won't allow to avoid that.