Author Topic: Changing files metadata in Android  (Read 6146 times)

0 Members and 1 Guest are viewing this topic.

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Changing files metadata in Android
« on: November 13, 2019, 10:46:27 pm »
I am very new to Android and everything is a small battle.

So, I cannot choose what size photo the camera will take. It just takes huge photos, way bigger than I want or need. I was looking for a simple way to take smaller photos but no.

So, when I take photos, I get home, plug the phone into the computer, download the photos, resize them in the computer and upload them back to the phone. So far so good. Except that now the photo files have a modified date which is when I copied them to the phone and not when the photo was taken. The Gallery app shows the photos by file date modified. I do not want that.

In Windows I have an app that I can change the metadata, date created, modified, etc. How can I do this in Android? Or, how can I get the Gallery App to show the photos by EXIF date and not file date?
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5916
  • Country: au
Re: Changing files metadata in Android
« Reply #1 on: November 14, 2019, 12:30:48 am »
Check the Camera settings, there is almost always an option to select photo resolution. I haven't seen an Android (yet) which doesn't have this option. For example, the native Camera application on my Samsung Galaxy S8 has the option of 4:3, 16:9, 18.5:9 or 1:1 aspect images with resolutions varying between 2160 x 1440 to 4032 x 3024. Some phones even allow resolutions down to 640 x 480.

 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #2 on: November 14, 2019, 08:01:50 am »
Yes, I have looked into it but the minimum sizes are still too big.  I find it retarded that they would not give the user the option of smaller files and not using up so much storage space. I wish I could do it but it seems the camera app does not allow it.

The minimum size I can get is 2560 x 1440. If I reduce that to 1280 x 720, which is enough for me, the file size with Irfanview is reduced to about 1/7th of the original, which means I can fit seven times more photos in my memory card and I use much less data bandwidth when sending photos to others.

I cannot understand why they would force me to take huge photos.
« Last Edit: November 14, 2019, 08:32:39 am by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline andycsmith

  • Contributor
  • Posts: 16
  • Country: gb
Re: Changing files metadata in Android
« Reply #3 on: November 14, 2019, 08:56:38 am »
You may want to look at Open Camera, this allows resolutions down to 320 x 240.

I have not used it myself, I have heard about it, just installed and checked the options.
 
The following users thanked this post: soldar

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #4 on: November 14, 2019, 09:35:41 am »
You may want to look at Open Camera, this allows resolutions down to 320 x 240.

I have not used it myself, I have heard about it, just installed and checked the options.

Thanks for the tip. I installed it and it does, indeed, allow for smaller sizes. I will have to play around with it.

Still, for the photos I already took and for any future needs, I would like to know how to edit a file's metadata in Android.  In Windows I find it useful and convenient. Often I will make some change to a file but do not want it to affect the "modified" date so I can just edit it back to what it was.

In fact, I would like to know how to do this in Linux Mint / Ubuntu as well.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #5 on: November 14, 2019, 03:04:39 pm »
Gah! What a waste of time!  So frustrating!

OK, so here is what I have so far:

If I change the "date modified" in Windows and then transfer to Linux, Linux will keep it so, even though I cannot change it in Linux I can always take the file to Windows, change it there and transfer back to Linux.

BUT

transferring from Linux to Android (phone) the date is lost and Android sets it to the current moment.

I downloaded and installed File Timestamp_v3.05_apkpure.com.apk (2.6 MB) which is supposed to do what I want but, besides it being cumbersome and confusing, when I try to do anything I get an error message that
Quote
This feature requires root permission. Your device does not have root permission enabled.

It does seem to identify the correct timestamp and I am guessing it gets it from EXIF.

What say you?

E.T.A.: I guess another possible solution would be to have Android sort the photo files alphabetically which should work because the file names are all in YYYYMMDD_HHMMSS format.

It seems File Timestamp requires me to "root" the phone, whatever that means, but I read that can be dangerous. I don't know but it seems to me they make things unnecessarily complicated.
« Last Edit: November 14, 2019, 04:10:10 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Changing files metadata in Android
« Reply #6 on: November 14, 2019, 05:19:13 pm »

Things are complicated because the product is designed to be used by very unskilled operators.  Apple phones are even worse...
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: Changing files metadata in Android
« Reply #7 on: November 14, 2019, 06:32:53 pm »
@Soldar : I would have thought there was an App on the PlayStore to edit EXIF. There is just one App, and that is bloatware. Otherwise nothing that does what you need. Someone like to write an EXIF edit app?

I get around this Android annoyance by renaming files with a timestamp name; DCS_20191001_175621.jpg DCS_20191001_175800.jpg > Gallery listing by name places all images in date order, regardless of their meta dates.

btw, rooting an Android device is for accessing the Kernel. Ideal if you want full control over the file system and rid your phone of the network's crapware. But this means reflashing the ROM, which can result in bricking the (expensive) device.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #8 on: November 14, 2019, 06:51:41 pm »
OK, I think I am making slow progress. this seems to work:

- Set file date in Windows machine
- Transfer file to Linux machine (via network)
- Put files in a ZIP file (in Linux)
- Transfer ZIP file to Android phone (via USB)
- Extract files from ZIP in phone

This seems to conserve file metadata date.
What a pain.
« Last Edit: November 14, 2019, 09:00:06 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5916
  • Country: au
Re: Changing files metadata in Android
« Reply #9 on: November 15, 2019, 02:16:57 am »
MAC (Modified, Access and Create) times aren't an exact science (and should never be relied upon for anything important). For example, the "Create" time of a file isn't always the time/date the file actually was created, it's often the time/date the file became to exist on that particular media. This is why moving a file from your hard disk to a USB flash drive will change that value (on most of the common file systems).

In addition, EXIF data is completely separate to MAC times. EXIF data is data embedded in the actual file, that does not change as the file is moved around (EXIF allows for a "digitised" time/date field to record when the photo was captured and encoded by the camera) where as MAC times are a function of a file system and do not (necessarily) follow a file around.

Yes it's possible to manually modify these values and there are probably applications on Android which will allow you to do this, but can I ask, what is the purpose of what you're trying to achieve?
« Last Edit: November 15, 2019, 02:18:55 am by Halcyon »
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #10 on: November 15, 2019, 07:45:25 am »
MAC (Modified, Access and Create) times aren't an exact science (and should never be relied upon for anything important). For example, the "Create" time of a file isn't always the time/date the file actually was created, it's often the time/date the file became to exist on that particular media. This is why moving a file from your hard disk to a USB flash drive will change that value (on most of the common file systems).

In addition, EXIF data is completely separate to MAC times. EXIF data is data embedded in the actual file, that does not change as the file is moved around (EXIF allows for a "digitised" time/date field to record when the photo was captured and encoded by the camera) where as MAC times are a function of a file system and do not (necessarily) follow a file around.

I already know and understand this well.

Yes it's possible to manually modify these values and there are probably applications on Android which will allow you to do this,

That is what I am searching for and I cannot find one. Can you?

but can I ask, what is the purpose of what you're trying to achieve?

I already explained that in the OP. The phone shows the photos by file date so if today I copy a photo that I took three years ago it will assign it today's date and will show it in that order/position as if it was taken today. I want the photos shown when they were taken. I don't think it is too much to ask.
« Last Edit: November 15, 2019, 07:50:08 am by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5916
  • Country: au
Re: Changing files metadata in Android
« Reply #11 on: November 15, 2019, 08:51:05 am »
The phone shows the photos by file date so if today I copy a photo that I took three years ago it will assign it today's date and will show it in that order/position as if it was taken today. I want the photos shown when they were taken. I don't think it is too much to ask.

No it's not too much to ask, but this is the default behavior already. It's just that you're changing the attributes of the file by editing it and copying it a number of times.

Can you not just save the files directly to the SD card then resize them from there. This way, the creation time will be preserved, it's just that the modified time will change. It's a lot less stuffing around and you can probably do it without even removing the SD card from the phone (just access and save the file via the USB port).

 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #12 on: November 15, 2019, 10:23:25 am »
No it's not too much to ask, but this is the default behavior already. It's just that you're changing the attributes of the file by editing it and copying it a number of times.

I find the notion that I am somehow doing something wrong just ridiculous. The phone should make things easy for me, the user.  I have several hundred photos I would like to transfer from my old phone. I have had a life before this phone. I was not born yesterday. The fact that they all show like they were created yesterday is ridiculous. This is just a lousy Android design.

Can you not just save the files directly to the SD card then resize them from there. This way, the creation time will be preserved, it's just that the modified time will change. It's a lot less stuffing around and you can probably do it without even removing the SD card from the phone (just access and save the file via the USB port).

I do not have an SD card installed but I cannot see how that would make any difference. So say after I install the SD card I download the file from the SD card instead of the phone memory. Everything else is the same so I cannot see how it would make any difference. I guess it might make a difference if I pulled the SD card out of the phone and put it into the computer directly. I might try that when I have a card I can use. It might work. Although I do not like the idea of extracting the SD card every day it might make sense for transferring photos as a one time thing.

At any rate, for now I think I have a workaround as I mentioned above:

- Set file date in Windows machine
- Transfer file to Linux machine (via network)
- Put files in a ZIP file (in Linux)
- Transfer ZIP file to Android phone (via USB)
- Extract files from ZIP in phone

It seems the ZIP "folder" conserves the metadata that is lost if transferring the file directly via USB.

Lousy Android design.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Changing files metadata in Android
« Reply #13 on: November 15, 2019, 11:44:50 am »

[...] It seems the ZIP "folder" conserves the metadata that is lost if transferring the file directly via USB.  [...]



Nice trick with the ZIP file.

Perhaps there are other file transfer apps preserve the date,  e.g. Dropbox?
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #14 on: November 15, 2019, 11:56:42 am »
I think there is a good chance of the SD memory card conserving the metadata if physically extracted but not if written via the USB.

I found an old microSD card from another phone but this Samsung phone does not recognize it. I do not know if the card went bad or what. The phone just says no card is present.

All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #15 on: November 15, 2019, 12:05:39 pm »
I get around this Android annoyance by renaming files with a timestamp name; DCS_20191001_175621.jpg DCS_20191001_175800.jpg > Gallery listing by name places all images in date order, regardless of their meta dates.

My Gallery App does not have that option, or, at least, I cannot find it.

You would think such an app, as a minimum, would have the options of sorting by (1) file name, (2) file date and (3) EXIF date.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #16 on: November 15, 2019, 01:16:06 pm »
All this business with time stamps is aggravating. I am reviewing old files and their timestamps and EXIF data and there is much more discrepancy than I thought I would find. There are several and diverse causes.

Daylight saving. I hate that. Often EXIF timestamps are off by one hour because I did not adjust the camera's time. I have the same problem with my security cameras. Now I just leave them on standard time all year around. What a PITA! I wish they would just get rid of the darn thing.

Travel. Travel six time zones east or west and time stamps are still indicating home time, not local time. Furthermore, as EXIF does not indicate UT offset it is worthless as an absolute measure. Saying the photo was taken (or the file was created) at TTMMSS means nothing unless you also indicate the UT offset. Yeah, it was 5 pm somewhere.

Then we get into the aforementioned issue of changing timestamps when transferring files between systems.

What a mess.

E.T.A: In fact, I just noticed my posts here are still timestamped as Daylight Saving time. I better adjust my preferences.
« Last Edit: November 15, 2019, 01:18:05 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Changing files metadata in Android
« Reply #17 on: November 15, 2019, 02:26:14 pm »
Further relevant information. The issue of "modified date" file timestamp changing may be a Linux issue more than an Android issue because it does not happen with Windows. The problem is my Windows box refuses to connect to the Android phone because drivers are messed up and there is no way to fix them so I am forced to use the Linux machine.

So, for whatever reason, Android does not get the metadata from Linux.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Changing files metadata in Android
« Reply #18 on: November 15, 2019, 03:01:28 pm »
[...] You would think such an app, as a minimum, would have the options of sorting by (1) file name, (2) file date and (3) EXIF date.

You should know by now, that it is strictly forbidden to build any features into a mobile phone app that could potentially confuse an 11 year old school girl or cause her to pause for more than 2 seconds while posting her next Instragram picture.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf