Can't create directory on Android 12?

Hi everyone, trying to get Logseq to work with syncthing. But syncthing can’t create a directory in internal storage or on an SD card. Its just a directory - it shouldn’t be that difficult. But I’ve been working at it for 2 days now with no success. I don’t care where on Android I have to store my shared syncthing directories so long as I can point Logseq to them as the required data source. Specifically the error I’m getting is ‘Failed to create folder root directory: mkdir /internalstorage: read-only file system’. Any help would be greatly appreciated. BTW I’m on Android 12 on a Samsung Note 10. Upgrading soon to a Zfold6 so hopefully can do the same thing on that phone even though it will be running Android 14 as far as I know.

“/internalstorage” is a path I never encountered in Android - how did you get to that? Usually the root portions of the writable data mounts in android look like “/storage/emulated/0/”. I’d expect to either use a dir picker in the app to get a reasonable dir or if that’s not possible use a file manager to find one and copy the path over.

Yes thanks for pointing that out. I do get the storage/emulated/0 as a default from syncthing on Android, but Logseq can’t access that as a writable folder. Basically a permissions issue. FWIW I get the same problem on Win 10 when I try to add a folder anywhere other than where Syncthing suggests as default. I see people do this succeasfully online youtube vids etc but it doesn’t seem to work for me. Also the internal storage path was just a shot in the dark to try to find a location that I could actually write too. I thought that since /sdcard/ brings up subdirectories that /Internalstorage/ might do the same. No luck I guess. Too new to Android to make sense of this. Still Win 10 is giving me same problems.

Just a wild guess, but you’ve probably installed Syncthing on Windows 10 as a service, which may have restricted access to user-specific locations. If this is the case, then please check point 1 in Is there an ideal or recommended place to put the syncthing folder? - #2 by tomasz86 for more information.

At work now so cant check it out but you may be right. The Folder that installs itself on Win 10 has something about a service in its name (like syncthingservice). I appreciate it - will follow that lead. As for yhe Android problem, still have no idea. But it seems to be the same thing, ie problem with folder location.

I am not saying to drop it at the root there, but somehow below it. Unless you have some non-standard android, there’s usually no other readable directories. However usually a bunch of the directories below that are readable if the app can use android APIs. That’s a question for logseq though - figure out in the app where it can store it’s files, and then point syncthing there.

Sorry I think I may be describing this poorly. I can set up a directory on android for my logseq app to access, no problem. But thats not the issue. The folder with the desired data lives on my desktop (the folder to be shared) so I simply need to create a folder to house the shared folder from my desktop. This is what I cannot do because I cannot access the storage folder syncthing creates by default to house the shared folder, ie the /storage/emulated/0 with Logsec. Logsec cant see this directory because I myself cant navigate to it in Logsec as it isnt anywhere recognizable. Does anyone know where this /storage/emulated/0 is? If so, I havent been able to find out where.

So I did the obvious thing and tried to choose a different place to store the shared folder. But in this case I can’t actually create or choose a directory anywhere with syncthing because of a permissions error. I cannot mkdir it seems.

This is the Access permission issue. Of course I might be missing or misunderstandings somthing. But Im havi g the same prib in Win 10. Some threads have talked about needing to change a config file or something like that but I’ve been gotten to that stage yet.

Indeed I don’t understand. Syncthing doesn’t choose any dir on android for you, you tell syncthing at which path/dir to create the folder. You need to chose a directory where syncthing has access - which due to the all folder permission should be most directories below /storage/emulated/0 (just not e.g. ./Android/data/).

The path is basically your entire internal storage. I’m guessing that it may be possible that Logseq is either limited to its own internal folder or it doesn’t show the actual full path. In either way, I would suggest installing a proper file explorer app (e.g. https://github.com/zhanghai/MaterialFiles) and using it to navigate and find the actual path where your Logseq files are located.

Please also post screenshots of what you’re seeing on the screen. They should help understand the problem better.

/storage/emulated/0 is your ~ where Documents, DCIM, Downloads … lie. Just create a LogSeq dir either in /storage/emulated/0 or …0/Documents or anywhere below …/0 and use it with ST. This should work. (/ is the root, ~ is your home). If you use ~ syntax make sure it is followed with a slash: ~/LogSeq (= /storage/emulated/0/LogSeq)

You can use either the native GUI or the webGUI: the helper to select or create the dir are a bit different. In the webGUI, typing the name of the share proposes to create a dir with same name, either in 0 or in the path you previously set in “Settings/Edit Folder Defaults”

Thanks everyone for your efforts. Solved now. Basically just not familiar enough with Android and not able to locate the shared folder in an obvious place, ie was digging down too far. Doh~! Oh well, I got an introduction to Android file systems!