FreeOTPPlus
FreeOTPPlus copied to clipboard
[Feature Request] import FreeOTP's tokens.xml
Hi, it would be nice to be able to directly import FreeOTP's tokens. On a rooted phone, one has access to tokens.xml and can copy it to somewhere FreeOTPPlus can read it from. If this step is left to the user, FreeOTPPlus itself would not need root access priviliges.
Came here to ask for exactly this! 😃
Sounds like an interesting idea. I wonder how much demand is this feature. If there are lots of demand, I probably would rather include some root library to automatically import from FreeOTP instead. But it definitely requires some work.
I would imagine that there is lots of demand because everyone who learns about FreeOTP+ has to keep two apps on their phones otherwise (the original and +).
That's true. But the root user is only a very small percentage of users.
+1 for this feature for the manual migration there is no need of root, I was able to make it via usb debug with adb backup and my small script(published in my repos) which generate importable JSON for FreeOTP+. Still native solution would be easier for users.
Hi @pavelpicka, I'm trying to figure out your script but I don't know how to do the adb
backup. Would you happen to have a link to any guide for this? I can't seem to find one easily online.
Hello @KeronCyst I followed this one on 9to5. But if you are on Linux is much easier to just install 'adb' package instead whole android SDK.
BTW FYI (also for reference for implementation e.g.), the app Aegis can do that thing: import from many of these apps. With root, of course. :smile: (but works flawlessly)
Got it, Aegis has the reference code here: https://github.com/beemdevelopment/Aegis/blob/master/app/src/main/java/com/beemdevelopment/aegis/importers/FreeOtpImporter.java
See wiki in this repo. There is a link to a script that can convert the extracted tokens.xml to a json file which can then be imported in FreeOTPPlus.
Also, you can read the article here: https://externalmem.wordpress.com/2021/03/05/freeotp-export-secrets-and-migrate-to-freeotpplus/
No rooting is needed.
Hope this helps!
I tried this guide: https://externalmem.wordpress.com/2021/03/05/freeotp-export-secrets-and-migrate-to-freeotpplus/
but got the error: Failed to import JSON. The file is malformed.
😅
I tried this guide: https://externalmem.wordpress.com/2021/03/05/freeotp-export-secrets-and-migrate-to-freeotpplus/
but got the error:
Failed to import JSON. The file is malformed.
sweat_smile
Did you look at the json? anything looks suspicious in there? did you try to convert again?
@sid-the-sloth yes, nothing looks too strange, and converted again ;)
Had the same issue after following the same guide. The error was caused by two consecutive trailing commas near the end of the JSON file. After removal of those, FreeOTPPlus could read the JSON file.