Strange modification of new files

I’ve just got a new phone and am setting up some pre-existing sync folders to be shared with it. These folders were the ones I used on my previous phone and my laptop without any odd behaviour.

When I add my new phone to the share list, it downloads all the files without fault onto the new phone, but then something weird happens - a (seemingly) random selection of those files get ‘modified’ by the new phone and the modifications are synced back to the originating computer. I can’t detect any modifications at all, the files look the same, have the same permissions and seem to have the same timestamps (I can’t check but the timestamps are all well in the past, not updated to today or anything like that).

Can anyone explain this odd behaviour? Nothing seems to be wrong with any of the files, but it’s a bit disconcerting to have an otherwise blank (factory reset) device apparently ‘modifying’ my files without my permission!

1 Like

Android in general has a fairly bastardised filesystem.

I suspect if you check timestamps they will be different, because android struggles to preserve them.

If you have access to ADB, could you connect to the phone (e.g. from your desktop computer) and then run



I would basically like to know what the file system is reported as. Syncthing applies automatic workarounds to deal with Android’s moving time stamps, but only if the detected file system is vfat or msdos. I’m curious if your device reports something else.

When running the command, you should get output similar to something like

/dev/block/mmcblk0p13: SEC_TYPE="msdos" UUID="29B2-ACBF" TYPE="vfat"
/dev/block/mmcblk0p14: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
1 Like

I ran adb shell and didn’t find blkid, lsblk, or anything that would help me determine the filesystem of the internal disk. mount and /proc/mounts report tons of stuff, but hard to decipher.

When I turned on config logging it reported fuseblk for both the internal disk, and the external SD card, which is exFAT formatted. I tried adding an ext4 formatted card, but it wasn’t recognized.

You can kind of deduct the file systems from that, but the problem is that Syncthing uses the following code

to check specifically for either fat or msdos (which both simply mean FAT), and if found, the 2 second mtime window is automatically applied. That’s why I asked to use blkid (if available), because it uses this terminology in its output, and I was curious what the OP’s phone says :wink:.

Another way is to enable debug logging in Syncthing and then look for a line that says something like

DEBUG: Detecting FS at /sdcard/test on android: Leaving mtime window at 0: usage.Fstype == "ext4"
1 Like

I didn’t get a chance to look at the timestamps of the originals unfortunately, so I’ve no way of knowing. The time stamps are all in the past, well before I even bought the phone, so if it’s modified them it’s done so a bit randomly?

I don’t I’m afraid. I recognise the command from linux, but that’s about as far as my skill level goes. My device is a 2019 Xperia 1, nothing unusual and as far as I’ve read (though I don’t claim to be an expert) runs an almost vanilla version of Android, so there really shouldn’t be anything surprising going on.

It’s no longer doing it (as far as I can tell), updates are running smoothly so if I enable debug logging now will there still be anything to see?

Android doesn’t allow applications to set timestamps, so yes, it’s random in a sense, as we can’t do what we need to due to the platform limitations.

I think it would still be useful to know what file system is actually reported :slightly_smiling_face:. The line will always be there if you enable debug logging under Android. I think you need to turn on fs logging, if I remember correctly. If not, you may also try turning on model.

To see the reported filesystem on Android, you need to enable logging for the config option.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.