beemdevelopment / Aegis

A free, secure and open source app for Android to manage your 2-step verification tokens.
https://getaegis.app
GNU General Public License v3.0
9.03k stars 380 forks source link

Biometric prompt doesn't automatically show if app is opened on Galaxy Z Flip 5 cover screen #1280

Closed jextrevor closed 7 months ago

jextrevor commented 8 months ago

Version

2.2.2

Source

Google Play

Vault encryption

Yes (with biometric unlock)

Device

Samsung Galaxy Z Flip 5

Android version

14

ROM

No response

Steps to reproduce

Set up biometric unlock for your vault. Make sure that the app is not currently open. Make sure that the app is added to the list of apps displayed on the Good Lock Launcher Widget (Good Lock -> Life Up -> MultiStar -> I :heart: Galaxy Foldable -> Launcher Widget).

Launch the app on the Z Flip 5's cover screen using the Launcher Widget.

What do you expect to happen?

I expected the app to automatically show a biometric prompt upon me launching the app.

What happens instead?

Observe that a biometric prompt is not started by default, and that you have to select the "Use biometrics" button to get one to show up.

Log

debug2.log

alexbakker commented 7 months ago

It's very likely that this is a bug for Samsung to fix. The logs report the following immediately after Aegis' AuthActivity is started: BiometricPrompt: onError: 10, 0, meaning: BIOMETRIC_ERROR_USER_CANCELED. So Aegis actually does start the biometric prompt, but then something immediately dismisses it.

jextrevor commented 7 months ago

What should I do if Samsung refuses to fix this? Is there a way to slightly delay the biometric prompt? I'm wondering if it's some sort of race condition going on

alexbakker commented 7 months ago

You could give https://alexbakker.me/u/pzymgolur8.apk a shot if you'd like. It's based on the following patch that delays the biometric prompt by 2 seconds: https://github.com/alexbakker/Aegis/commit/ff528551ef9f39b49edd82e04333b9d220715359

You could also experiment with removing the following 2 lines: https://github.com/alexbakker/Aegis/blob/ff528551ef9f39b49edd82e04333b9d220715359/app/src/main/java/com/beemdevelopment/aegis/ui/AuthActivity.java#L265-L266

jextrevor commented 5 months ago

Samsung must have updated something, because the biometric prompt works as it did before