syncthing-android icon indicating copy to clipboard operation
syncthing-android copied to clipboard

Feature request: Android FileProvider

Open jeffre opened this issue 5 years ago • 7 comments

Being that private/sensitive data may be shared using syncthing-android, I find it wise to set the my destination paths to a location where other apps cannot read (eg: /data/data/com.nutomic.syncthingandroid/files/MYSYNCTHINGDATA)

However, in order for such data to be made available selectively to other apps, I believe, Syncthing-Android needs to have declared itself as a FileProvider (https://developer.android.com/reference/android/support/v4/content/FileProvider). I suspect this would also entail the need for a primative file explorer too. Is this idea within the scope of this project or something the developers would have an interest in?

Thank you for your time!

jeffre avatar Nov 07 '18 06:11 jeffre

I don't think syncing to the /data partition is a good idea as it can cause big trouble if that Partition gets full by accident or if the user is thinking the amount of free space from internal storage would be available for sync and - especially on older phones - for example only 4 GByte are because of the size of /data. The idea is good in general and yes , Fileprovider also ist good because of the rooted path exposure limitations in recent Android versions.

Catfriend1 avatar Nov 07 '18 20:11 Catfriend1

Great points. Thanks for your input. I suppose I can work around the security concerns by encrypting my sensitive files manually.

Fileprovider also ist good

I'm curious, if you mean to say "is" or "isn't"?

jeffre avatar Nov 07 '18 21:11 jeffre

It is in my eyes ;) sorry for the German keyboard.

Catfriend1 avatar Nov 07 '18 21:11 Catfriend1

I think Syncthing Lite would work better for this use case.

Nutomic avatar Nov 08 '18 11:11 Nutomic

how much data does syncthing lite store at maximum in the /data/data... Folder? When are cached files cleaned to recover space?

Catfriend1 avatar Nov 08 '18 14:11 Catfriend1

"Syncthing Lite" is not a good fit as it puts your files into a world readable path (eg /storage/emualted/0/Android/data/net.syncthing.lite/cache/[\d+]/filename). Aside from that, it also does not keep a full copy of users' data.

To clarify, the implied goal of this feature request is allow users who willfully choose to keep their sync folders under the purview of syncthing (by setting the destination to /data/data/com.nutomic.syncthingandroid/files/DIRECTORYNAME) a way to open said files in another app. Android supports such a design in the form of FileProviders.

jeffre avatar Nov 09 '18 00:11 jeffre

Just stopping by to say I am also looking for this. Basically files on "external storage" (I haven't had a phone that supported an SD card in years, sadly) are available to so many other apps, even in Android 11. Having something more secure is really a must for me.

jgoerzen avatar May 21 '21 03:05 jgoerzen