Cannot install. Keeps restarting


1st issue How to install on Android when there was it was previously installed? It won’t open the GUI with this error in logs:

--------- beginning of main 09-20 18:08:56.305 I/SyncthingNativeCode( 6305): WARNING: Failed to generate config and keys: mkdir /data/user/0/com.nutomic.syncthingandroid: file exists

I have tried to find folder /data/user/0/com.nutomic.syncthingandroid with no success. I don’t see it with my file manager. So I need to use adb or something to access it and remove the file?

2nd issue (original)

I was using Syncthing at Android for long. But this week (after update) I’ve noticed that it stopped to sync some folders. I have several folders with one parent and an another in another parent folder. So only the later folder could sync but other folders (with one parent) couldn’t. Logs show that Syncthing restarted and I couldn’t find the reason of it in logs. So I removed it and installed again (from F-Droid). Now I have the first problem.

Hoe to fix? Thanks in advance.

Have you tried clearing the app data through Android settings?

Tried. It fails to start with the same error still. Thanks

Tried to use adb to access the directory. But it fails with no permission:

❯ sudo adb shell ls ‘/data/user/0/com.nutomic.syncthingandroid’ ls: /data/user/0/com.nutomic.syncthingandroid: Permission denied

You’d need root access to modify that path.

Yeah. Surprisingly, Syncthing must have the root access then.

The app doesn’t need root access to access its own data path though. Something seems to be broken, e.g. the error message says “file exists”, but the listed path shouldn’t be a “file” but a “directory”. The whole path should also be cleaned out completely when you uninstall and reinstall the app anyway. For me, it looks like the filesystem may simply have been corrupted, e.g. due to unsafe shutdown or similar.

With root access, you could try to simply go and delete the whole path, then start the app again.