When can other apps see Syncthing data on Android?

Hi,

Syncthing on Android seems to use the “storage” system (not app-private data). I have some sensitive information I would like to sync with Syncthing, but not grant other apps with Storage permission access to it.

After quite a lot of searching, I am not at all clear what other apps have access to it.

I have a Pixel 4a with Android 11. I gather that on Android versions before 10 or 11, the answer is pretty much “all other apps with storage access”. I’m unsure if this has changed with Android 10 & 11. Perhaps apps built with legacy permissions still do? How can I tell? Would Syncthing ever support using app-private storage like the Nextcloud app does?

Thanks!

Hi,

I haven’t tried but a possible way for Syncthing to write to its app private directory /data/data/(packageId)/files/synced_folder1 could be setting up this path manually through the web UI. Then - if rooted - only root tools and the app itself can access the data there.

packageId:

  • com.nutomic.syncthingandroid
  • com.github.catfriend1.syncthingandroid

I think the problem will be that if I set if up with only the web UI, it will be impossible to access the files in that directory with any other app. Eg, in Nextcloud, which puts its files in the private directory, it has a built-in file browser that will let you share files. It also supports the file picker diving into the Nextcloud area (which requires explicit user action). Since Syncthing supports neither of these, I would be syncing the files to the phone with absolutely no way to ever use them, I believe.

Syncthing Fork already some technical required stuff in place like FileProvider to maybe expose those documents to other apps “correctly” but we don’t have a file browser. One could try if opening a synced document from app private folder works when clicking on the recent changes entry. If it works like this, we need a contribution of a file manager UI.

Isn’t that solved by implementing a DocumentsProvider?

AnyDesk seems to implement this which adds an entry to the “other storages” tab of my filemanager.

I tried this, but while I can create a folder under /storage/emulated/0/Android/media/com.github.catfriend1.syncthingandroid and use it for a folder, still whatever is there is visible to many other apps with storage access. I can select it using various pickers that can access /storage/emulated/0 and files do show up in Recent Changes from within the app, so it’s not achieving the segmentation I’m looking for.

Syncthing doesn’t do anything special to hide the files it syncs from other apps.

If a feature like this were to exist, it would exist at the operating system level, so I feel a forum where you have android experts would be a better place to ask the question.

1 Like

/storage/emulated/0/Android/media/com.github.catfriend1.syncthingandroid

Could you please try the private folder as well?

/data/data/com.github.catfriend1.syncthingandroid/files/your_folder

Hi,

I tried, but neither picker permits navigating to that path, and it doesn’t support arbitrary entry either.

Forgot about the Web GUI. I was able to add a folder there, and sync to it. The synced item showed up in Recent Changes, but tapping on it gave “Media not found” and it didn’t open.

I think this is the right direction, and is used (AFAIK) by the Nextcloud app, which helps with data isolation.

1 Like

Yes if we could get this right we would even be more google play policy compliant :). thanks, exactly what I wanted to know.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.