Decrypt TitaniumBackup backups
You may already have PyCryptodome installed. If not:
$ virtualenv -p python3 venv
$ . venv/bin/activate
$ pip install -Ur requirements.txt
Activate the virtualenv, if you need to:
$ . venv/bin/activate
Run the script:
$ ./tdecrypt.py my-encrypted-backup.tar.gz
You will be prompted for your passphrase.
Alternatively, for batch operation you can put your passphrase in an environment variable:
$ passphrase='hunter2'
$ find . ! -iname '*.properties' -exec ./tdecrypt.py {} \;
Contributions are welcome. I use Google's import order, python-black
for
formatting, and flake8
for linting.
This was made massively easier by Christian Egger's lost G+ post about the format, and by @bhafer's archive of the post in their similar PHP project.