On Android you can isolate Apps and Files from another. The easy method is a work profile, normally a (really good) feature for companies to control your sh*t but only in that profile, and you can disable it entirely.

User Profiles are even more compartimentalized though, GrapheneOS embraces it fully, as it allows to encrypt data seperately, put data to rest while the device is on, and running apps with less privileges, possibly even testing viruses there.


So how do I get my files synchronized across these profiles?

With Syncthing this is possible:

  1. Set up your work profile using Shelter / your user profile through the settings
  2. Create a folder in both profiles that you want synchronized, here SHARED
  3. Install Syncthing in both profiles. For the work profile you could use “Shelter” to clone the app. I recommend to use Obtainium and add its repo URL

Tip: when setting up Syncthing, it doesn’t need the very insecure “access all files” permission. If you are on GrapheneOS you can restrict it to just the folders you want to Sync.

screenshot of storage scropes page

Isolated profile

  • Open Syncthing
  • it will go through the setup dialog, you can use storage scopes if you are on GrapheneOS, but on other Android it needs access to all your files.
  • If you have Energy saver on (which you should) then it may show you “Syncthing is not running”, under “Change Settings” disable run conditions (the sync is local)
  • remove the default Camera folder.
  • go to Settings
  • Disable run conditions (this is problematic if you use Syncthing also for internet Sync, but makes sure it always runs)
  • Behavior
  • Start Service directly on boot"
  • Syncthing Options: uncheck all boxes
  • Set the Device name to “isolated” for example
  • on Main screen, bottom left “show device ID” and copy it.

Main profile

  • repeat everything here too.
  • instead of copying the device ID, go to the tab “Devices”
  • name it “isolated” for example
  • at the Link symbol, instead of “dynamic”, enter tcp://127.0.0.1:22000 (this will connect over your local network)
  • add profile

Screenshot of final profile setting

You should get a notification of a device that wants to connect. Accept it and repeat the process:

  • name it “owner” for example
  • set its Link to tcp://127.0.0.1:22000

Now you have both profiles connected!

Add a Folder

  • add a Folder through the Filepicker Dialog
  • anable Syncing with the other profile
  • you will get a notification, add the folder in the other profile too, and set its Sync location.

All files placed in one folder will now appear in the other one shortly! This requires no network access, and works very well.

Note that if you also use Syncthing for regular Synchronisation between devices, you will want run conditions on the main profile.

    • Pantherina@feddit.deOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      9 months ago

      Yeah its not even that complicated, found it out yesterday when I set up a GOS phone for some people.

      On the work profile you could do it over the share dialog, but that is also suboptimal

        • ladfrombrad 🇬🇧@lemdro.idM
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 months ago

          I think you meant to reply to my top level comment and Lemmy can be a little iffy, at the best of times?

          But I don’t agree that Syncthing is "way easier than using CIFS/SMB. I actually find once you understand how the syncing process is happening and when makes things much more apparent.

          Also yay no more worrying about it being off site and fulfilling the 3-2-1 mantra.

          I now have a 6+5+4+3+2+1 thanks to two routers with OpenWRT on them off site 🥳

          • Pantherina@feddit.deOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 months ago

            Uhm, no idea what that means :D

            Syncthing-fork is for sure more complex to use but better. Perfect definition of a Fork really.

  • ladfrombrad 🇬🇧@lemdro.idM
    link
    fedilink
    English
    arrow-up
    2
    ·
    9 months ago

    Gotta be honest I’ve used Syncthing for a while and the forked app too, but yet again gone back to SMB2Sync

    I don’t know if it’s the nerdiness or granular nature of it, but I prefer it and I don’t have to worry about the client/device being up to date like you do with Syncthing?