Sample Header Ad - 728x90

Have the latest Android OS versions brought back the longstanding bug that files copied to the phone have the wrong modification time?

3 votes
0 answers
81 views
Once upon a time, you could plug an Android phone into a computer running one of the three major OS's (Linux, macOS, Windows), and it would present an interface to the computer that looked like a disk drive (USB-Mass Storage Class) containing a FAT32 filesystem. That made it easy to copy files to or from the phone, edit them in place with any editor running on the computer, or use any other application running on the computer that simply treats the files on the phone as ordinary files. But Google had a better ideas -- NOT! Around 2012 they got rid of that interface and replaced it with MTP (Media Transfer Protocol). That created a whole host of problems, one of which is that when files were copied from the computer to the phone, the timestamp was changed to the current time rather than preserving the timestamp of the source file. People constantly complained about that, but for years Google seemed uninterested in fixing it. Then, around 2017, Google finally fixed it by replacing the FUSE-based filesystem implementation running inside the Android OS (FUSE = Filesystem in User Space) with SDCardFS. There's an excellent explanation of the problem at https://www.xda-developers.com/diving-into-sdcardfs-how-googles-fuse-replacement-will-reduce-io-overhead/ . It explains that the architecture of FUSE-based filesystems means that the process that issues the utime() system call to set the timestamp is running with insufficient permission for that system call to succeed. It now appears that Google didn't sufficiently vet SDCardFS before incorporating it into the Android OS. They're now deprecating SDCardFS and replacing it with "a new FUSE implementation". (See https://source.android.com/docs/core/storage/sdcardfs-deprecate ). I'm concerned that in reverting back to a FUSE-based filesystem, the old timestamp problems will reappear. I'd like to bring this to the attention of one of Google's Android OS developers to find out if they considered this when they decided to revert to FUSE, and if so, whether or not their new implementation allows the preservation of timestamps of files copied to the phone. Does anyone here have any idea how to contact those developers?
Asked by MBR (51 rep)
Jan 21, 2023, 08:01 AM
Last activity: Jan 23, 2023, 08:16 AM