-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fingerprint service fails to load on XZ3 #76
Comments
sonyxperiadev/vendor-sony-oss-fingerprint@f1eb193 I wouldn't be surprised if this is related, and/or sonyxperiadev/device-sony-common#743 + sonyxperiadev/device-sony-tama#87 Unfortunately your log omits "vital" lines before it from the keymaster tzapp load |
Thanks for help and very fast response! As I am not sure what info is required, I have sent the log by email. Hopefully, it will get through. |
Note that the code used here is from https://github.com/sailfishos-sony-tama/vendor-sony-oss-fingerprint/commits/dtap, which has your patch incorporated. However, failure has been reported with the version that I distributed originally as well (https://github.com/sonyxperiadev/vendor-sony-oss-fingerprint/tree/ab0d04393c95bb1436f61a65b5a8f9829bd5ad68). Although, I don't have the full log for the latter one, but can ask for it. |
I am merely looking for preceding log lines from the same process/pid, containing keymaster start:
These look just fine. There is a vague memory of a similar issue where an app seems to load fine but immediately errors out, as it hasn't loaded at all. But the fact that these users can decrypt and use their device indicates keymaster + QSEE operate as normal. Let's try to pin this issue down to something more specific:
|
To my knowledge, XZ2 works; XZ2c works; XZ3 fails. When: I happened to have a log from a user from the original version as well - it fails the same way. Sending it to you by email. So, on XZ3, as we had no fingerprint support before, we did not notice it was crashing from the beginning. SFOS port is using android-9.0.0_r46 as a base. That's where XZ3 users complained regarding broken FPC. One of the users was asked to use recent https://github.com/sailfishos-sony-tama/vendor-sony-oss-fingerprint/commits/dtap version. That's the version I am using on Akari with your delete-all fix and I am testing double-tap-to-wake patch that I wrote for it. This version has your changes in /firmware related to FPC. Note that, in Akari, I have had original android-9.0.0_r46 and the latest FPC version working fine. In addition, SFOS base is still android-9.0.0_r46, even with the newer vendor-sony-oss-fingerprint. /firmware: no, nothing is included. unless user, as in this case, used https://github.com/sailfishos-sony-tama/vendor-sony-oss-fingerprint/commits/dtap. But that's all which has something from recent times. revisions working: android-9.0.0_r46 XZ2, XZ2c; not working XZ3 |
I have no explanation as to why FPC doesn't work at all on the XZ3, it's the first thing I invested time in since getting the device :) In any case our HAL is masking the issue by passing a needlessly empty key to the FPC tzapp, the actual culprit is Keymaster itself failing with hardware/libhardware/include/hardware/keymaster_defs.h
418: KM_ERROR_KEY_NOT_YET_VALID = -24, I have yet to fully understand how this "key" pulled out of KM is associated to our application, and what it actually means. Assuming the KM TZ returns the same error codes as the userspace libhardware module, there's a mismatch in time: this key is not yet allowed to be used. Why, I have no idea yet :| |
Currently, I have 2 users confirming the same on XZ3. It may well be 100% of SFOS-XZ3 users, no idea on how many have this device :) It is possible that some service is not started on SFOS which starts on AOSP as well as something in the order of the start. I wonder if you have some logcat from AOSP9 days to compare with... |
Perhaps that may be valuable info for you... Translated: are you starting km3 or km4 service? |
@kholk Thanks, one would almost forget...
Checked that one already 😉 But yes, it is likely handled in a different way (inside SFOS) as it is completely fine on AOSP. Again, I don't exactly know what kind of key the FPC HAL requests here, who "put it there" or granted this access etc etc... Will have to dive into the KM API for that. |
@kholk and @MarijnS95, thank you, that could be the key. We had few issues with km4 devices and there is a workaround for them. I will ask users to test and then report back. |
@kholk and @MarijnS95: Issue was fixed by starting https://github.com/erfanoabdi/fake_crypt on boot. XZ3 user has reported FP working now. I will have to polish a bit few things and will close it when all is ready. |
AHA! YAY! I knew it was km4. We had the same issues on android when we were early porting this device :D I'm happy it worked on sfos too :D |
Fixed now, thanks again! :) |
XZ3 (Akatsuki) users have issues with AOSP FPC HAL with
Looks like something is wrong with the keymaster response code (on akari its 0). Corresponding XZ3 crash report
Here, -updated version corresponds to the current master of https://github.com/sonyxperiadev/vendor-sony-oss-fingerprint/; same response from the earlier AOSP9 version as well.
@MarijnS95, any ideas?
The text was updated successfully, but these errors were encountered: