FreeOTPPlus icon indicating copy to clipboard operation
FreeOTPPlus copied to clipboard

[Feature Request] import FreeOTP's tokens.xml

Open wwwurst opened this issue 4 years ago • 14 comments

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.

wwwurst avatar Aug 03 '19 15:08 wwwurst

Came here to ask for exactly this! 😃

KeronCyst avatar Aug 07 '19 01:08 KeronCyst

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.

helloworld1 avatar Aug 11 '19 04:08 helloworld1

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 +).

KeronCyst avatar Aug 16 '19 18:08 KeronCyst

That's true. But the root user is only a very small percentage of users.

helloworld1 avatar Aug 17 '19 04:08 helloworld1

+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.

pavelpicka avatar Sep 04 '19 11:09 pavelpicka

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.

KeronCyst avatar Sep 05 '19 15:09 KeronCyst

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.

pavelpicka avatar Sep 06 '19 11:09 pavelpicka

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)

rugk avatar Sep 23 '19 18:09 rugk

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

helloworld1 avatar Sep 25 '19 04:09 helloworld1

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!

sid-the-sloth avatar Mar 06 '21 16:03 sid-the-sloth

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. 😅

PeterDaveHello avatar Jan 12 '22 08:01 PeterDaveHello

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 avatar Jan 12 '22 16:01 sid-the-sloth

@sid-the-sloth yes, nothing looks too strange, and converted again ;)

PeterDaveHello avatar Jan 13 '22 17:01 PeterDaveHello

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.

davidlesieur avatar May 06 '22 15:05 davidlesieur