Read only Access issues

As it seems is well known, Syncthing has issues with some versions of Android which are granting read only access to folders on an SD card in a phone. This issue is not necessarily limited to Syncthing app. I have an Android 5 phone that a lot of apps are reporting the same type of issues with.

However some app designers claim they have been able to work around the issues on Android 4.4 or Android 5 and get write access to a folder which Syncthing apparently hasn’t been able to achieve so there appears to be an issue with programming in the app.

Many lower end Android phones now come with a stripped down version of the Android software called Go which reinstates the limitations on folder access per application and requires a specific coding to get access rights granted. I have a device running Android Go 8.1 and once again Syncthing’s app reports it can only get read access to regular folders on the SD card. But other third party apps (photo galleries for example) from the app store are popping up a little dialog that asks for the root folder on the SD card to be specified and then they have write access to any part of the card.

There have been comments about solutions that involve writing to folders on the SD Card starting with Android/data followed by the canonical name of the app and the biggest problem with these solutions is when you try to access the synced files with other apps and these apps are not able to see those folders.

In other words it seems the best solution for write access to a SD Card on some versions of android is to put in a feature request asking for the programmers to redesign the app according to the API model for access control.

There’s a truckload of mostly outdated information about what files can be accessed and what not around. Reason being: It changes with every android release and every google play policy change about required target APIs. And sometimes it also behaves differently between vendors. Maybe @Catfriend1 has a sort-of up-to-date wiki/docs/issue text somewhere that is a more-or-less summary of the current state? Otherwise I maybe will sit down to assemble that info at that point, if only to be able to point at that link instead of having to write such a long answer, still not giving a fully helpful answer to you in doing so.

In short the current (!) state:
I already forgot again how Android <=9 work. Android 10 allows access to the entire internal storage, and only the app specific directories on the extension SD card (Android/{data,media}/com.nutomic.syncthing-android). Android 11 allows access to all directories according to the MANAGE_EXTERNAL_STORAGE permissions in the scoped storage framework. Which means most of everything both in internal storage and extension SD card, but not e.g. internal directories of other apps (e.g. Android/data/com.someoneelse.anotherapp).

1 Like

OK cool thanks for replying

There are now quite a lot of devices out with Android Go, which I like since it can give me a very cheap media player since the small memory of these devices is not an issue for only having one or two apps installed.

Saying here a device running Android Go 8.1 is a current release from a manufacturer but I will try to find out if they have a more up to date product.

I think the other question is whether sync by MTP is possible, although my Android Go phone does not give access to any folders from MTP but my Android 5 phone does.

@imsodin I’ve got an update to the corresponding syncthing-android wiki article at SD card write access · Catfriend1/syncthing-android Wiki · GitHub . I did not update it to Android 11, still waiting for various 11 users to report back how “good it runs on 11” in regards to restrictions. While official still being on API 29, the file watch problem is also present on API 30 (as well as local discovery problems). I guess until I gathered full knowledge about this, Android 12 will be out.

1 Like

To be more precise: Android 11 does not only break local discovery but any kind of address introspection. Syncthing is basically unable to retrieve its own network interface IPs.

So incoming connections on Android 11 are only possible via external IPs discovered by STUN or manually entered ones.

1 Like

Lineageos just offered me Android 11. Given I use root and that hopefully allows to circumvent those annoyances, I’ll probably take the plunge and upgrade when I have some spare time. Then I’ll start looking into figuring stuff out. Worst case I’ll have to revive the a-sync/syncthing-light/whatever code to do the discovery in the wrapper - I think that was implemented and working.

1 Like

IMHO pushing these kind of things into the wrapper is a better longterm strategy as Google is pushing more and more towards framework usage.

1 Like

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