DroidFS icon indicating copy to clipboard operation
DroidFS copied to clipboard

Allow read-write access when opening files with external apps

Open badrow opened this issue 4 years ago • 2 comments
trafficstars

Hi, the app currently doesn't allow to edit files. Even if we open it with an external app, when we want to save it, we got an error. Am I doing something wrong ? Or is it just not compatble ?

Thank you for your work, great to see gocryptfs support on android !

badrow avatar Oct 19 '21 10:10 badrow

For my part, I can edit text files perfectly with the DroidFS built-in editor (note that the volume needs to be on a writable location, you can't edit files inside volumes located on external SD cards). DroidFS only grants read-only access to external apps. This is why you can't edit encrypted files with other apps. Can you give more information on the issue? (DroidFS & Android version, volume path, error messages if any, logcat...)

hardcore-sushi avatar Oct 19 '21 10:10 hardcore-sushi

For my part, I can edit text files perfectly with the DroidFS built-in editor (note that the volume needs to be on a writable location, you can't edit files inside volumes located on external SD cards). DroidFS only grants read-only access to external apps. This is why you can't edit encrypted files with other apps. Can you give more information on the issue? (DroidFS & Android version, volume path, error messages if any, logcat...)

Okay sorry. So it's a correct behaviour of the app. I can edit a txt file in the droidfs app but not from another app. Is it possible to add an option to allow write access to external app ?

Thank you !

badrow avatar Oct 27 '21 13:10 badrow

HI what about adding this feature, it seems crucial for me to able to use it "as on desktop" ?

ps That's why I still use Cryptomator but this encrypting technologi seems to be much better, I mean speed on PC is much higher. So Im rely interesting in that feature

adam144dev avatar May 09 '23 17:05 adam144dev

This has been added with v2.1.0.

hardcore-sushi avatar Sep 15 '23 18:09 hardcore-sushi

I've enabled 2 unsafe options "Allow opening files with other applications" and "Grant write access", but editing and saving files in a gocryptfs vault using an external app still has no effect. I'm using Markor for editing a .md file. I'm not sure if it is Markor's fault or DroidFS's.

thangtranxuan-vti avatar Sep 25 '23 03:09 thangtranxuan-vti

According the Markor source code, it seems that the file is copied into the app's internal storage if a path can't be retrieved from the intent: GsContextUtils.java:1673.

I can confirm that Markor copies files opened from DroidFS in /data/data/net.gsantner.markor/cache/CONTENT_RESOLVER_FILE_PROXY_SEGMENT/. DroidFS cannot provide a path to markor since the file could only be stored in memory (on-disk file is encrypted). Maybe a patch could be submitted to Markor.

hardcore-sushi avatar Sep 28 '23 18:09 hardcore-sushi