Giter Site home page Giter Site logo

Restore not working about andotp HOT 13 CLOSED

andotp avatar andotp commented on May 9, 2024
Restore not working

from andotp.

Comments (13)

tibu avatar tibu commented on May 9, 2024 1

Just an FYI for anyone finding this issue from Google. The same is happening when you copy the app with some phone cloner from one phone to another. So after an app data removal you can start importing the config. (BTW maybe if would be worth to do some in-app detection for this.)

from andotp.

flocke avatar flocke commented on May 9, 2024

I'm gonna test it on Oreo soon and see if this always happens.
If not it could be related to #16.

from andotp.

flocke avatar flocke commented on May 9, 2024

It seems not to be thing with Oreo, I just tested it in a virtual machine and everything worked there.
@AnkS4 Could you try to manually add an entry, exit the app and open it again to see if the entry is still there?

from andotp.

AnkS4 avatar AnkS4 commented on May 9, 2024

Yes, it's disappearing

from andotp.

flocke avatar flocke commented on May 9, 2024

Seems like a duplicate of #16, could you upload me a logcat of manually adding the entry to make sure?

from andotp.

AnkS4 avatar AnkS4 commented on May 9, 2024

Did. https://pastebin.com/PCdjhWRh

from andotp.

flocke avatar flocke commented on May 9, 2024

Thank you, could you get me a full logcat as well? You seem to only upload the output matching "andotp", I'm interested if those lines appear as well:

W/System.err(22850): java.security.ProviderException: Failed to load generated key pair from keystore
W/System.err(22850): 	at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:518)
W/System.err(22850): 	at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:470)

from andotp.

AnkS4 avatar AnkS4 commented on May 9, 2024

https://pastebin.com/AsSqmK2r

from andotp.

flocke avatar flocke commented on May 9, 2024

It's not exactly the same error as #16, but it also seems to be a problem with the system keystore.

09-15 14:49:27.978 W/System.err(6957): java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.exist(java.lang.String, int)' on a null object reference
09-15 14:49:27.978 W/System.err(6957): 	at android.security.KeyStore.contains(KeyStore.java:210)
09-15 14:49:27.978 W/System.err(6957): 	at android.security.keystore.AndroidKeyStoreSpi.engineContainsAlias(AndroidKeyStoreSpi.java:813)
09-15 14:49:27.978 W/System.err(6957): 	at java.security.KeyStore.containsAlias(KeyStore.java:1293)
09-15 14:49:27.978 W/System.err(6957): 	at org.shadowice.flocke.andotp.Utilities.SecretKeyWrapper.<init>(SecretKeyWrapper.java:64)
09-15 14:49:27.978 W/System.err(6957): 	at org.shadowice.flocke.andotp.Utilities.EncryptionHelper.loadOrGenerateKeys(EncryptionHelper.java:101)
09-15 14:49:27.978 W/System.err(6957): 	at org.shadowice.flocke.andotp.Utilities.DatabaseHelper.saveDatabase(DatabaseHelper.java:49)
09-15 14:49:27.978 W/System.err(6957): 	at org.shadowice.flocke.andotp.View.EntriesCardAdapter.saveEntries(EntriesCardAdapter.java:102)
09-15 14:49:27.978 W/System.err(6957): 	at org.shadowice.flocke.andotp.Activities.MainActivity$2.onClick(MainActivity.java:122)
09-15 14:49:27.978 W/System.err(6957): 	at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
09-15 14:49:27.978 W/System.err(6957): 	at android.os.Handler.dispatchMessage(Handler.java:105)
09-15 14:49:27.978 W/System.err(6957): 	at android.os.Looper.loop(Looper.java:164)
09-15 14:49:27.978 W/System.err(6957): 	at android.app.ActivityThread.main(ActivityThread.java:6541)
09-15 14:49:27.978 W/System.err(6957): 	at java.lang.reflect.Method.invoke(Native Method)
09-15 14:49:27.978 W/System.err(6957): 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
09-15 14:49:27.978 W/System.err(6957): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

I'm gonna look into it, but I assume it is like #16 and has to be fixed in the ROM.

from andotp.

flocke avatar flocke commented on May 9, 2024

@AnkS4 Just one followup question, did you try clearing the apps data before restoring?

from andotp.

AnkS4 avatar AnkS4 commented on May 9, 2024

ROM was buggy, it was rebooting when clearing app data. Back to Nougat & everything works fine.

from andotp.

flocke avatar flocke commented on May 9, 2024

OK, good it cleared up.
If you flash a new ROM and wipe the cache but leave the apps data then this will happen since the key in the Android KeyStore is missing but the encrypted data is still present.

from andotp.

flocke avatar flocke commented on May 9, 2024

@tibu Yes, this is due to the fact that the encryption keys for the database are tied to your phones hardware if you use the Android KeyStore encryption. There is a warning when you first setup the app and choose the KeyStore encryption that you can not use Titanium backup or similar apps.

from andotp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.