fingerprintd/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 6c4622afff Capture works: idle floor 133, matching the reference measurement
The finger-free path is complete. On the phone, from a cold start:

    client env -> loader -> trustlet -> config -> sensor rail -> init chain
    calibrating the idle floor (5 samples)
      idle 1/5: rc=-11 metric=133
      ...
    idle floor = 133, finger threshold = 266

133 is the number the journal records for this sensor, so the port reproduces
the reference measurement rather than merely producing one.

Two things had to be right at once, and the first attempt had neither.

The memory region: CAPTURE_IMAGE reads an output-buffer pointer out of
payload+0x00, and QTEE only patches an address there if the location is named
in embeddedBufOffsets and the region handed over in an object slot. The
instrumented dump shows it working -- payload+0x00 came back holding
0x088db98000 -- which is what made the remaining failure legible instead of
mysterious.

And two fields inside the capture payload that an all-zero request leaves
unset: a frame count at +0x0c and a branch selector at +0x10. Selector 0
returns metric 0. Sending zeros gets -201 with the region correctly attached,
which reads exactly like a broken region and is not one. They are named
constants now, with the note that the metric is PER FRAME so a threshold
calibrated at one frame count means nothing at another.

The flags word at payload+0x18 stays past the declared length of 0x14 on
purpose: the trustlet range-checks that length to exactly 0x14 and reads the
flags anyway.

--verbose keeps the region and reqOut dumps, which is what turned this from
guesswork into reading.
2026-09-02 18:27:35 +02:00
..
Engine Port the capture loop, and make the per-press rate re-derivable 2026-09-02 17:19:45 +02:00
Rpmb Port the RPMB listener's wire format, guard included 2026-09-02 16:48:57 +02:00
Sensor Own the sensor rail, and run the init chain against it 2026-09-02 18:24:12 +02:00
Sfs Initial commit: the gpfile wire format, pinned by two real containers 2026-09-02 16:02:46 +02:00
Store Drop the gid 60 compatibility path 2026-09-02 17:28:47 +02:00
Ta Capture works: idle floor 133, matching the reference measurement 2026-09-02 18:27:35 +02:00
Tee Reach QTEE: credentials, client env and the app loader, with no QCBOR 2026-09-02 18:02:28 +02:00