No description
  • C 81.2%
  • Nix 16.9%
  • Makefile 1.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-03 13:50:41 -05:00
flake.lock initial commit 2026-12-03 13:50:41 -05:00
flake.nix initial commit 2026-12-03 13:50:41 -05:00
LICENSE initial commit 2026-12-03 13:50:41 -05:00
Makefile initial commit 2026-12-03 13:50:41 -05:00
module.nix initial commit 2026-12-03 13:50:41 -05:00
package.nix initial commit 2026-12-03 13:50:41 -05:00
qseecom-supplicant.c initial commit 2026-12-03 13:50:41 -05:00
qseecom-supplicant.service initial commit 2026-12-03 13:50:41 -05:00
README.md initial commit 2026-12-03 13:50:41 -05:00

qseecom-supplicant

What Qualcomm QSEE trusted apps call back into, for Linux's QSEECOM TEE driver (wrobelda/linux qcom-qseecom-tee). It's the part of Android's qseecomd they need, the way tee-supplicant is for OP-TEE.

Trusted apps reach the normal world through listeners, and this serves three:

  • 10, the file system. Open, read, write, seek and so on, for the app's Android paths.
  • 28672, the GP file system, where apps keep their sealed objects.
  • 8192, RPMB, the UFS Replay Protected Memory Block. Gatekeeper, in keymaster64, keeps its password handles and rollback counter there. The secure world MACs every frame, so this only moves frames between it and the RPMB well-known LUN, with SCSI SECURITY PROTOCOL IN/OUT.

The Android paths apps ask for are served from below a root directory. It also loads the apps it's given, and keeps them loaded while it runs. Apps the firmware loads itself, like keymaster64, are served all the same.

qseecom-supplicant <root> <firmware dir> [app...]

An app is loaded as <name>.mdt and its .bNN segments, from the firmware directory: the kernel fetches them with request_firmware(), so the firmware search path is pointed there while loading.

It came out of getting the OnePlus 6T's in-display fingerprint sensor working, whose app (gfp9508) and libfprint driver need it, but nothing in it is specific to that.

Using it

On NixOS, import the flake's module and turn it on:

imports = [ qseecom-supplicant.nixosModules.default ];
services.qseecom-supplicant = {
  enable = true;
  apps = [ "gfp9508" ];
};
  • root, where apps keep their data, /var/lib/qseecom by default. Under /var/lib, it's the service's state directory.
  • firmwareDirectory, where the apps are, the system's firmware by default.

Elsewhere, make install installs it and a systemd unit. Set QSEECOM_APPS in the unit to the apps to load, and if they aren't in /lib/firmware, change its firmware directory.

Only one supplicant can run at a time: the driver has one queue of requests, so two would take each other's.

Limitations

  • RPMB is only reached on UFS, through the /dev/bsg/*:49476 node, with 8192 sectors and one frame per reliable write, rather than read from the device's descriptors.
  • File system operations nothing has asked for yet (stat, directories, links, free space) are refused.

License

GPL-2.0-only. The listeners and the RPMB bridge come from gfharness in wrobelda/goodix-fp-spi-linux.