Any links to online stores should be assumed to be affiliates. The company or PR agency provides all or most review samples. They have no control over my content, and I provide my honest opinion.

In this article, I will guide you through the process of restoring your Google Photos data with the correct dates.

The Problem: Incorrect Date Order in Restored Photos

After a factory reset of an Android phone, I noticed that certain apps, like Facebook and Instagram, failed to recognize the correct chronological order of my photos and videos. This issue arose despite using Google Photos to back up my media.

Initially, I didn’t organise my photos into albums within Google Photos. I simply relied on the app’s “Photos” tab to ensure my media was backed up. However, following the bootloop and subsequent factory reset, I discovered that Google Photos could only restore the latest 200 photos and videos into a “Restored” folder within the DCIM directory. This was contrary to my expectation that Google Photos would maintain the structure of my local storage folders.

Discovering Restoration Methods

Determined to restore my entire Google Photos library with accurate dates, I turned to various methods shared on Reddit. I focused on techniques involving Google Takeout, allowing me to successfully recover all my data, including non-camera sources like WhatsApp images and internet downloads.

Preparing for Restoration

Before attempting any restoration method, it’s crucial to tidy up your Google Photos:

  1. Access Google Photos via a PC.
  2. Remove unnecessary old media and delete any created albums to prevent duplication.
  3. Initiate an export from Google Photos using Google Takeout, ensuring to select the largest zip file option (up to 50 GB) for convenience.

Method 1: The Easy (Paid) Approach

To use Metadata Fixer for fixing your pictures’ and videos’ EXIF metadata when exporting from Google Takeout, you can follow these steps, primarily using the ExifTool:

  1. Deleting Duplicates: For any edited file, Google Takeout exports both the original and the edited files. If you want to remove duplicates, you can delete the edits using the command.del /s /q *-edited.jpg
  2. Fixing File Creation Dates: The file creation date for your media might be updated to the current date during export. To correct this, especially for media without EXIF data, use the ExifTool command from the Takeout root directory:
   exiftool -d "%s" -tagsfromfile %d%f.%e.json "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileCreateDate<PhotoTakenTimeTimestamp" "-FileModifyDate<PhotoTakenTimeTimestamp" -overwrite_original -ext mp4 -ext jpg -r .

This command updates the file creation, modification, and original dates based on the metadata in the .json files.

  1. Restoring Geolocation Data: To add back geolocation data to your files, use the following ExifTool command:
   exiftool -tagsfromfile %d%f.%e.json -description -title "-gpslatitude<GeoDataLatitude" "-gpslatituderef<GeoDataLatitude" "-gpslongitude<GeoDataLongitude" "-gpslongituderef<GeoDataLongitude" -ext mp4 -ext jpg -r .

This helps in cases where location data might not be intact in the files.

  1. Deleting JSON Files: After fixing the metadata, you can remove the .json files with the command del /s /q *.json
  2. Organizing the Files: If you want to organize your files better, you can use ExifTool to recreate a directory structure based on the camera model or other criteria. For example:
   exiftool "-directory<%d/${model;}" -r .

This command organizes files into directories based on the camera model.

  1. Sorting by Image Size: To further sort your files, especially if some actions stripped EXIF data or for files like mp4 that generally don’t have EXIF data, you can sort by image size using:
   exiftool "-directory<%d/${ImageSize;}" .

This helps group together images saved from various sources like screenshots or movies.

These steps will help you in efficiently restoring and organising the EXIF metadata for your pictures and videos exported from Google Takeout.

Method 2: The Uneasy (Free) Approach

This free method is more complex and involves several steps:

Here’s a guide on how to use the GooglePhotosTakeoutHelper tool to organize and fix the EXIF metadata of pictures and videos when exporting from Google Takeout:

  1. Download the GooglePhotosTakeoutHelper Executable: Visit the releases tab of the GooglePhotosTakeoutHelper repository on GitHub and download the appropriate executable for your operating system.
  2. Run the GooglePhotosTakeoutHelper (gpth):
  • For Windows: Double-click the downloaded .exe file and follow the instructions. You might need to confirm to Windows Defender that the file is safe.
  • For Mac/Linux: Open the terminal, navigate (cd) to the folder with the downloaded executable, and run the following commands:
    • For Mac with M1/M2 chip, enable x86 emulation: softwareupdate --install-rosetta
    • Add execute permission: chmod +x gpth-macos (or gpth-linux for Linux)
    • Tell MacOS Gatekeeper it’s safe: xattr -r -d com.apple.quarantine gpth-macos
    • Execute the script: ./gpth-macos (or ./gpth-linux for Linux)
    • Follow the prompted instructions.
  1. Fixing EXIF Metadata:
  • Download Phil Harvey’s ExifTool from here.
  • Open the command line or terminal, navigate to the folder where you downloaded ExifTool.
  • Run ExifTool on your photos: exiftool -overwrite_original -r -P "-AllDates<FileModifyDate" "your/output/folder/ALL_PHOTOS/"This command inserts the correct EXIF metadata, preserving the creation time of your photos.

This process should organize your Google Takeout photos into one large, chronologically ordered folder, with corrected EXIF metadata for better organization and viewing.

Optional Organisational Steps

After restoring your photos and videos, you might want to organise them further. I created separate folders for different content types (e.g., Screenshots, Facebook, etc.) and sorted my media accordingly. This step is optional but can greatly enhance the accessibility of your media.

Concluding Thoughts

Restoring and organising your Google Photos data after a factory reset can be a daunting task, but with the right tools and patience, it’s definitely achievable. This process ensures that your precious memories are not only recovered but also well-organized.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *