syncthing / syncthing-android

Wrapper of syncthing for Android.
https://syncthing.net/
Mozilla Public License 2.0
3.16k stars 362 forks source link

Support for Android SAF #2047

Closed WhiredPlanck closed 5 months ago

WhiredPlanck commented 5 months ago

Due to the mechanism of the native Syncthing library, it can only CRUD on a native filesystem. SAF is a sandbox on the native filesystem, when we use it to access the files or directories, it only provide a URI, which is difficult for Syncthing to utilize. These are the things I have learned.

So we may need to consider to convert a URI to File, but I know it's hacky, especially on Android 10 and above. But recently I've learned that a URI can be natively converted to a file descriptor. Does it show a possibility that Syncthing can do something with it?

I've learned that the commercial app FolderSync is able to access the DocumentProvider (if a app has) now.

Similar but closed issue: #2016

WhiredPlanck commented 5 months ago

P.S. Just read https://github.com/syncthing/syncthing-android#no-feature-request-taken-feature-contributions-case-by-case , but the links putted in the issue template doesn't direct me there.

imsodin commented 5 months ago

If you search past issues and/or the forum you'll find a plethora of info on this. Short version: This app wraps syncthing, which is a go library, so you'd have to implement SAF there -> if even possible a ton of work and not going to just happen, and likely not worthwhile. If you want that, you should probably build a protocol compatible app that suits the use-case of mobiles and limitations of SAF (which was worked on for a while by some, but not anymore: https://github.com/syncthing/syncthing-java).

Just read https://github.com/syncthing/syncthing-android#no-feature-request-taken-feature-contributions-case-by-case , but the links putted in the issue template doesn't direct me there.

~Thanks, good pointer.~ Actually no, it's there:

Do not file a feature request unless you want to implement it yourself. This is due to the maintenance status of this project, see the readme for context.

https://github.com/syncthing/syncthing-android/blob/main/ISSUE_TEMPLATE.md

WhiredPlanck commented 5 months ago

Actually no, it's there:

Do not file a feature request unless you want to implement it yourself. This is due to the maintenance status of this project, see the readme for context.

https://github.com/syncthing/syncthing-android/blob/main/ISSUE_TEMPLATE.md

Wired, it directed me to search "README.md" in the issues, not the corresponding section in README.md.

imsodin commented 5 months ago

Wired, it directed me to search "README.md" in the issues, not the corresponding section in README.md.

Thanks again for insisting - indeed the relative link is the issue. From the issue template that does something weird which indeed shows the issue search. I'll fix that by using a full url.