Status Update
Comments
ku...@gmail.com <ku...@gmail.com> #2
Since the Galaxy Nexus does not support USB mass storage, the only way to transfer files is through MTP or a third party server app. I have tried various WebDAV and FTP server apps and none of them are able to update the timestamp of files as they are copied to the device.
I attempted to manually update a timestamp using the ADB shell:
% cd /sdcard
% echo 'contents' >test.txt
% ls -al test.txt
-rw-rw-r-- root sdcard_rw 9 2012-07-23 00:25 test.txt
% touch -t 201206010000 test.txt
% ls -al test.txt
-rw-rw-r-- root sdcard_rw 9 2012-07-23 00:25 test.txt
Note that the timestamp did not change after the touch command.
It seems that timestamp modification is fundamentally broken at the operating system level. This is a very important feature for the following reasons:
1) Digital images are often sorted by file modification time. When copying some images from a computer to the phone, the Gallery app shows the images in random order.
2) File synchronization apps typically use a combination of file modification time and size to determine which files to synchronize. These apps will not work without being able to change the timestamp.
3) Users often use their phones as a portable storage device. Without timestamp modification, it is not possible to copy a directory while preserving the appearance of the listing when comparing to the original.
4) There is an expectation that file transfers between a computer and the device will behave as they did with previous devices that supported USB mass storage. Always setting the timestamp to the latest time is confusing and frustrating for the end user.
Here is a link to a related issue:
http://code.google.com/p/android/issues/detail?id=25576
Please advise if there is a workaround for the timestamp modification issue. If there is no workaround, I would appreciate an update from the Android team about when the issue might be resolved.
I attempted to manually update a timestamp using the ADB shell:
% cd /sdcard
% echo 'contents' >test.txt
% ls -al test.txt
-rw-rw-r-- root sdcard_rw 9 2012-07-23 00:25 test.txt
% touch -t 201206010000 test.txt
% ls -al test.txt
-rw-rw-r-- root sdcard_rw 9 2012-07-23 00:25 test.txt
Note that the timestamp did not change after the touch command.
It seems that timestamp modification is fundamentally broken at the operating system level. This is a very important feature for the following reasons:
1) Digital images are often sorted by file modification time. When copying some images from a computer to the phone, the Gallery app shows the images in random order.
2) File synchronization apps typically use a combination of file modification time and size to determine which files to synchronize. These apps will not work without being able to change the timestamp.
3) Users often use their phones as a portable storage device. Without timestamp modification, it is not possible to copy a directory while preserving the appearance of the listing when comparing to the original.
4) There is an expectation that file transfers between a computer and the device will behave as they did with previous devices that supported USB mass storage. Always setting the timestamp to the latest time is confusing and frustrating for the end user.
Here is a link to a related issue:
Please advise if there is a workaround for the timestamp modification issue. If there is no workaround, I would appreciate an update from the Android team about when the issue might be resolved.
yu...@gmail.com <yu...@gmail.com> #3
By the way, modifying file modified time is possible when running as root. So the filesystem merging or whatever it is works.
pr...@gmail.com <pr...@gmail.com> #4
I can confirm that on a rooted phone, doing it as root, timestamp is modified
ch...@gmail.com <ch...@gmail.com> #5
It's a VFS permission problem, the syscall utimensat() fails with EPERM due to inappropriate permissions/capabilities.
in platform/system/core/sdcard/sdcard.c:
> /* all files owned by root.sdcard */
> attr->uid = 0;
> attr->gid = AID_SDCARD_RW;
From utimensat()'s syscall man page:
in platform/system/core/sdcard/sdcard.c:
> /* all files owned by root.sdcard */
> attr->uid = 0;
> attr->gid = AID_SDCARD_RW;
From utimensat()'s syscall man page:
Old FAT offers an override of the iattr->valid flag via a mount option to allow changing timestamps to anyone, FUSE+Android's sdcard-FUSE don't do this at the moment (so the 'inode_change_ok() call fails) and the attempt gets rejected with -EPERM. Here's FAT's ./fs/fat/file.c:
ch...@gmail.com <ch...@gmail.com> #6
fm...@gmail.com <fm...@gmail.com> #7
I tried the following with sshdroid:
- I created a new file (which will therefore have the same owner as sshdroid, so should have permissions to change the date of the file).
- I changed the date using touch command
This worked fine.
- I created a new file (which will therefore have the same owner as sshdroid, so should have permissions to change the date of the file).
- I changed the date using touch command
This worked fine.
an...@googlemail.com <an...@googlemail.com> #8
In response to the previous comment: that will only work if the phone is already rooted, otherwise nothing can override the owner of the file.
md...@gmail.com <md...@gmail.com> #9
Any chance this will get fixed? Same issue still present on Galaxy S3 4.1
yk...@gmail.com <yk...@gmail.com> #10
The same for Google Nexus 4
an...@zoomtown.com <an...@zoomtown.com> #11
The same issue is present for Google Nexus 7!
And this issue was originally posted
MORE THAN A YEAR AGO!
And this issue was originally posted
MORE THAN A YEAR AGO!
js...@android.com <js...@android.com>
er...@gmail.com <er...@gmail.com> #12
I'm also affected by this bug on Samsung HomeSync. When I'm copying files there for backup, I see that their modification time becomes current date/time. This is not acceptable as I need to know which file was last modified at what date (for work). I cant sync files like this.
If I use an external USB disk (ntfs or exfat), it works, but then what good is the internal 1TB for!
If I use an external USB disk (ntfs or exfat), it works, but then what good is the internal 1TB for!
lu...@till.cz <lu...@till.cz> #13
Still not solved at present date and Nexus 5 and Android 4.4 :-(
I coul'd not find any sync&backup tool/app which does not need preserving timestamp.
I coul'd not find any sync&backup tool/app which does not need preserving timestamp.
kj...@gmail.com <kj...@gmail.com> #14
I have this problem with Nexus 7 2013. setLastModified return false in my application.
rh...@gmail.com <rh...@gmail.com> #15
So, the Android team will ignore this bug FOREVER just like the others 5k+ bugs ignored in this website???
Google you are making us use MTP instead of Mass Storage and because of that the timestamps are getting messed up. Fix it!!!
Google you are making us use MTP instead of Mass Storage and because of that the timestamps are getting messed up. Fix it!!!
do...@gmail.com <do...@gmail.com> #16
WHEN ARE THEY GOING TO FIX THIS BUG -- SAME PROBLEM ON SAMSUNG GALAXY NOTE 10.1 2014 EDITION. WHEEEEEEEEENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN??????????????????????????????????????????
an...@gmail.com <an...@gmail.com> #17
It might help you to use a USB OTG (On The Go) cable to access USB Stick as storage.
With a USB OTG cable, I can connect a USB Stick directly to my Nexus 7,
and copy files back and forth between my Nexus 7 and a USB Stick.
See the software needed below.
I can keep files with accurate dates on my USB stick,
copy them to my Nexus 7 only as needed,
and copy back to the stick when modified.
This doesn't fix the problem, but it helps me work around it.
USB OTG does require some software on my Nexus 7.
Total Commander
https://play.google.com/store/apps/details?id=com.ghisler.android.TotalCommander
and USB Stick plugin
https://play.google.com/store/apps/details?id=de.hechler.tcplugins.usbstick
are free and work well for me.
With a USB OTG cable, I can connect a USB Stick directly to my Nexus 7,
and copy files back and forth between my Nexus 7 and a USB Stick.
See the software needed below.
I can keep files with accurate dates on my USB stick,
copy them to my Nexus 7 only as needed,
and copy back to the stick when modified.
This doesn't fix the problem, but it helps me work around it.
USB OTG does require some software on my Nexus 7.
Total Commander
and USB Stick plugin
are free and work well for me.
ma...@gmail.com <ma...@gmail.com> #18
Google, 5+ year old bug, please fix before adding new features!!!!!!
ha...@gmail.com <ha...@gmail.com> #19
I bought a new Nexus5X this week and I cannot copy my photos from my old Nexus5 to my new Nexus5X because of this bug.
Is this bug very very difficult so that nobody can fix it?
Is this bug very very difficult so that nobody can fix it?
an...@googlemail.com <an...@googlemail.com> #20
To the last commenter: I would urge you to try Google Photos. I've been resisting the cloud for a while but it's honestly the best way to migrate to a new device: all you would have to do is enable auto sync/backup on your old Nexus 5, wait for it to upload your entire photos collection, and then all your photos will be there once you log in to your account on your new 5X.
my...@gmail.com <my...@gmail.com> #21
I just bought the Nexus 6p and trying to migrate my files to it from an external SD card I found out the timestamp bug persists. I've spent countless hours over the past few days trying different methods and installing different apps suggested by other Android phone users without resolving the problem. The only fix I did not try is the google photos cloud method. Although even if this might work for photos, it will not work for other essential to me files that I would like to keep with the original timestamp. Besides that, all the sync apps are useless if they can not take advantage of the timestamp. The only remedy for the problem right now would be to root the phone which I don't want to do, because it might void my phone's warranty. Google, please fix the timestamp bug.
ga...@gmail.com <ga...@gmail.com> #22
Ho hum, still the same issue on Nexus 6P with Android V6.0.1
Guess it'll be marked as obsolete one day like various other bugs/features here...
Guess it'll be marked as obsolete one day like various other bugs/features here...
in...@gmail.com <in...@gmail.com> #23
I can't believe such a fundamental function has been broken this long. Having gone thru 3 phones in the last few weeks due to bad refurbs, this has been a huge issue for me as I also had need to preserve files with their original date/time stamps.
Get on the ball Google! Hmm, I guess I should try this on version N.
Get on the ball Google! Hmm, I guess I should try this on version N.
au...@gmail.com <au...@gmail.com> #24
Well we are not yet at the point where we can put PCs on trash. Google is of no help to stop using Windows.
This really breaks any solution to use an external camera to take videos and manage them on mobile device. Currently cameras come with wi-fi and also mobiles come with USB OTG but these features are totally useless for video files cause of this HUGE bug. Now I keep getting my videos uploaded on Google Photos with wrong dates.
Not to say that GPS history feature is also useless without fixing this.
A lot of good Google features just trashed by one bug.
This really breaks any solution to use an external camera to take videos and manage them on mobile device. Currently cameras come with wi-fi and also mobiles come with USB OTG but these features are totally useless for video files cause of this HUGE bug. Now I keep getting my videos uploaded on Google Photos with wrong dates.
Not to say that GPS history feature is also useless without fixing this.
A lot of good Google features just trashed by one bug.
wi...@gmail.com <wi...@gmail.com> #25
seems like Google may finally be fixing this
check out the last few entries here - https://code.google.com/p/android/issues/detail?id=18624
check out the last few entries here -
Description
Date expirationDate = getServerTimestamp(request.imageUrl);
Date now = new Date();
if(expirationDate.after(now)) {
LogWrapper.logMessage("Cached file is still current, updating timestamp");
File cacheFile = new File(getCacheDirectory(context), filename);
if(!cacheFile.setLastModified(now.getTime())) {
// ^^ this always returns false on the Galaxy Nexus
LogWrapper.logMessage("Can't update timestamp!");
}
}
Is this a known issue for the Galaxy Nexus? I've been googling this issue like crazy, but can't seem to find any other reports thus far.