Skip to content

Instantly share code, notes, and snippets.

@azu
Created June 6, 2021 07:13
Show Gist options
  • Save azu/f81eef51f6130264b951abe56001e4e6 to your computer and use it in GitHub Desktop.
Save azu/f81eef51f6130264b951abe56001e4e6 to your computer and use it in GitHub Desktop.
Decrypt and restore iOS backup(`Manifest.db` is encrypted) for restoring my iOS photos.

Setup

Use https://github.com/jfarley248/iTunes_Backup_Reader

git clone https://github.com/jfarley248/iTunes_Backup_Reader
cd iTunes_Backup_Reader
# apply https://github.com/jfarley248/iTunes_Backup_Reader/pull/12
gh pr checkout https://github.com/jfarley248/iTunes_Backup_Reader/pull/12
pyenv install 3.7.7 # can not use 3.9 @ 2021-06-06
pyenv local 3.7.7
pip install -r ./requirements.txt

Usage

  • mac backup: /Users/{user}/Library/Application Support/MobileSync/Backup/XXXXXX-XXXXXXXXX
  • $YOUR_BACKUP_PASSWORD is your iTunes backup password
$ python iTunes_Backup_Reader.py -i ./path/to/backupdir -o out -t db -r -p $YOUR_BACKUP_PASSWORD


  _ _____                   ___          _               ___             _
 (_)_   _|  _ _ _  ___ ___ | _ ) __ _ __| |___  _ _ __  | _ \___ __ _ __| |___ _ _
 | | | || || | ' \/ -_|_-< | _ \/ _` / _| / / || | '_ \ |   / -_) _` / _` / -_) '_|
 |_| |_| \_,_|_||_\___/__/_|___/\__,_\__|_\_\_,_| .__/_|_|_\___\__,_\__,_\___|_|
                        |___|                    |_| |___|


Written by Jack Farley

06-06 15:56 root         INFO     Starting to read backup at: 00008030-001575443612802E
06-06 15:56 root         INFO     Starting decryption of the Manifest.db
06-06 15:56 root         INFO     Successfully decrypted Manifest.db!
06-06 15:59 root         INFO     Program ended in: 206.0960659980774 seconds

Decrypt your itunes backup and restore the directories in out/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment