A simple python script to backup OTP tokens from the FreeOTP Android app.
To create backups you must use adb. This script just extracts the tokens from the backup archive and gereates qr codes to provide a simple restore process.
If pyqrcode to be is installed, this script generates qr codes that can be scanned with FreeOTP. Otherwise the topt url is printed and you can generate the qr code with a different tool.
Have fun!
# Clone this repo
git clone git@github.com:raphiz/freeotp-backup.git
cd freeotp-backup/
# Optional: Create a virtual env and install optional dependencies
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create a backup of the App using ADB - don't encrypt it...
adb backup -f freeotp-backup.ab -apk org.fedorahosted.freeotp
python backup_freetop_codes.py freeotp-backup.ab