fingerprintd/interfaces
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf e03ce4ae5a UPDATE_TEMPLATE: the command stock learns with, and the field that was killing it
Stock rewrites the stored template on every successful press. Its post-match
loop is QUERY_FINGER_STATUS, CAPTURE_IMAGE, 0x1015 UPDATE_TEMPLATE while the
finger stays down, with no REPORT_EVENT in it -- so the matcher does not re-run
and the verdict cannot change. Forty-six of those against eighty-six captures in
one reference session, and the stored body measurably grows: 333278 bytes at
enrolment, 360822 at the next session's load, 371734 after one authentication
session. This daemon sent none of them.

The command shares REPORT_EVENT's event context. The stock wrapper memsets 732
bytes and writes six fields: a zero byte at +0x2a4, the scan-slot count, a zero
word, the count of frames folded so far in this press, a flags word of
0x00080000 with bit 6 set on the frame whose event was FingerTouched, and a zero
at +0x2d8. Declared length 0x2dc.

+0x2d8 is the one that matters, and it matters by staying zero. The dispatcher
stub reads it after the handler returns and only if it is non-zero does it read
+0x2dc and make that the response length. Every earlier attempt in this project
set both fields and varied the declared length across 0x2e0, 0x400 and 0x1000;
all of them answered -90, the trustlet gone, and the conclusion recorded was
"do not retry until a template is loaded". A loaded template was necessary but
not sufficient. The stock HAL sets neither field.

Measured on the device with two templates loaded and no finger: both branches
answer rc=0 and ENUMERATE still reports 2, so the app did not fault.

Those fields are little endian, assembled low-address-first by the handler. An
earlier reading called them big endian, off the bfi order, and was wrong.

Bit 6 selects which algorithm entry runs: clear takes libfp_template_x_update,
set takes the other, which also reads the scan-slot count.
2026-09-03 17:45:27 +02:00
..
Fingerprintd-Engine.cppm Detect the finger at 1.5x the floor, not 2x -- catch the landing frame 2026-09-03 00:15:37 +02:00
Fingerprintd-Rpmb.cppm Port the RPMB listener's wire format, guard included 2026-09-02 16:48:57 +02:00
Fingerprintd-Sensor.cppm Own the sensor rail, and run the init chain against it 2026-09-02 18:24:12 +02:00
Fingerprintd-Sfs.cppm Initial commit: the gpfile wire format, pinned by two real containers 2026-09-02 16:02:46 +02:00
Fingerprintd-Store.cppm Drop the gid 60 compatibility path 2026-09-02 17:28:47 +02:00
Fingerprintd-Ta.cppm UPDATE_TEMPLATE: the command stock learns with, and the field that was killing it 2026-09-03 17:45:27 +02:00
Fingerprintd-Tee.cppm Reach QTEE: credentials, client env and the app loader, with no QCBOR 2026-09-02 18:02:28 +02:00
Fingerprintd.cppm Own the sensor rail, and run the init chain against it 2026-09-02 18:24:12 +02:00