How to use SD card as internal storage or make external storage available to Syncthing / Termmux etc. somehow?

gegenstand

Member
Original poster
22 August 2021
8
I'm currently trying to install Syncthing on my new Shift 6mq, which has only 128gb which I thought I can extend with an SD card but I'm slowly realizing that things don't work as expected..

Apps usually don't have the permission to write to external storage in folders that can be written to by other apps, too. So usually on newer Android devices there is an option to turn the SD card into internal memory (i.e. adoptable storage).

It looks like ShiftOS does not support this option rendering the SD card useless if you planned to use it as a way to exchange data between apps.

Did I misunderstand anything? Is there a way to workaround this limitation? I tried to activate adoptable storage via adb like described here: https://jimcofer.com/2016/03/10/marshmallow-lg-and-adoptable-storage/ and I also tried to grant READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE and WRITE_MEDIA_STORAGE to Syncthing manually like explained here https://android.stackexchange.com/q...-to-external-storage-that-does-not-request-it - but without luck.

How do I make the extra memory available to apps in order to have shared R/W access. Am I limited to 128GB?
 
Adoptable storage is intentionally disabled for the Shift6mq because the complete system fails if only the SD card is defect.
 
A short question:
Did you try to allow Syncthing acces to the external SD through the Storage Access Framework?
That's how it works under Android 10.
IMG_20210826_193851_961.jpg

IMG_20210826_193603_070.jpg
Greetz
 
Zuletzt bearbeitet:
  • Like
Reaktionen: danielp
Adoptable storage is intentionally disabled for the Shift6mq because the complete system fails if only the SD card is defect.
Is there a way to somehow workaround this? I'm aware this can be an issue, but I'm doing backups regularly (e.g. via Syncthing) and I'd take the responsibility for that risk.
128GB is just not enough for every use case. OSM, Pictures and some Music are taking up about 200GB (without system) on my old smartphone I wished I could get rid of.
 
A short question:
Did you try to allow Syncthing acces to the external SD through the Storage Access Framework?
That's how it works under Android 10.
Anhang anzeigen 3472

Anhang anzeigen 3470
Greetz
Unfortunately, this is currently not possible in Syncthing as Syncthing Android is just a port written in Go and Read-Access to SD Cards has to be done via Android API that requires Java stuff since Android ... 8 I think.
There are lots of workarounds that work more or less, the "cleanest" (best working from a syncthing point of view) solution is to mount the SD Card as internal storage.
 
  • Like
Reaktionen: danielp
Okay, Guess i don't get the problem.
Do we talk about, to get an folder from external SD as folder for syncronising in Syncting or is it something special?
Because i can choose an folder from external SD without problems through the access framework.
Or do we talk from different behaviours / apps?
Video attached for clarification.
Greetz
 

Anhänge

  • 2_5280917463028993800.mp4
    9,8 MB
  • Like
Reaktionen: LudwigXIV
Sorry for being too general in my description. You will be able to create folders in the SD card as you did in your video but unfortunately, Syncthing cannot sync to that folder. The android client is only a wrapper of the Syncthing code, although you can grant file system access, remote files will not be written to that folder due to the underlying code. Unfortunately, this is only testable with a running Syncthing instance (works on windows, mac, raspi and almost any flavor of linux).

Edit: if you own 2 android phones, it should work also. Share one folder on the first phone from internal storage and add it on the shiftphone. Choose internal storage, sync should work. If you choose to store it on SD card, it will never sync your files from the source phone.