Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DavidMoraisFerreira/6534af3ad7132565dc9d2c414ec8fc64 to your computer and use it in GitHub Desktop.
Save DavidMoraisFerreira/6534af3ad7132565dc9d2c414ec8fc64 to your computer and use it in GitHub Desktop.
Extract OTP codes and visualise them as QR codes from an encrypted FreeOTP ADB export
#!/bin/zsh
adb start-server
adb backup -f android-org.fedorahosted.freeotp.adb org.fedorahosted.freeotp
git clone https://github.com/nelenkov/android-backup-extractor.git
cd android-backup-extractor
./gradlew
export $ABE_PASSWD=<yourPasswordHereWithoutBrackets>
java -jar build/libs/abe-all.jar unpack android-org.fedorahosted.freeotp.adb android-org.fedorahosted.freeotp.tar
cd ..
git clone https://github.com/viljoviitanen/freeotp-export.git
cd freeotp-export
open export-xml.html # In your browser
# (1) Select your tar file, (2) open your new OTP App and (3) scan the QR codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment