Changing files metadata in Android - Page 1
Forum section: electronics / general

author: soldar
author_rank: Super Contributor
timestamp: November 13, 2019, 10:46:27 pm
content: 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?

author: Halcyon
author_rank: Unknown
timestamp: November 14, 2019, 12:30:48 am
content: 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.

author: soldar
author_rank: Super Contributor
timestamp: November 14, 2019, 08:01:50 am
content: 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.

author: andycsmith
author_rank: Contributor
timestamp: November 14, 2019, 08:56:38 am
content: 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.

author: soldar
author_rank: Super Contributor
timestamp: November 14, 2019, 09:35:41 am
content: Quote from: andycsmith on November 14, 2019, 08:56:38 amThanks 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.

author: soldar
author_rank: Super Contributor
timestamp: November 14, 2019, 03:04:39 pm
content: 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.BUTtransferring from Linux to Android (phone) the date is lost and Android sets it to the current moment.I downloaded and installedFile 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 thatQuoteIt 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 seemsFile Timestamprequires 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.

author: SilverSolder
author_rank: Super Contributor
timestamp: November 14, 2019, 05:19:13 pm
content: Things are complicated because the product is designed to be used by very unskilled operators. Apple phones are even worse...

author: Syntax Error
author_rank: Frequent Contributor
timestamp: November 14, 2019, 06:32:53 pm
content: @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 atimestampname; DCS_20191001_175621.jpg DCS_20191001_175800.jpg > Gallery listing bynameplaces 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.

author: soldar
author_rank: Super Contributor
timestamp: November 14, 2019, 06:51:41 pm
content: 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 phoneThis seems to conserve file metadata date.What a pain.

author: Halcyon
author_rank: Unknown
timestamp: November 15, 2019, 02:16:57 am
content: 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 filebecame 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?

author: soldar
author_rank: Super Contributor
timestamp: November 15, 2019, 07:45:25 am
content: Quote from: Halcyon on November 15, 2019, 02:16:57 amI already know and understand this well.Quote from: Halcyon on November 15, 2019, 02:16:57 amThat is what I am searching for and I cannot find one. Can you?Quote from: Halcyon on November 15, 2019, 02:16:57 amI 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.

author: Halcyon
author_rank: Unknown
timestamp: November 15, 2019, 08:51:05 am
content: Quote from: soldar on November 15, 2019, 07:45:25 amNo 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).

author: soldar
author_rank: Super Contributor
timestamp: November 15, 2019, 10:23:25 am
content: Quote from: Halcyon on November 15, 2019, 08:51:05 amI 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.Quote from: Halcyon on November 15, 2019, 08:51:05 amI 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 phoneIt seems the ZIP "folder" conserves the metadata that is lost if transferring the file directly via USB.Lousy Android design.

author: SilverSolder
author_rank: Super Contributor
timestamp: November 15, 2019, 11:44:50 am
content: Quote from: soldar on November 15, 2019, 10:23:25 amNice trick with the ZIP file.Perhaps there are other file transfer apps preserve the date, e.g. Dropbox?

author: soldar
author_rank: Super Contributor
timestamp: November 15, 2019, 11:56:42 am
content: 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.

author: soldar
author_rank: Super Contributor
timestamp: November 15, 2019, 12:05:39 pm
content: Quote from: Syntax Error on November 14, 2019, 06:32:53 pmMy 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.

author: soldar
author_rank: Super Contributor
timestamp: November 15, 2019, 01:16:06 pm
content: 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 pmsomewhere.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.

author: soldar
author_rank: Super Contributor
timestamp: November 15, 2019, 02:26:14 pm
content: 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.

author: SilverSolder
author_rank: Super Contributor
timestamp: November 15, 2019, 03:01:28 pm
content: Quote from: soldar on November 15, 2019, 12:05:39 pmYou 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.