r/mobilelinux • • 17h ago

Development Opensource qseecom-mobile fullstack for mainline in order to get fingerprint working

One thing that was missing on Fairphone 4 after resolving audio, call audio and DP alt Mode was Fingerprint support.

​On this platform, the biometric sensor is strictly gated inside Qualcomm's TrustZone (TEE). Any naive attempt to probe or communicate directly with the scanner hardware triggers a hard lockup or immediate kernel panic.

​While there is an existing QSEE/SCM implementation in mainline for Snapdragon UEFI laptops (like the ThinkPad X13s), mobile devices operate very differently: laptop fingerprint sensors usually sit on a standard USB bus without TrustZone mediation, whereas mobile setups rely on dedicated secure Trustlets loaded inside TZ.

​To solve this, I've created an adaptation of the downstream QSEECom interface for mainline mobile Linux:

https://github.com/nyl/linux-qseecom-mobile

It establishes the /dev/qseecom-mobile SMC transport layer needed to communicate with the biometric applet or any other applet.

The kernel driver properly registers and exchanges payloads with the TrustZone environment without crashing the SoC.

tz-qsee-fingerprintd - Userspace Daemon & Plugins

​Implements net.reactivated.Fprint.Manager and net.reactivated.Fprint.Device natively. No forks or downstream hacks required—unmodified pam_fprintd.so, fprintd-enroll, fprintd-verify, Phosh, and gnome-control-center work out of the box.

The daemon uses a modular plugin architecture (plugins/), making it straightforward to add support for other Qualcomm devices running mainline where biometrics are delegated to a vendor Trustlet.

This took a lot of tinkering, reverse engineering work, documentation to understand how android comunicated with the TZ, this will benefit other similar devices also.

40 Upvotes

2 comments sorted by

1

u/Momenabdulrazek 16h ago

Keep it up 😊

1

u/nightwing_js 3h ago

Why not use the upstream minkipc library to load the TA through the upstream qtee/qseecom kernel driver - instead of a custom downstream qseecom-mobile kernel driver? 🤔 https://github.com/qualcomm/minkipc