Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

MTP does not work in Ubuntu so I am using Airdroid to copy photos off my phone (Galaxy Nexus) to my computer (Ubuntu 12.04). My problem is that the files downloaded via Airdroid all have modification date of when I transferred them. I want the files to keep the timestamps they have on the phone (which is the date and time I took the photo).

How can I do this?

share|improve this question
    
This is also an Ubuntu / device issue. –  david6 Oct 5 '12 at 8:31
add comment

1 Answer

up vote 6 down vote accepted

Reason is your client saves them at that time, and doesn't ask the "server" (your Android device) for the original time stamps.

You could try using a SSH server on your Android device. DroidSSHd would be a good choice, for example. To copy your files then you need to start this SSH Server first on your phone, which usually tells you the IP and port used. Now you can use any SSH client on your Ubuntu workstation, or from the shell, use the scp command:

scp -p -P 2222 192.168.1.15:/sdcard/DCIM/*.jpg .

would be an example:

  • -p: Preserves modification times, access times, and modes from the original file
  • -P 2222: Use port 2222 (that's what DroidSSHd uses by default)
  • 192.168.1.15: IP of your device (replace this with what the SSH server shows)
  • /sdcard/DCIM/*.jpg: All JPEG files from your camera folder on the SD-card (check for the correct path)
  • .: Copy files to the current working directory

There might be graphical solutions available as well -- but I mostly work from the command line, so I cannot give you examples for those.

share|improve this answer
    
This is the classic push/pull issue with FTP. If you copy files to your PC (push), it does not trust the source (and replaces the time/date stamps). If you copy files from the device (pull), your PC has control and retains the time/date stamps. The same issue occurs when FTP copying between two Ubuntu hosts, using Nautilus. If you can configure settings, you can overcome this. –  david6 Oct 5 '12 at 8:27
    
When I push files with scp or rsync, this issue does not occur either. But confirmed, the described issue is "incorrectly titled" Airdroid modifies timestamps, as the modification is rather done by the receiving client. And also agreed, it is more likely to happen with FTP. –  Izzy Oct 5 '12 at 8:57
    
Thank you, using scp worked fine. I do think it was airdroid modifying the timestamps in my case, because all my pictures were packed into a .zip which was downloaded via browser. I don't care what the modification date of the zipfile was, but the photos inside all had new useless dates generated too - surely this was airdroid. –  wim Oct 6 '12 at 3:53
    
Oh -- in this case I agree. But as you didn't point this out before, I couldn't know :) –  Izzy Oct 6 '12 at 10:59
1  
@GeorgeProfenza I suggest you open a new question for that. You can link to this one for reference. –  Izzy Jul 3 '13 at 12:50
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.