PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.8k stars 389 forks source link

KeePass does fully lock my database all the time #2023

Open thn80 opened 2 years ago

thn80 commented 2 years ago

Hi,

for unlocking my database I am using 2FA (Yubikey + Passphrase). Some weeks ago I was able to unlock my database via 2FA and, afterwards, simply using Quick Unlock via fingerprint until I closed the database manually or until I did an Keepass2Android update. However, since a few weeks I unlock my database via 2FA (Yubikey + Passphrase) and then I can also simply use the Quick Unlock, but only for a short time (the exact duration I don't know, yet...maybe a few minutes or few hours), after that time Keepass seems to automatically close my database and I have to do the full 2FA (Yubikey + Passphrase) again, which is very annoying. I already played with the settings of Keepass2Android, without success. Can someone tell me, what I have to change to avoid the automatic closing of the database?

Thanks.

thn80 commented 2 years ago

Any ideas?

ksuamel commented 2 years ago

I have a similar issue. Previously, I just had a master password + key file and I was able to quick unlock regularly. After changing over to master password + key file + yubikey challenge-response, I rarely get the quick unlock UI. It even resets the database back to "password" and I have to change that mode back into password + key file + challenge-response.

PhilippLoewen commented 2 years ago

I have the same problem but I'm only using a Password + keyfile. I tried fiddling with the settings but no combination seems to work.

thn80 commented 2 years ago

The last days I found that it could be a problem with the way Android handles the Apps regarding energy saving. In Android under Settings --> Apps --> Keepass2Android --> Battery (I hope I translated correctly, in German it is "Akku") --> Change the setting here to tell Android to not restrict the app from using the battery.

I read somewhere (to be honest, I cannot remember where it was), that with this option enabled, Android closes Keepass2Android and, therefore, you need a full unlock on the next use of the App. At least for me this seems to solve the problem (tested for a few days now).

PhilippLoewen commented 2 years ago

@thn80 Unfortunately I had already done that and the problem is still occurring. Androids battery optimization was one of the first things I blamed. Maybe my S22 Ultra is ignoring the setting under certain condition.

Battery (I hope I translated correctly, in German it is "Akku")

Yes, it's battery on English android.

ksuamel commented 2 years ago

For me, enabling unrestricted access to battery seemed to fix the problem. Thanks @thn80 !

thn80 commented 2 years ago

The last days my phone got a latest Android update and the problem seems to be back. My database is locking again, even with deactivated energy savings for Keepass2Android.

Any further ideas on how to solve the issue?

DeeScully commented 2 years ago

The last days I found that it could be a problem with the way Android handles the Apps regarding energy saving. In Android under Settings --> Apps --> Keepass2Android --> Battery (I hope I translated correctly, in German it is "Akku") --> Change the setting here to tell Android to not restrict the app from using the battery.

I read somewhere (to be honest, I cannot remember where it was), that with this option enabled, Android closes Keepass2Android and, therefore, you need a full unlock on the next use of the App. At least for me this seems to solve the problem (tested for a few days now).

My phone had a software update a few days ago and afterward I was experiencing this issue.

Your advice to change the app battery usage setting to unrestricted seemed to fix the issue for me. I hope it stays that way going forward. Thank you.