As far as I understand, the FAT file system uses imprecise timestamps regardless of the OS. What is the reason for applying the default value of 2 on Android only? Would it not be better to always apply it when finding a FAT partition and remove the OS check altogether?
There is already a mechanism that deals with any filesystem that does not have nano-second precision: The mtimeFS. Meaning that covers the 2s precision of FAT. That mechanism requires though, that the filesystem is consistent: If it told Syncthing at some point that the mod. time of a file is 01:30:03, when asked again it should say 01:30:03 as well - not 01:30:02. And that’s what a “normal” FAT filesystem does. Android on the other hand puts some virtual filesystem shenanigans on top of FAT, and apparently that changes reported mod. times upon restart (well remount probably). And that’s the problem and that’s why the mod. time window workaround is necessary despite having the mtimeFS.