Analyzing photos and videos
Every time a photo or video is taken through a device's camera or saved onto a device, iOS analyzes it and generates a multitude of metadata, which is stored in the Photos.sqlite
database.
The following is a list of events that occur during the process:
- First, the newly created photo or video is saved in
/private/var/mobile/Media/DCIM/1**APPLE/
as a JPG, HEIC, MP4, or MOV file. The folder name will iterate upward (100APPLE
,101APPLE
,102APPLE
, and so on) as more photos or videos are stored on the device. - Additionally, the
PreviewWellImage.tiff
image is created and stored in/private/var/mobile/Media/PhotoData/MISC/
. This image is the thumbnail that is displayed in the Photos app where the most recent image is displayed. - As the new media is stored, a new entry is created in the
Photos.sqlite
database, in theZGENERICASSET
table. Since iOS 14, this table is now calledZASSET
. The new record will contain metadata such as the date and...