The Real Bev wrote:
> VanguardLH wrote:
>
>> The Real Bev wrote:
>>
>>> I just found out that Android -- no matter which file manager you use --
>>> is incapable of maintaining the last-changed date for a file.
>>
>> What does "maintain" mean to you, er, should mean to us?
>
> I want it to mean "the date I last altered/changed/edited/whatever the
> file should stay forever no matter where I copy the file".
That never works under ANY operating system by default. After all, you
are creating a NEW file at the destination. You would need to use a
copy program that reads the last modified datestamp, creates the new
file (a copy), and then "touches" the new file to modify its datestamps
(created, last accessed, last modified).
>> - After creation, has the file you looked at ever been modified?
>> - Is it the same as the creation date?
>> - Does last-modified attribute zero out?
>
> No idea, I don't know how to look for that.
How did you see the datestamps before? You mentioned using several file
managers. While I have Total Commander installed, I've not used it
enough to know how to see all attributes of a file. So far, when long-
tapping a file, I can only see one datestamp (that it lets me change so
it's probably the last-modified datestamp). Maybe a different file
manager would provide more details about a file.
>> - If different (after modification), does it revert to the creation
>> date?
>> - Does it change to the date and time of when you peek at the file?
>
> That's a different thing, about which I'm unconcerned. When I use cp,
> it's automatically aliased to cp -ai. That's what I want to happen.
I thought the -p option (equal to --preserve=mode,ownership,datestamps)
or --preserve=datestamps would preserve (transfer) the datestamp
property. That is, the *new* file just created as the copy would get
the datestamps changed on it to match those for the original file.
Some commands and some of their options might not work unless rooted.
>> - Does it change when you only read the file (and with a tool that can
>> ONLY read, NOT write)?
>
> No. I don't care about that, although a lot of people would.
I had to guess what you were DOING with the file. Any tool that
modifies (edits, writes) the file would affect the last-modified
datestamp. You said the last-modified datestamp wasn't sticking so a
possibility is you did something with the file that wrote to it.
>> - Are you looking at the timestamps of the files when they are on your
>> main/primary or secondary/SD storage, or after you imported them
>> or copied them elsewhere?
>
> I copied photo files (dates were the dates I took the photos) from my
> old phone to my computer to my new phone using ES File explorer for all
> copies. The dates changed to the copy date. Is it possible to mount
> the phone card without removing it from the phone? fdisk -l doesn't see it.
You would have to check if ES Explorer has an option to preserve
datestamps when creating new files (i.e., the new files created by a
copy operation).
I dumped ES Explorer within a couple days after trialing it. While it
was loaded in the background but not visible, it was shoving fullscreen
ads in my face. This would interrupt whatever I was doing. Ads within
freeware, like a banner, is okay. Shoving ads inline with the functions
of an app to mislead the user are not okay. And popping up fullscreen
ads when the app isn't even visible is total unacceptable. So I don't
have much experience with ES Explorer to know if it has a per-operation
or global config option to preserve datestamps on copy operations which
are creating new files.
>> - After using Total Commander to change the last modified timestamp of a
>> file in main or secondary storage, how long afterward does that
>> timestamp "not get maintained" (whatever that means)? Does it only
>> change after a restart of the phone?
>
> I didn't use that. I downloaded it and asked the author if it could
> change the existing dates to the lastmodified dates. He said no,
> Android didn't allow that.
Hmm, thought Android was a Linux derivative. There's 'touch' on Linux
so I figured Android had one, too, or 3rd party app could employ the
same method. Total Commander, when I look at the properties of a file,
lets me change its datestamp but it is a per-file and manual operation
and not something employed during a copy operation.
It may be something that requires root mode to work. For the app at
https://play.google.com/store/apps/details?id=br.com.pogsoftwares.filetimestamp,
it mentions "Easily change the last modification date and time of your
files. This app requires ROOT access ..."
I can only guess when you mentioned using the 'cp' command that you were
in an ADB shell and not because you rooted your Android device.
That app's description also mentions "On Android OS, every time you copy
a file, the last modified date of the destination file is not
preserved." Okay, but some tools do preserve datestamps, like 'cp', but
perhaps that's not doable unless rooted.
The 2nd one mentions "unless running as root". The first never mentions
root mode in its discussion. The 3rd is marked a duplicate of the 2nd.
Yep, looks like Android doesn't preserve (well, transfer) datestamp
attributes to a NEW file created by a copy operation. Lots of stuff you
cannot do unless rooted. The ADB shell is not root mode. I'll "play"
with my current smartphone by rooting it only after I get my next
smartphone. Then if I brick my old smartphone, no big loss (it's an
entry-level cheapie).