Hi,

I am trying to get syncthing work with Graphene OS on Pixel 4a. Specifically, this involves creating folders on Pixel from the paired computer. The android log complains about avc: denied..., tcontext=u:r:untrusted_app_30:s0...., Parcel Expecting binder but got null!
The syncthing log reports INFO: Unexpected folder "Songs" (jkl9-rgge) sent from device "LKJHLKJH..."; ensure that the folder exists and that this device is selected under "Share With" in the folder configuration.

I was expecting these folders to be created on the phone by syncthing but they were not. I manually created them under "Internal" using the file manager that came with Graphene OS with no avail. They are recognized as new shared folders on the paired device and not synced with the original shared folders existing there.

I never encountered this problem before on other OSes and I assume that this is due to the security features of Graphene OS. However, I know I am probably wrong. Any pointers will be greatly appreciated.

Android version: 13
Syncthing app up-to-date and with default settings.

    hakayova long-time Syncthing user here. I didn't have to do anything unique under GrapheneOS to get all of my shares working.

    Ensure you have granted Syncthing the necessary storage permissions; either allow all, or use storage scopes to specify a folder that will hold your shares, such as a root folder called Sync (the full path will actually be /storage/emulated/0/Sync in the Android system).

    When adding a share from another remote host, Syncthing should prompt you to specify where you want to store the new share on your phone. You would enter a path such as, /storage/emulated/0/Sync/Music for your music share. You shouldn't need to change any of the other share settings unless you have a reason to. If I recall correctly, Syncthing will automatically create any sub-folders as needed without further intervention; just ensure the Folder Path is correct before saving the new share.

    Thank you @mythodical. I am a medium-time Syncthing user myself, that is why this situation made me think that there was something wrong with the GOS. I am using the android app called Syncthing-fork, which is what I have been using on my Samsung phone successfully for the last 5 years or so.
    After receiving your message, I tried several things including storage scopes with a defined root folder as you described, allowing all file access, removing the devices from both ends, re-adding devices, shares, uninstalling and re-installing Syncthing-fork with no avail. I get the same result as seen below (link to a screenshot stored at snipboard.io:
    Syncthing-fork failure
    Nothing would start the sharing and it would stay at 0% forever...

    Oh, I must add that Syncthing does not prompt me at all to specify the storage location on my phone, but this is only applicable to my Pixel 4a with Graphene OS. It works as expected on the Samsung phone.

    I finally figured the problem. Phone shows a notification - that is silent for whatever reason - requesting creation of the mentioned folders. That was what I was missing. More precisely, I was tapping those notifications without expanding them before, but when expanded, they have "Allow" and "Deny" buttons at the bottom. The rest worked as expected. Thank you for your help @mythodical . I am sorry to take all of your time but appreciate the amazing OS which is awesome! The eye candy and usability stuff may need some improvement, sure, but it is SO good to know the security and privacy infrastructure is sound!

      hakayova no problem! I was just typing a response when I saw your notification come through. I've never used Syncthing-fork before, and I was going to suggest trying the official release to see if you ran into the same issues. Glad you got it sorted!

      hakayova Haha. I've been burned something similar in the past, Sneaky notifications. Glad you got working.

      a year later

      I was also having some trouble setting up Syncthing on my devices, but got it to work. Leaving what I did here in case it's helpful for others.


      Configuration

      • Pixel 8, GOS (build #: 2024040900) using official Syncthing app from Github, v.1.27.6
      • EndeavourOS, syncthing from AUR, v.1.27.6
      • Initializing sync of a folder saved on Linux to GOS

      Instructions

      1. [Linux] Activate Syncthing GUI client with command syncthing
      2. [Linux] Add the folder you want to sync to GOS on the Folders menu
      3. [Linux] Click Actions > Show ID to display the QR code of the Linux-side device
      4. [GOS] Click Devices > +, then click the QC code icon at the right of Device ID, then add the remote device
      5. [Linux] Accept the new connection request from GOS. There should now be a new entry under the Remote Devices menu that should have the status Disconnected.
      6. [Linux] Click on the new Remote Device entry, click pause, and click resume
      7. [GOS] Check your notifications for a silent notification that asks if you want to accept the new connection request, then press accept. Designate the folder location on your GOS device you want to start syncing to.

      This was how I got the connection set up, and hopefully this comes in handy for others who may run into the same connectivity issue.

      4 months later

      Hi, i'm manage to sync devices usign grapheneos, however syncthing asks for permissions on storage that I personally don't want to allow, I tried using storage scopes however when I try to create a folder inside storage scopes there is an error that appers that it does not allow to create the folder.

      As anyone had this issue before and know how to resolve it?

        Yoshimitsu10 where are you trying to create the folder and is that the exact error message?

        Basically when syncthing igves me the message to create the folder i'm doing it inside the storage scope of syncthing previously created, the exact error is;

        Error (readdirent /storage/emulated/11/Storage Scoupes/Test: operation not permitted)

          and also

          Failed to create folder marker: (readdirent /storage/emulated/11/Storage Scoupes/Test: operation not permitted)

          Yoshimitsu10 What happens if you try to create the folder using the Files app? First create the folder then go to Settings > Apps > All apps > Syncthing > Storage scopes > Add folder then add the desired folder.

          It's ok, I figured it out, it just I didn't paid attention to storage scoupes permission of the actual app, I was giving permission inside the app to a folder that was not inside the folder I gave permission in storage scoupes of syncthing hehe