Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore from backup does nothing #324

Closed
SNMetamorph opened this issue Apr 20, 2023 · 5 comments
Closed

Restore from backup does nothing #324

SNMetamorph opened this issue Apr 20, 2023 · 5 comments

Comments

@SNMetamorph
Copy link

I'm trying to move codes from one to another phone. But when I'm writing valid master password on second phone, just nothing being imported. Also I don't remember writing any master password on first phone.

@justin-stephenson
Copy link
Contributor

On upgrade to FreeOTP 2.X you should have been prompted to create a master backup password through a wizard.

Please provide logcat logs from the device which covers the failing restore operation.

@SNMetamorph
Copy link
Author

This happens, after I wrote master password and press Ok, logcat:

04-20 21:29:45.567   566   566 I keystore2: keystore2::security_level: In import_key. 10266, Some("masterKey")
04-20 21:29:45.568   566   566 I keystore2: keystore2::database: In store_new_key "masterKey", uid=10266, cert=false, cert_chain=false rebound=true
04-20 21:29:45.571   566   566 E keystore2: keystore2::error: Rc(ResponseCode(7)), "In get_key_entry, while trying to load key info. 10266, Some(\"6dxx8f90-xxxx-4b8a-9825-460xxxxef9xx\")"

@SNMetamorph
Copy link
Author

So I think previous log isn't full, I found another info:

04-20 21:43:16.437 21322 21322 E Adapter : Exception
04-20 21:43:16.437 21322 21322 E Adapter : javax.crypto.AEADBadTagException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
04-20 21:43:16.437 21322 21322 E Adapter :      at java.lang.reflect.Constructor.newInstance0(Native Method)
04-20 21:43:16.437 21322 21322 E Adapter :      at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
04-20 21:43:16.437 21322 21322 E Adapter :      at com.android.org.conscrypt.OpenSSLAeadCipher.throwAEADBadTagExceptionIfAvailable(OpenSSLAeadCipher.java:320)
04-20 21:43:16.437 21322 21322 E Adapter :      at com.android.org.conscrypt.OpenSSLAeadCipher.doFinalInternal(OpenSSLAeadCipher.java:371)
04-20 21:43:16.437 21322 21322 E Adapter :      at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:374)
04-20 21:43:16.437 21322 21322 E Adapter :      at javax.crypto.Cipher.doFinal(Cipher.java:2056)
04-20 21:43:16.437 21322 21322 E Adapter :      at org.fedorahosted.freeotp.encryptor.EncryptedKey.decrypt(EncryptedKey.java:59)
04-20 21:43:16.437 21322 21322 E Adapter :      at org.fedorahosted.freeotp.TokenPersistence.restore(TokenPersistence.java:209)
04-20 21:43:16.437 21322 21322 E Adapter :      at org.fedorahosted.freeotp.main.Adapter.restoreTokens(Adapter.java:265)
04-20 21:43:16.437 21322 21322 E Adapter :      at org.fedorahosted.freeotp.main.Activity$5.onClick(Activity.java:404)
04-20 21:43:16.437 21322 21322 E Adapter :      at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
04-20 21:43:16.437 21322 21322 E Adapter :      at android.os.Handler.dispatchMessage(Handler.java:106)
04-20 21:43:16.437 21322 21322 E Adapter :      at android.os.Looper.loopOnce(Looper.java:226)
04-20 21:43:16.437 21322 21322 E Adapter :      at android.os.Looper.loop(Looper.java:313)
04-20 21:43:16.437 21322 21322 E Adapter :      at android.app.ActivityThread.main(ActivityThread.java:8669)
04-20 21:43:16.437 21322 21322 E Adapter :      at java.lang.reflect.Method.invoke(Native Method)
04-20 21:43:16.437 21322 21322 E Adapter :      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
04-20 21:43:16.437 21322 21322 E Adapter :      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

@SNMetamorph
Copy link
Author

Duplicate of #283

@justin-stephenson
Copy link
Contributor

Closing this as duplicate, if you have any insight to add to #283 then please do so as I have yet to be able to reproduce this issue - thus making it very challenging to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants