androidtoken icon indicating copy to clipboard operation
androidtoken copied to clipboard

No documentation of where the token's secret keys are stored

Open jkyiv opened this issue 7 years ago • 4 comments

My phone's OS got messed up, and after reloading a the LineageOS ROM while preserving my files, Android Token no longer sees its database/list of secret keys, so I have lost access to my tokens. I searched but can't find documentation to aid users like me to find what data directory holds the secret keys.

Please add documentation of where on an Android device the secret keys are stored.

Please also add a method for importing a key library into a new installation of Android Token.

Thanks!

jkyiv avatar Aug 26 '17 09:08 jkyiv

I searched in source code. I found a SQLite database inside the app.

https://github.com/markmcavoy/androidtoken/blob/master/src/main/java/uk/co/bitethebullet/android/token/TokenDbAdapter.java

At the line 64, you can see the SQL code to create database. I don't know yet how to access to this database outside the app. I don't know if it is possible.

Dolu89 avatar Sep 21 '17 15:09 Dolu89

Coming from another TOTP app with a similar problem (couldn't access the keys stored), it appears to be a known issue w/ LineageOS (see this).

barul42 avatar Sep 21 '17 15:09 barul42

I know this issue is a bit old, but I needed a backup of my tokens today ;)

So I searched the database with some adb commands like this:

adb root
adb shell
find / -name '*bitethebullet.android.token*'

In the end, my data was located within /data/data and I got it with this command: adb pull /data/data/uk.co.bitethebullet.android.token

mcmilk avatar Oct 31 '18 11:10 mcmilk

the next version of the app which I'm currently working on will allow exporting of the secret from the UI

markmcavoy avatar Jul 05 '20 14:07 markmcavoy