Android 11 and syncthing, what can be synchronised?

If I install syncthing on my Android 11 phone what can be synchronised?

Specifically can I synchronise files on the built in storage?

2 Likes

Specifically can I synchronise files on the built in storage?

Yes, but it will require all files access to be granted on API 30+.

1 Like

So what does that mean? I’m Unix/Linux familiar but Android is a new world for me.

Is “API 30+” something one can grant when the syncthing app is installed or is there more involved?

Can I, for example, synchronise the contacts database on the Android device with a file/directory on my Linux laptop? (I realise there may be file compatibility issues but they come later).

1 Like

From a users perspective, the Android API level is just the Android version currently installed on the device. API 30 is Android 11. SDK Platform release notes  |  Android Developers

I believe Catfriend1 meant that if your device is Android 11+, things are different compared to older versions (either better or worse).

2 Likes

OK, but I’m still in the dark! :slight_smile:

What files/directories can I synchronise? Are they only those I can see in the Android system’s file manager app?

1 Like

You cannot sync /Android/data/… folders, better also stay away from the /Android/ folder tree. And you cannot sync things that are constantly opened and written to by other apps, e.g. WhatsApp databases. Under Android 11, file access is slow because of an OS issue. I’d suggest to select only to sync directories you really need to keep the file count low. Use ignore patterns to exclude the rest.

2 Likes

Additionally, if you want to backup your WhatsApp media AND your internal storage, use two different tasks.

  • One task dedicated to WhatsApp pointing to /Android/media/com.whatsapp
  • One task for the whole storage that excludes /Android

This is required because the app is unable to ignore other /Android subdirectories that cause the scanner to get stuck.

1 Like

Syncthing on Android 11 is better in some ways and worse in others.

With the official app from the Play Store on a OnePlus 8 Pro and Asus Zenfone 6 running Android 11:

  • Individual, normal folders (/Music, /DCIM, etc) work fine, like before.

  • You can still sync the root of your storage, but apps can’t access /Android/data. I had to add /Android to the list of “ignore patterns”.

  • SD cards work now (no root needed). It’s as if as all storages are internal.

  • Overall speed (write / read) is lower than on Android 10. This is caused by the scooped storage change (apps are no longer able to directly access the storage).

  • The performance drop is not noticeable if you don’t have many files or if you just leave Syncthing working in the background doing its thing.

  • I’ve noticed that “receive only” folders sometimes find “changes” and get out of sync. No idea why as files don’t change, but there’s no harm done, just an “out of sync” message in Syncthing sometimes.

  • The only additional step that you may have to do on Android 11 is to allow Syncthing to access all files (due to the new storage permissions):

tl;dr: works fine for me.

8 Likes

Fantastic! I love your guidelines here. Will definitely try.