From 7e287da33683da9f15af6cb7fa713ad1755d977c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Tue, 3 Nov 2026 22:03:00 +0100 Subject: [PATCH 01/10] omamobile-fingerprint 0.1.16: know the Pixel 7 The Pixel 7's vendor image ships the 7 Pro's fingerprint files under the same names (g7.app, the Goodix HAL, the C++ Trusty KeyMint and Gatekeeper, storageproxyd, trusty_apploader), and its stock dtbo has the 7 Pro's sensor node. What differs is the panel and the touchscreen. The runner fell back to cheetah on any board but the 9a. Detect google,gs201-panther and give it g7.app, the C++ KeyMint, its panel (1080x2400 at 60 Hz, ABL's panel name sdc-s6e3fc3-p10) and its touchscreen ("FocalTech FT3658"); the touchscreen name is now per phone. props-panther.conf sets ro.hardware=panther. extract-fingerprint-vendor takes -d panther with the 7 Pro's file list. On the Pixel 7 with this package's files copied by hand (not pacman -U), enrollment and unlock passed (device/panther/FINGERPRINT-PLAN.md, P5). test/all passes, and fails when panther's touchscreen name is changed. I used AI help (Claude) to work on this. --- packages/omamobile-fingerprint/install | 1 + .../lib/omamobile-fp-chroot | 17 ++++++++++++++--- .../lib/props-panther.conf | 5 +++++ packages/omamobile-fingerprint/test/all | 13 ++++++++++--- packages/omamobile-fingerprint/version | 2 +- tools/extract-fingerprint-vendor | 12 +++++++----- 6 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 packages/omamobile-fingerprint/lib/props-panther.conf diff --git a/packages/omamobile-fingerprint/install b/packages/omamobile-fingerprint/install index cbe06a891..58c8aec76 100755 --- a/packages/omamobile-fingerprint/install +++ b/packages/omamobile-fingerprint/install @@ -18,6 +18,7 @@ install -Dm755 lib/omamobile-fp-ctl "$l/omamobile-fp-ctl" install -Dm644 lib/props.conf "$l/props.conf" install -Dm644 lib/props-cheetah.conf "$l/props-cheetah.conf" install -Dm644 lib/props-tegu.conf "$l/props-tegu.conf" +install -Dm644 lib/props-panther.conf "$l/props-panther.conf" install -Dm644 prebuilt/omamobile-fp-shim.so "$l/omamobile-fp-shim.so" install -Dm755 prebuilt/omamobile-fp-bridge "$l/omamobile-fp-bridge" install -Dm644 vendor/systemd/system/omamobile-fp.service "$d/usr/lib/systemd/system/omamobile-fp.service" diff --git a/packages/omamobile-fingerprint/lib/omamobile-fp-chroot b/packages/omamobile-fingerprint/lib/omamobile-fp-chroot index b511a8fbb..cea779816 100755 --- a/packages/omamobile-fingerprint/lib/omamobile-fp-chroot +++ b/packages/omamobile-fingerprint/lib/omamobile-fp-chroot @@ -78,12 +78,16 @@ fp_device() { c=$(tr '\0' '\n' < /proc/device-tree/compatible 2>/dev/null || true) case $c in *google,zumapro-tegu*) echo tegu ;; + *google,gs201-panther*) echo panther ;; *) echo cheetah ;; esac } # From the board's compatible string; only test/preflight may override it DEVICE=$(fp_device) [[ ${OMAMOBILE_FP_TEST:-} == 1 ]] && DEVICE=${OMAMOBILE_FP_DEVICE:-$DEVICE} +# Our touchscreen driver's input device name (synaptics_tcm); panther's +# case replaces it. +TOUCH_NAME="Synaptics TouchComm Touchscreen" case $DEVICE in cheetah) TA=g7.app @@ -102,7 +106,16 @@ case $DEVICE in # ("On: WxH@Hz") and captures at pointer down, so the circle comes first PANEL=1080x2424 PANEL_HZ=120 PANEL_STATE="On: 1080x2424@120" LHBM_FIRST=1 PANEL_NAME=google-tg4c MAP_STORES=1 ;; - *) echo "omamobile-fp: unknown device '$DEVICE' (cheetah, tegu)" >&2; exit 1 ;; + panther) + # the Pixel 7: the 7 Pro's TA and HALs (its vendor image ships the same + # files), its own panel (ABL's exynos_drm.panel_name) and touchscreen + # (focaltech_ft3658); device/panther/FINGERPRINT-PLAN.md. + TA=g7.app + KEYMINT=/vendor/bin/hw/android.hardware.security.keymint-service.trusty + PANEL=1080x2400 PANEL_HZ=60 PANEL_STATE=on LHBM_FIRST=0 + PANEL_NAME=sdc-s6e3fc3-p10 MAP_STORES=0 + TOUCH_NAME="FocalTech FT3658" ;; + *) echo "omamobile-fp: unknown device '$DEVICE' (cheetah, tegu, panther)" >&2; exit 1 ;; esac PANEL_NAME=${OMAMOBILE_FP_PANEL_NAME:-$PANEL_NAME} PROPS_DEVICE=${OMAMOBILE_FP_PROPS_DEVICE:-/usr/lib/omamobile-fp/props-$DEVICE.conf} @@ -133,8 +146,6 @@ NSPID=$RUN/ns.pid # The UFS RPMB well-known LUN (stock storageproxyd: -r /dev/sg1). RPMB_LUN=49476 -# Our touchscreen driver's input device name (synaptics_tcm). -TOUCH_NAME="Synaptics TouchComm Touchscreen" # The bridge's socket directory on the host (root only); in the chroot it # is /dev/socket/omamobile-fp. SOCKDIR=$RUN/sock diff --git a/packages/omamobile-fingerprint/lib/props-panther.conf b/packages/omamobile-fingerprint/lib/props-panther.conf new file mode 100644 index 000000000..f9a2bf0ab --- /dev/null +++ b/packages/omamobile-fingerprint/lib/props-panther.conf @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: MIT +# The Pixel 7's properties for the fingerprint chroot, applied after +# props.conf: what Android's init would have set from the bootloader. +ro.boot.hardware.platform=gs201 +ro.hardware=panther diff --git a/packages/omamobile-fingerprint/test/all b/packages/omamobile-fingerprint/test/all index 3f14c39a9..8ab5ba84f 100755 --- a/packages/omamobile-fingerprint/test/all +++ b/packages/omamobile-fingerprint/test/all @@ -47,13 +47,19 @@ grep -c 'PANEL=1080x2424 PANEL_HZ=120 PANEL_STATE="On: 1080x2424@120" LHBM_FIRST grep -c -- '--lhbm-first "\$LHBM_FIRST"' lib/omamobile-fp-chroot >/dev/null || fail "the runner passes the circle order" # Under set -u, each phone's case sets every value the spawn line uses. cases=$(sed -n '/^case \$DEVICE in/,/^esac/p' lib/omamobile-fp-chroot) -for d in cheetah tegu; do - DEVICE=$d bash -uc "$cases"' - [[ -n $PANEL && -n $PANEL_HZ && -n $PANEL_STATE && -n $LHBM_FIRST ]]' || +for d in cheetah tegu panther; do + DEVICE=$d TOUCH_NAME=x bash -uc "$cases"' + [[ -n $PANEL && -n $PANEL_HZ && -n $PANEL_STATE && -n $LHBM_FIRST && -n $TOUCH_NAME ]]' || fail "$d: the case leaves a panel value unset" done grep -c '^ro.hardware=tegu$' lib/props-tegu.conf >/dev/null || fail "props-tegu.conf" grep -c '^ro.hardware=cheetah$' lib/props-cheetah.conf >/dev/null || fail "props-cheetah.conf" +grep -c '^ro.hardware=panther$' lib/props-panther.conf >/dev/null || fail "props-panther.conf" +# The Pixel 7: found by its board, the 7 Pro's TA, its own panel and touchscreen. +grep -c '\*google,gs201-panther\*) echo panther' lib/omamobile-fp-chroot >/dev/null || fail "panther not detected" +DEVICE=panther bash -uc "$cases"' + [[ $TA == g7.app && $PANEL == 1080x2400 && $PANEL_NAME == sdc-s6e3fc3-p10 && $TOUCH_NAME == "FocalTech FT3658" && $MAP_STORES == 0 ]]' || + fail "panther's TA, panel and touchscreen" grep -c '^ro.hardware=' lib/props.conf >/dev/null && fail "props.conf keeps a phone's ro.hardware" for f in lib/omamobile-tipc-probe lib/omamobile-fp-ctl; do python3 -c 'import ast, sys; ast.parse(open(sys.argv[1]).read())' "$f" || fail "python: $f" @@ -172,6 +178,7 @@ for f in usr/lib/omamobile-fp/omamobile-fp-chroot usr/lib/omamobile-fp/omamobile usr/lib/omamobile-fp/omamobile-fp-ctl \ usr/lib/omamobile-fp/props.conf usr/lib/omamobile-fp/omamobile-fp-shim.so \ usr/lib/omamobile-fp/props-cheetah.conf usr/lib/omamobile-fp/props-tegu.conf \ + usr/lib/omamobile-fp/props-panther.conf \ usr/lib/omamobile-fp/omamobile-fp-bridge usr/lib/systemd/system/omamobile-fp.service \ usr/lib/systemd/system/fprintd.service.d/omamobile-udfps.conf; do [[ -e $stage/$f ]] || fail "not staged: $f" diff --git a/packages/omamobile-fingerprint/version b/packages/omamobile-fingerprint/version index c34958a47..e8e277f2f 100644 --- a/packages/omamobile-fingerprint/version +++ b/packages/omamobile-fingerprint/version @@ -1 +1 @@ -0.1.15 +0.1.16 diff --git a/tools/extract-fingerprint-vendor b/tools/extract-fingerprint-vendor index e05c2088c..eec9bd40b 100755 --- a/tools/extract-fingerprint-vendor +++ b/tools/extract-fingerprint-vendor @@ -1,8 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: MIT # extract-fingerprint-vendor: build the fingerprint chroot's Android files for -# the Pixel 7 Pro (cheetah) or, with -d tegu, the Pixel 9a out of a Google -# factory image, on the user's own machine. +# the Pixel 7 Pro (cheetah), the Pixel 7 (-d panther) or, with -d tegu, the +# Pixel 9a out of a Google factory image, on the user's own machine. # # Fingerprint on Omarchy Mobile runs Google's own fingerprint HAL against the # Goodix trusted application (g7.app) in Trusty, inside a small chroot @@ -61,7 +61,7 @@ Usage: extract-fingerprint-vendor [-d DEVICE] [-o OUTDIR] [-w WORKDIR] [-f] SOUR SOURCE Google factory zip (DEVICE-*-factory-*.zip) or the image-DEVICE-*.zip inside it - -d NAME cheetah (default) or tegu + -d NAME cheetah (default), panther or tegu -o DIR output directory (default: ./out/fingerprint-vendor) -w DIR scratch directory for vendor.img and system.img, about 2.5 GB (default: a temp dir in \$TMPDIR) @@ -91,7 +91,9 @@ done shift $((OPTIND - 1)) [[ $# -eq 1 ]] || { usage >&2; exit 2; } case $DEVICE in - cheetah) ;; + # The Pixel 7's vendor image ships the 7 Pro's files under the same names + # (device/panther/FINGERPRINT-PLAN.md). + cheetah|panther) ;; tegu) # The Pixel 9a: the same Goodix HAL family against g7a.app, and the Rust # KeyMint (device/tegu/FINGERPRINT-PLAN.md). fp_utils.so and @@ -106,7 +108,7 @@ case $DEVICE in ) VENDOR_FILES=(firmware/g7a.app build.prop) ;; - *) die "unknown device '$DEVICE' (cheetah, tegu)" ;; + *) die "unknown device '$DEVICE' (cheetah, panther, tegu)" ;; esac SRC=$(readlink -f "$1") [[ -f "$SRC" ]] || die "no such file: $1" From 1f5f54debbfebce41971ecad1d1a70dba35045bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Tue, 3 Nov 2026 22:03:00 +0100 Subject: [PATCH 02/10] panther FINGERPRINT-PLAN: the 7 Pro's sensor, bring-up overlays and gates The Pixel 7's stock dtbo (board 0x30406) has the same goodixfp node, reset pin and LDO15S supply as the 7 Pro's 0x30306, and its vendor image the same trusted app and HALs. The plan records that evidence, what differs (Trusty not yet started on panther, the S6E3FC3 panel without local HBM in our driver, the FT3658 touchscreen), and the gates P1-P5 with their stop conditions. The overlays enable Trusty, then the sub-PMIC and the sensor, on a kernel with the panther fingerprint DT commit. Compiled with dtc and applied with fdtoverlay: they change exactly the three status properties, and the sensor overlay refuses a DTB without the commit. I used AI help (Claude) to work on this. --- device/panther/FINGERPRINT-PLAN.md | 102 ++++++++++++++++++ .../panther/overlays/fingerprint-sensor.dtso | 18 ++++ .../panther/overlays/fingerprint-trusty.dtso | 13 +++ 3 files changed, 133 insertions(+) create mode 100644 device/panther/FINGERPRINT-PLAN.md create mode 100644 device/panther/overlays/fingerprint-sensor.dtso create mode 100644 device/panther/overlays/fingerprint-trusty.dtso diff --git a/device/panther/FINGERPRINT-PLAN.md b/device/panther/FINGERPRINT-PLAN.md new file mode 100644 index 000000000..400032c5d --- /dev/null +++ b/device/panther/FINGERPRINT-PLAN.md @@ -0,0 +1,102 @@ + +# Fingerprint plan (panther / gs201): what the Pixel 7 shares with the 7 Pro + +Status (2026-11-03): **offline work only, nothing run on the phone for +fingerprint.** The sensor is the 7 Pro's; the panel and the touchscreen are +not. Kernel commit `1fa21bbc7` (branch `panther-huella`, on `panther-todo`) +describes the sensor, its supply and pins, all disabled; this repo adds the +two bring-up overlays and the Pixel 7 to `omamobile-fingerprint` and +`tools/extract-fingerprint-vendor`. The 7 Pro's plan and research +([FINGERPRINT-PLAN](../cheetah/FINGERPRINT-PLAN.md), +[FINGERPRINT-RESEARCH](../cheetah/FINGERPRINT-RESEARCH.md)) apply to +everything below unless this file says otherwise. + +## 1. The sensor: the same as the 7 Pro's + +Sources: the stock dtbo from the Pixel 7's OTA (CP3A.261005.002.A1), +decompiled: `dtbo22_id30406` (PANTHER MP, the one ABL picks on this phone, +`ro.boot.dtbo_idx 22`) against `dtbo12_id30306` (CHEETAH MP); the OTA's +`vendor.img` read with debugfs; the phone, read only. + +| What | Pixel 7 (panther) | Same as cheetah? | +|---|---|---| +| Sensor node | `goodixfp`, `compatible = "goodix,fingerprint"`, `interrupts = <2 0>` on `gpa9`, `fp-gpio-reset = <&gpp1 1 1>`, `spi-max-frequency = 1 MHz` (dtbo22 lines 4435-4446) | Yes: the fragment differs only in phandle numbers (dtbo12 4453-4464). All ten panther board dtbos (13-22) have the same node and reset pin | +| Reset pin | `gpp1-1`, function 1 (output), no pull (dtbo22 4419-4425) | Yes | +| Supply | S2MPG13 `LDO15S`, "L15S_UDFPS_AVDD", 2.5-3.3 V, `regulator-always-on` (dtbo22 1669-1677) | Yes, identical lines | +| Touch hook | `fps_touch_handler` (dtbo22 4447-4450) | Yes (our props.conf turns it off on both) | +| Trusted app | `/firmware/g7.app`, 13 537 619 bytes; `ro.vendor.fingerprint.ta.name=g7.app` (vendor `build.prop`) | Same name and loader; the bytes are not compared (no cheetah image on this computer) | +| HAL and Trusty services | `android.hardware.biometrics.fingerprint-service.goodix`, `gatekeeper-service.trusty`, `keymint-service.trusty` (C++), `storageproxyd`, `trusty_apploader`, `vndservicemanager`, `libgf_hal.so`, `fp_utils.so` | Same file names as the 7 Pro list in `tools/extract-fingerprint-vendor` | +| `fingerprint-goodix.rc` | apploader on `ro.vendor.trusty.storage.fs_ready=1`, then the HAL | Same flow | +| Partitions | `mfg_data` (sdd4, 6560 sectors), not blank: 35 525 of its 16-byte rows are non-zero; RPMB LUN `0:0:0:49476` present | As cheetah; whether `mfg_data` holds a valid calibration is not checked | +| Kernel config (running kernel) | `GOODIX_FP=m`, `TRUSTY=m` (+log, virtio, ipc), `CHR_DEV_SG=m`, `DMABUF_HEAPS_SYSTEM=y`, `ANDROID_BINDERFS=y`; `goodix-fp.ko` and the trusty modules installed | Yes | + +So no new sensor driver and no new TA: the 7 Pro's `goodix-fp`, Trusty +drivers, chroot, bridge and libfprint driver are the ones to use. + +## 2. What differs + +| Piece | Pixel 7 | Consequence | +|---|---|---| +| Trusty | `/trusty` is `disabled` in the running DT; no `/dev/trusty*`. The AoC does not start through it yet (on cheetah it does) | First SMCs into Trusty from our kernel on this phone: gate P2 | +| Sub-PMIC | Not described before `1fa21bbc7` (running regulators: `ldo*m` only) | The commit adds `pmic-2` with LDO15S only | +| Panel | Samsung S6E3FC3 (`panel-samsung-s6e3fc3`, `samsung,s6e3fc3-p10`), 1080x2400, ABL's `exynos_drm.panel_name=sdc-s6e3fc3-p10` | **Our driver has no local HBM** (its header: "Local HBM ... left out"); the backlight has no `local_hbm_mode`. Blocker for good captures: section 4 | +| Touchscreen | FocalTech FT3658 (`focaltech_ft3658`, input "FocalTech FT3658") | The runner looked only for the Synaptics name: now per device | +| `omamobile-fp-chroot` | Any board but the 9a ran as cheetah | Now detects `google,gs201-panther`: g7.app, C++ KeyMint, 1080x2400 at 60 Hz, `sdc-s6e3fc3-p10`, FT3658 (untested) | +| Sensor position | Not known here: the bridge asks the HAL (`getSensorProps`), which has its own per-device data | Check in P5 that the circle lands on the sensor | +| `tools/phone-provision` | Accepts cheetah and raven only | Google's files go in by hand until it learns panther | +| Factory image | Ángel has the OTA (payload), not the factory zip the extractor reads | Repack `vendor.img` + `system.img` as a zip and use `-f`, or get the factory zip (a download: Ángel's call) | + +## 3. Bring-up gates + +Rules from the 7 Pro, unchanged: nothing writes `persist`, `mfg_data` or the +RPMB without Ángel's explicit "yes" in that session; `storageproxyd`'s first +run (cheetah F4) is irreversible. Before any reboot: Vol- + Power, +`fastboot --set-active=b` (slot B's retry counter). The NV backup of +2026-11-03 exists (`tools/nv-backup -d panther`, 7 partitions, `--check` SAME). + +Kernel: `panther-huella` (= `panther-todo` + `1fa21bbc7`). Overlays apply +with `DTB_OVERLAYS="..."` in `device/panther/device.conf` (a local edit for +the test, never committed) before `bin/omamobile images`. + +**P1. New DTB, no overlay.** Expect: the phone as before; +`cat /proc/device-tree/fingerprint/status` = `disabled`; no `vdd_udfps` in +`/sys/class/regulator/*/name`. **Stop if** anything else changed (display, +touch, wifi, charging) or `fingerprint` is missing. + +**P2. Trusty (`DTB_OVERLAYS="fingerprint-trusty"`).** +`tools/fingerprint-capture --watchdog trusty-core`, then `trusty-log`, +`trusty-ipc`, `hotplug`. Expect as cheetah F2: "trusty version", "selected +api version", `/dev/trusty-ipc-dev0`, "refusing to take cpu 7 offline". +**Stop if** the phone hangs or resets (the watchdog feeder catches it), any +SError/panic, or the version line is missing: back to the previous images. + +**P3. Connect-only probe.** `omamobile-tipc-probe keymint gatekeeper +apploader` (connects and closes, sends nothing; never the storage proxy +port). Expect three "open". **Stop if** any fails: Trusty is up but not +serving. + +**P4. Sensor power (`DTB_OVERLAYS="fingerprint-trusty fingerprint-sensor"`).** +Check `vdd_udfps` appears with 0 users, then `tools/fingerprint-capture +--watchdog goodix`. Expect "goodix-fp ... supply switched", LDO15S 1 user +while `/dev/goodix_fp` is open, 0 after. **Stop if** any other rail changes +state (`regulator_summary` before and after), or LDO15S is not the one +switched. + +**P5. TA, HAL, enroll (the irreversible part: Ángel's "yes" first).** +Google's files from the Pixel 7's own image (`extract-fingerprint-vendor -d +panther`), then the 7 Pro's F3-F9 with the runner's stages. Expect "g7.app +loaded", "HAL/TA version is match", "Initialization successful". **Stop if** +the HAL reports a calibration error (the 9a's "spmt is not pass" / +CALIBRATION_NOT_READY): the calibration question is then panther's own. + +## 4. Open: local HBM on the S6E3FC3 + +The optical sensor reads the finger lit by the panel's local HBM circle. The +bridge drives it through `local_hbm_mode`; without it the bridge logs "LHBM +on refused" and captures run unlit, which is expected to fail or match +poorly (not measured). The command sequence is in Google's GPL +`panel-samsung-s6e3fc3-p10.c`, which is not on this computer: getting it is a +download, Ángel's call. With it, the work mirrors the 7 Pro's (`local_hbm_mode`, +`local_hbm_max_timeout`, `allow_lhbm`, off on blank/unprepare) plus an +`allow_lhbm` line for `panel_samsung_s6e3fc3` in +`omamobile-fingerprint-lhbm.conf`. diff --git a/device/panther/overlays/fingerprint-sensor.dtso b/device/panther/overlays/fingerprint-sensor.dtso new file mode 100644 index 000000000..ecb10a97a --- /dev/null +++ b/device/panther/overlays/fingerprint-sensor.dtso @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +/* + * Bring-up only (device/panther/FINGERPRINT-PLAN.md, gate P4): enable the + * sub-PMIC (only LDO15S, the sensor's supply, is described on panther) and + * the Goodix sensor node. Apply after fingerprint-trusty.dtso. The PERIC0 + * pin controller (the sensor's reset line, gpp1-1) is already on in the + * default DTB. Paths, not labels, so the base DTB needs no __symbols__. + */ +/dts-v1/; +/plugin/; + +&{/firmware/power-management/pmic-2} { + status = "okay"; +}; + +&{/fingerprint} { + status = "okay"; +}; diff --git a/device/panther/overlays/fingerprint-trusty.dtso b/device/panther/overlays/fingerprint-trusty.dtso new file mode 100644 index 000000000..863e1e046 --- /dev/null +++ b/device/panther/overlays/fingerprint-trusty.dtso @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +/* + * Bring-up only (device/panther/FINGERPRINT-PLAN.md, gate P2): enable the + * Trusty node, so the trusty modules can bind. Nothing on the Pixel 7 + * starts Trusty yet; the modules are loaded by hand. Paths, not labels, so + * the base DTB needs no __symbols__. + */ +/dts-v1/; +/plugin/; + +&{/trusty} { + status = "okay"; +}; From 14c46e2dc75d81aad6412c904ceb0a3c354d6006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Wed, 4 Nov 2026 15:24:40 +0100 Subject: [PATCH 03/10] omamobile-fingerprint 0.1.17: allow local HBM on the Pixel 7's panel The Pixel 7's S6E3FC3 panel gets local HBM in the kernel branch panther-lhbm, behind the same allow_lhbm module parameter as the 7 Pro's s6e3hc4. Add its line to omamobile-fingerprint-lhbm.conf; test/all checks it as it does the other two, and fails when it is removed. On the Pixel 7 the same line ran from a hand-written modprobe.d file, not this package's: the panel lit the circle and enrollment passed (P5). I used AI help (Claude) to work on this. --- packages/omamobile-fingerprint/test/all | 4 +++- .../vendor/modprobe.d/omamobile-fingerprint-lhbm.conf | 4 +++- packages/omamobile-fingerprint/version | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/omamobile-fingerprint/test/all b/packages/omamobile-fingerprint/test/all index 8ab5ba84f..ce21394c9 100755 --- a/packages/omamobile-fingerprint/test/all +++ b/packages/omamobile-fingerprint/test/all @@ -64,11 +64,13 @@ grep -c '^ro.hardware=' lib/props.conf >/dev/null && fail "props.conf keeps a ph for f in lib/omamobile-tipc-probe lib/omamobile-fp-ctl; do python3 -c 'import ast, sys; ast.parse(open(sys.argv[1]).read())' "$f" || fail "python: $f" done -# both panels keep their allow_lhbm line (the 7 Pro's s6e3hc4, the 9a's tg4c), +# the panels keep their allow_lhbm line (the 7 Pro's s6e3hc4, the 9a's tg4c, +# the 7's s6e3fc3), # read from the file the package ships, so CI checks it without the prebuilts lhbm=vendor/modprobe.d/omamobile-fingerprint-lhbm.conf [[ $(grep -c '^options panel_samsung_s6e3hc4 allow_lhbm=1$' "$lhbm") == 1 ]] || fail "s6e3hc4 allow_lhbm line missing" [[ $(grep -c '^options panel_google_tg4c allow_lhbm=1$' "$lhbm") == 1 ]] || fail "tg4c allow_lhbm line missing" +[[ $(grep -c '^options panel_samsung_s6e3fc3 allow_lhbm=1$' "$lhbm") == 1 ]] || fail "s6e3fc3 allow_lhbm line missing" # The bionic prebuilts are built on the computer with the Android toolchain # and never committed; a checkout without them (CI) checks the rest only. # The resume hook restarts fprintd after a wake, and stands aside where diff --git a/packages/omamobile-fingerprint/vendor/modprobe.d/omamobile-fingerprint-lhbm.conf b/packages/omamobile-fingerprint/vendor/modprobe.d/omamobile-fingerprint-lhbm.conf index 96ef4f1c0..ab8dc51e3 100644 --- a/packages/omamobile-fingerprint/vendor/modprobe.d/omamobile-fingerprint-lhbm.conf +++ b/packages/omamobile-fingerprint/vendor/modprobe.d/omamobile-fingerprint-lhbm.conf @@ -5,6 +5,8 @@ # omamobile-fp-bridge turns it on, during a touch on the sensor, and the # panel driver turns it off again after at most 3 s # (device/cheetah/FINGERPRINT-PLAN.md F7; the Pixel 9a's panel in -# device/tegu/FINGERPRINT-PLAN.md F6c-F10). +# device/tegu/FINGERPRINT-PLAN.md F6c-F10; the Pixel 7's panel in +# device/panther/FINGERPRINT-PLAN.md section 4). options panel_samsung_s6e3hc4 allow_lhbm=1 options panel_google_tg4c allow_lhbm=1 +options panel_samsung_s6e3fc3 allow_lhbm=1 diff --git a/packages/omamobile-fingerprint/version b/packages/omamobile-fingerprint/version index e8e277f2f..04c5555c6 100644 --- a/packages/omamobile-fingerprint/version +++ b/packages/omamobile-fingerprint/version @@ -1 +1 @@ -0.1.16 +0.1.17 From 80628e7a4ccf407cbc99fe9af76d71393ada626b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Wed, 4 Nov 2026 15:24:40 +0100 Subject: [PATCH 04/10] device-panther: blacklist sg and goodix_fp for the fingerprint runner omamobile-fp's unit loads goodix_fp and its runner loads sg when it needs the RPMB LUN; udev would otherwise load sg for every SCSI device (raw SG_IO nodes past the read-only guard) and goodix_fp whenever the sensor node is enabled. The lines and their reasons are the 7 Pro's. Unlike the 7 Pro's file, Trusty is not blacklisted. There the sound start (omamobile-aoc-start) loads it; this package has no such loader, so with the trusty_* lines nothing would create /dev/trusty-ipc-dev0 and omamobile-fp would be skipped by its condition. Trusty loads from the DT's /trusty node, as it did on the Pixel 7 where P5 passed. test/all checks that both modules stay blacklisted and that no trusty line is added, and fails either way. On the Pixel 7 this file, copied by hand to /usr/lib/modprobe.d (not pacman -U), went through a reboot: Trusty loaded from the DT, omamobile-fp started by itself and the finger unlocked the phone (P5). I used AI help (Claude) to work on this. --- packages/omamobile-device-panther/README.md | 1 + packages/omamobile-device-panther/install | 2 ++ packages/omamobile-device-panther/test/all | 8 ++++++++ .../vendor/modprobe.d/omamobile-fingerprint.conf | 15 +++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 packages/omamobile-device-panther/vendor/modprobe.d/omamobile-fingerprint.conf diff --git a/packages/omamobile-device-panther/README.md b/packages/omamobile-device-panther/README.md index 59291f7c2..450340033 100644 --- a/packages/omamobile-device-panther/README.md +++ b/packages/omamobile-device-panther/README.md @@ -15,6 +15,7 @@ Omarchy Mobile's first userspace package for the Google Pixel 7 (codename panthe | `bin/omamobile-wlan-mac`, `vendor/udev/rules.d/80-omamobile-wlan-mac.rules` | `/usr/bin`, `/usr/lib/udev/rules.d` | Gives the Wi-Fi link the MAC address the bootloader writes into the device tree, before NetworkManager takes it. Same as the Pixel 7 Pro | | `vendor/systemd/logind.conf.d/10-omamobile-power-key.conf` | `/usr/lib/systemd/logind.conf.d` | A short power press does not power the phone off. Same drop-in as the Pixel 7 Pro. The long press stays the PMIC reset | | `vendor/modprobe.d/omamobile-display.conf` | `/usr/lib/modprobe.d` | Lets `gs_dsim_cmd` send DCS packets to the panel (`allow_tx=1`), so the panel driver can set the brightness and turn the display off and on. The driver ships with sending off; brightness passed DISPLAY-PLAN gate D2 on the Pixel 7 | +| `vendor/modprobe.d/omamobile-fingerprint.conf` | `/usr/lib/modprobe.d` | Keeps `sg` and `goodix_fp` from autoloading: omamobile-fp loads them (the RPMB LUN, the sensor). Trusty is left to the DT's `/trusty` node, since this package has no sound start that loads it as the 7 Pro's does (device/panther/FINGERPRINT-PLAN.md) | | `vendor/systemd/sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd/sleep.conf.d` | Suspend means suspend-to-idle: the kernel offers `deep`, but Linux has no gs201 sleep sequence, and the phone doesn't wake from it. No hibernation. Same drop-in as the Pixel 7 Pro | | `bin/omamobile-sleep`, `vendor/systemd/system-sleep/omamobile` | `/usr/bin`, `/usr/lib/systemd/system-sleep` (a link to the script) | Unloads Wi-Fi before every suspend and reloads it through the guarded service after, unless `/etc/omamobile/wifi-keep-across-sleep` exists; after a wake that fails in the Wi-Fi device it goes back to unloading for the rest of the boot. Also logs the wake reason and restarts fprintd after a wake. Wi-Fi staying loaded across suspend hasn't run on a Pixel 7. Same script as the Pixel 7 Pro | | `vendor/NetworkManager/conf.d/10-omamobile-usb.conf` | `/usr/lib/NetworkManager/conf.d` | Keeps NetworkManager off that link | diff --git a/packages/omamobile-device-panther/install b/packages/omamobile-device-panther/install index ed3167754..ab280452e 100755 --- a/packages/omamobile-device-panther/install +++ b/packages/omamobile-device-panther/install @@ -53,6 +53,8 @@ done install -d "$destination/usr/lib/systemd/system/timers.target.wants" ln -sfn ../omamobile-camera.timer \ "$destination/usr/lib/systemd/system/timers.target.wants/omamobile-camera.timer" +install -Dm644 vendor/modprobe.d/omamobile-fingerprint.conf \ + "$destination/usr/lib/modprobe.d/omamobile-fingerprint.conf" install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \ "$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf" install -Dm644 device.conf \ diff --git a/packages/omamobile-device-panther/test/all b/packages/omamobile-device-panther/test/all index 66fec6208..d32084c25 100755 --- a/packages/omamobile-device-panther/test/all +++ b/packages/omamobile-device-panther/test/all @@ -101,6 +101,7 @@ for f in usr/bin/reboot-to \ usr/lib/modprobe.d/omamobile-camera.conf \ usr/lib/systemd/system/omamobile-camera.service \ usr/lib/systemd/system/omamobile-camera.timer \ + usr/lib/modprobe.d/omamobile-fingerprint.conf \ usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf \ usr/share/omamobile/device.conf \ usr/share/omamobile/device-panther/version \ @@ -136,6 +137,13 @@ grep -q '^MemorySleepMode=s2idle$' "$tmp/root/usr/lib/systemd/sleep.conf.d/10-om || fail "suspend must be s2idle: gs201 never wakes from deep" grep -qx 'options gs_dsim_cmd allow_tx=1' "$tmp/root/usr/lib/modprobe.d/omamobile-display.conf" \ || fail "the DSI command host may send to the panel (brightness)" +f=$tmp/root/usr/lib/modprobe.d/omamobile-fingerprint.conf +for m in sg goodix_fp; do + grep -qx "blacklist $m" "$f" || fail "$m is loaded by omamobile-fp only" +done +# No package here loads Trusty by hand (the 7 Pro's sound start does), so +# blacklisting it would leave omamobile-fp without /dev/trusty-ipc-dev0 +grep -q 'trusty' <(grep -v '^#' "$f") && fail "Trusty must load from the DT, not be blacklisted" [[ -x $tmp/root/usr/bin/omamobile-usb-rescue ]] || fail "omamobile-usb-rescue is executable" [[ $(readlink "$tmp/root/usr/lib/systemd/system/multi-user.target.wants/omamobile-usb-rescue.service") == ../omamobile-usb-rescue.service ]] \ || fail "omamobile-usb-rescue starts at boot" diff --git a/packages/omamobile-device-panther/vendor/modprobe.d/omamobile-fingerprint.conf b/packages/omamobile-device-panther/vendor/modprobe.d/omamobile-fingerprint.conf new file mode 100644 index 000000000..1578e8160 --- /dev/null +++ b/packages/omamobile-device-panther/vendor/modprobe.d/omamobile-fingerprint.conf @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: MIT +# Fingerprint: omamobile-fp's unit loads goodix_fp and its runner loads sg +# (device/panther/FINGERPRINT-PLAN.md P4, P5). +# - sg: SCSI generic is needed only for the UFS RPMB well-known LUN, but it +# creates a raw SG_IO node for every LUN, which bypasses the block layer's +# read-only guard on the calibration partitions. systemd-udevd would load +# it for every SCSI device. +# - goodix_fp: switches the sensor supply and reset. +# Unlike the 7 Pro's file, Trusty is not blacklisted: there its sound start +# (omamobile-aoc-start) loads it, and this package has none, so with the +# trusty_* lines nothing would create /dev/trusty-ipc-dev0 and omamobile-fp +# would be skipped. Trusty loads from the DT's /trusty node, as on the Pixel 7 +# where P5 passed. +blacklist sg +blacklist goodix_fp From a71755493bc827a5b883167cea93f5aa5f79466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Wed, 4 Nov 2026 15:24:40 +0100 Subject: [PATCH 05/10] panther FINGERPRINT-PLAN: Trusty already started, local HBM written Trusty started on the Pixel 7 on 2026-11-03 under the sound bring-up's overlay ("trusty version", "selected api version: 5", the trusty_ipc vrings); what P2 still has to show is the device node and the cpu 7 line. Local HBM for the S6E3FC3 is now a local kernel commit, from Google's GPL panel driver; section 4 says what it does and what to check on the phone. I used AI help (Claude) to work on this. --- device/panther/FINGERPRINT-PLAN.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/device/panther/FINGERPRINT-PLAN.md b/device/panther/FINGERPRINT-PLAN.md index 400032c5d..eb50c2796 100644 --- a/device/panther/FINGERPRINT-PLAN.md +++ b/device/panther/FINGERPRINT-PLAN.md @@ -37,9 +37,9 @@ drivers, chroot, bridge and libfprint driver are the ones to use. | Piece | Pixel 7 | Consequence | |---|---|---| -| Trusty | `/trusty` is `disabled` in the running DT; no `/dev/trusty*`. The AoC does not start through it yet (on cheetah it does) | First SMCs into Trusty from our kernel on this phone: gate P2 | +| Trusty | Started on the Pixel 7 on 2026-11-03 with the sound bring-up's overlay, which enables `/trusty` (kernel `g89edef70d4d5`, 23:43): "trusty version: Project: cloudripper", "selected api version: 5", trusty_ipc virtio0 vrings, "trusty-virtio ... initializing done". `/dev/trusty-ipc-dev0` and the cpu 7 hotplug were not checked | Gate P2 is mostly seen already; what is left of it is in P2 | | Sub-PMIC | Not described before `1fa21bbc7` (running regulators: `ldo*m` only) | The commit adds `pmic-2` with LDO15S only | -| Panel | Samsung S6E3FC3 (`panel-samsung-s6e3fc3`, `samsung,s6e3fc3-p10`), 1080x2400, ABL's `exynos_drm.panel_name=sdc-s6e3fc3-p10` | **Our driver has no local HBM** (its header: "Local HBM ... left out"); the backlight has no `local_hbm_mode`. Blocker for good captures: section 4 | +| Panel | Samsung S6E3FC3 (`panel-samsung-s6e3fc3`, `samsung,s6e3fc3-p10`), 1080x2400, ABL's `exynos_drm.panel_name=sdc-s6e3fc3-p10` | Local HBM is in a local kernel commit (branch `panther-lhbm`, not on the phone yet): section 4 | | Touchscreen | FocalTech FT3658 (`focaltech_ft3658`, input "FocalTech FT3658") | The runner looked only for the Synaptics name: now per device | | `omamobile-fp-chroot` | Any board but the 9a ran as cheetah | Now detects `google,gs201-panther`: g7.app, C++ KeyMint, 1080x2400 at 60 Hz, `sdc-s6e3fc3-p10`, FT3658 (untested) | | Sensor position | Not known here: the bridge asks the HAL (`getSensorProps`), which has its own per-device data | Check in P5 that the circle lands on the sensor | @@ -64,6 +64,8 @@ the test, never committed) before `bin/omamobile images`. touch, wifi, charging) or `fingerprint` is missing. **P2. Trusty (`DTB_OVERLAYS="fingerprint-trusty"`).** +Trusty's start was already seen with the sound overlay (section 2); what is +new here is the device node and the cpu 7 line. `tools/fingerprint-capture --watchdog trusty-core`, then `trusty-log`, `trusty-ipc`, `hotplug`. Expect as cheetah F2: "trusty version", "selected api version", `/dev/trusty-ipc-dev0`, "refusing to take cpu 7 offline". @@ -89,14 +91,16 @@ loaded", "HAL/TA version is match", "Initialization successful". **Stop if** the HAL reports a calibration error (the 9a's "spmt is not pass" / CALIBRATION_NOT_READY): the calibration question is then panther's own. -## 4. Open: local HBM on the S6E3FC3 +## 4. Local HBM on the S6E3FC3 The optical sensor reads the finger lit by the panel's local HBM circle. The bridge drives it through `local_hbm_mode`; without it the bridge logs "LHBM on refused" and captures run unlit, which is expected to fail or match -poorly (not measured). The command sequence is in Google's GPL -`panel-samsung-s6e3fc3-p10.c`, which is not on this computer: getting it is a -download, Ángel's call. With it, the work mirrors the 7 Pro's (`local_hbm_mode`, -`local_hbm_max_timeout`, `allow_lhbm`, off on blank/unprepare) plus an -`allow_lhbm` line for `panel_samsung_s6e3fc3` in -`omamobile-fingerprint-lhbm.conf`. +poorly (not measured). The kernel branch `panther-lhbm` adds it to +`panel-samsung-s6e3fc3`, from Google's GPL `panel-samsung-s6e3fc3-p10.c` +(android-gs-pantah-5.10-android15-qpr1): the 7 Pro's interface +(`local_hbm_mode`, `local_hbm_max_timeout` up to 3 s, `allow_lhbm`, off on +blank/unprepare), the gamma copy from 0xD8 to 0x65 and the circle centred +at x 540, y 1713. `omamobile-fingerprint-lhbm.conf` has the +`panel_samsung_s6e3fc3` line. Not run on the phone: check the circle's +place and the 3 s timeout before P5. From 672a63be361654ff48e78d076b23254d94f2d4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Wed, 4 Nov 2026 18:00:05 +0100 Subject: [PATCH 06/10] panther FINGERPRINT-PLAN: P1-P4 passed; the sensor overlay enables LDO15S The camera overlays enable the sub-PMIC too, so the base DTB keeps LDO15S disabled, as it does the camera's LDO12S, and the sensor overlay enables it. P1 to P4 passed on a Pixel 7 on 2026-11-04 (section 6): Trusty answers, its keymaster, gatekeeper and apploader ports accept a connection, and goodix_fp switches LDO15S on while the sensor is open and off after, with no other rail changing. P5 is not run. I used AI help (Claude) to work on this. --- device/panther/FINGERPRINT-PLAN.md | 15 +++++++++++++++ device/panther/overlays/fingerprint-sensor.dtso | 9 +++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/device/panther/FINGERPRINT-PLAN.md b/device/panther/FINGERPRINT-PLAN.md index eb50c2796..69a50c8b6 100644 --- a/device/panther/FINGERPRINT-PLAN.md +++ b/device/panther/FINGERPRINT-PLAN.md @@ -104,3 +104,18 @@ blank/unprepare), the gamma copy from 0xD8 to 0x65 and the circle centred at x 540, y 1713. `omamobile-fingerprint-lhbm.conf` has the `panel_samsung_s6e3fc3` line. Not run on the phone: check the circle's place and the 3 s timeout before P5. + +## 6. Results + +On 2026-11-04, kernel `7.3.0-rc6-omamobile-push1-g44048a9aa795` with the +fingerprint DT commit (its LDO15S `disabled`, enabled by this overlay) and +the sound and camera overlays the phone already ran; only +`vendor_kernel_boot` was reflashed, rebuilt byte for byte the same way first. + +| Gate | Result | +|---|---| +| P1 | Passed: `fingerprint` present and `disabled`, no `vdd_udfps`; modules, Wi-Fi, touch, sound, failed units as before; kernel errors the same kinds as the three boots before (60-72) | +| P2 | Passed (Trusty was on through the sound overlay): "trusty version: Project: cloudripper", "selected api version: 5", `/dev/trusty-ipc-dev0`, "refusing to take cpu 7 offline" | +| P3 | Passed: keymaster, gatekeeper and apploader "open" | +| P4 | Passed with goodix_fp blacklisted and loaded by hand: "irq 129, supply switched, netlink 25"; `vdd_udfps` 0 users before, 1 (enabled) while `/dev/goodix_fp` was open (152 sensor interrupts), 0 (disabled) after; `regulator_summary` otherwise identical (81 lines) | +| P5 | Not run (writes RPMB: Ángel's yes first) | diff --git a/device/panther/overlays/fingerprint-sensor.dtso b/device/panther/overlays/fingerprint-sensor.dtso index ecb10a97a..832f744fc 100644 --- a/device/panther/overlays/fingerprint-sensor.dtso +++ b/device/panther/overlays/fingerprint-sensor.dtso @@ -1,8 +1,9 @@ // SPDX-License-Identifier: MIT /* * Bring-up only (device/panther/FINGERPRINT-PLAN.md, gate P4): enable the - * sub-PMIC (only LDO15S, the sensor's supply, is described on panther) and - * the Goodix sensor node. Apply after fingerprint-trusty.dtso. The PERIC0 + * sub-PMIC, LDO15S (the sensor's supply, disabled in the base DTB like the + * camera's LDO12S, so a camera overlay leaves it alone) and the Goodix + * sensor node. Apply after fingerprint-trusty.dtso. The PERIC0 * pin controller (the sensor's reset line, gpp1-1) is already on in the * default DTB. Paths, not labels, so the base DTB needs no __symbols__. */ @@ -13,6 +14,10 @@ status = "okay"; }; +&{/firmware/power-management/pmic-2/regulators/ldo15s} { + status = "okay"; +}; + &{/fingerprint} { status = "okay"; }; From 8dcb7c88f7012779cf4f7685e19667e2ce56826f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Wed, 4 Nov 2026 18:17:36 +0100 Subject: [PATCH 07/10] fingerprint: build the bridge with the NDK (pipe2 needs _GNU_SOURCE) With the NDK path of fingerprint/Makefile (r27c), bionic declares pipe2() only under _GNU_SOURCE, and -Werror stops the bridge on the implicit declaration. Define it first, as the shim does. Both programs then build without warnings, and test/all passes with them. I used AI help (Claude) to work on this. --- fingerprint/bridge/omamobile-fp-bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fingerprint/bridge/omamobile-fp-bridge.c b/fingerprint/bridge/omamobile-fp-bridge.c index ec55b1cbf..ec539260a 100644 --- a/fingerprint/bridge/omamobile-fp-bridge.c +++ b/fingerprint/bridge/omamobile-fp-bridge.c @@ -64,6 +64,8 @@ * arguments to __libc_init() as bionic's crtbegin does. fingerprint/Makefile * builds it against the extracted chroot's libc and libbinder_ndk. */ + +#define _GNU_SOURCE #include #include #include From 842c3f3a2e1cc396cda8789d5b405aca874b03f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Wed, 4 Nov 2026 18:23:05 +0100 Subject: [PATCH 08/10] omamobile-fp-chroot: take an empty persist:/ss/0 as the TDP copy On a Pixel 7, persist:/ss/0 is a 0-byte regular file whose ctime is from the factory (1 Jan 2020), in the 2026-11-03 and 11-04 backups alike: its Trusty never committed TDP, and stock's storageproxyd serves that empty file on every boot (init.gs201.rc links /data/vendor/ss/persist to persist's /ss). The runner refused it, as it refuses a missing /ss/0. Take an empty regular /ss/0 (debugfs stat: regular, Size 0) as an empty TDP copy and record its hash; a missing or unreadable one is still refused, and the existing checks still refuse once the copy or persist:/ss/0 changes. test/preflight covers it, and fails with the old runner. Run on the Pixel 7 on 2026-11-04 and 11-06 (FINGERPRINT-PLAN P5): the stack came up, a finger enrolled and unlocked, and the TDP copy was still the empty file afterwards. I used AI help (Claude) to work on this. --- .../lib/omamobile-fp-chroot | 21 +++++++++++++--- packages/omamobile-fingerprint/test/preflight | 25 ++++++++++++++++++- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/packages/omamobile-fingerprint/lib/omamobile-fp-chroot b/packages/omamobile-fingerprint/lib/omamobile-fp-chroot index cea779816..3cadc7b93 100755 --- a/packages/omamobile-fingerprint/lib/omamobile-fp-chroot +++ b/packages/omamobile-fingerprint/lib/omamobile-fp-chroot @@ -305,6 +305,19 @@ persist_dump() { # $1 path in persist, $2 output, $3 the partition's device [[ -s $2 ]] } +# persist:/ss/0 (TDP) the same way, but an empty regular file counts when +# persist's own /ss/0 is empty: a phone whose Trusty never committed TDP +# (the Pixel 7 here: 0 bytes, ctime from the factory) gives stock an empty +# TDP too, so serving the same empty file is what stock does. +persist_dump_tdp() { # $1 output, $2 the partition's device + local st + persist_dump /ss/0 "$1" "$2" && return 0 + st=$(debugfs -R "stat /ss/0" "$DEVDIR/$2" 2>/dev/null) || return 1 + grep -c 'Type: regular' <<<"$st" >/dev/null || return 1 + [[ $(grep -o -m1 'Size: [0-9]*' <<<"$st") == "Size: 0" ]] || return 1 + : > "$1" +} + # Two files the same? cmp(1) (diffutils) answers 0 same, 1 different and # anything else for trouble (127: not installed). Trouble is never "differs": # it stops the start with its own reason, so the guard stays closed and honest. @@ -335,12 +348,12 @@ provision() { rm -rf "$tmp" install -d -m 0700 "$tmp" if [[ -e $STATE/persist-ss/0 ]]; then - persist_dump /ss/0 "$tmp/0" "$p" || die "can't read persist:/ss/0 to check the existing TDP copy" + persist_dump_tdp "$tmp/0" "$p" || die "can't read persist:/ss/0 to check the existing TDP copy" same_file "$tmp/0" "$STATE/persist-ss/0" || refuse "$STATE/persist-ss/0 differs from persist:/ss/0: Linux's TDP copy and stock's no longer agree. Not starting: ask (FINGERPRINT-PLAN F19)" say "the existing TDP copy matches persist:/ss/0: recording it" else - persist_dump /ss/0 "$tmp/0" "$p" || + persist_dump_tdp "$tmp/0" "$p" || refuse "persist has no /ss/0 (or it can't be read): without a TDP copy storageproxyd won't start" persist_dump /ss/nsp "$tmp/nsp" "$p" || say "persist has no /ss/nsp: Trusty starts an empty one (it has no rollback check)" @@ -387,7 +400,7 @@ tdp_guard() { refuse "no TDP copy ($STATE/tdp.img): storageproxyd won't start without it (device/tegu/FINGERPRINT-PLAN.md F4b)" return 0 fi - [[ -s $STATE/persist-ss/0 ]] || + [[ -f $STATE/persist-ss/0 ]] || refuse "no TDP copy ($STATE/persist-ss/0, recorded in $PROVENANCE): storageproxyd won't start without it. Don't recreate it by hand: ask (FINGERPRINT-PLAN F19)" want=$(recorded persist-ss/0) [[ -n $want ]] || die "$PROVENANCE has no persist-ss/0 line" @@ -397,7 +410,7 @@ tdp_guard() { p=$(ro_part persist) install -d -m 0755 "$RUN" tmp=$RUN/persist-ss0.check - persist_dump /ss/0 "$tmp" "$p" || die "can't read persist:/ss/0 to check it against the copy" + persist_dump_tdp "$tmp" "$p" || die "can't read persist:/ss/0 to check it against the copy" got=$(sha "$tmp") rm -f "$tmp" [[ $got == "$want" ]] || diff --git a/packages/omamobile-fingerprint/test/preflight b/packages/omamobile-fingerprint/test/preflight index 9d3b0b4b4..e871f4397 100755 --- a/packages/omamobile-fingerprint/test/preflight +++ b/packages/omamobile-fingerprint/test/preflight @@ -10,6 +10,7 @@ # a second start -> refused until a reboot (the /run marker) # the TDP copy missing -> refused (and never quietly recreated) # no /ss/0 in persist -> refused +# an empty /ss/0 -> an empty copy, refused once either side changes # the TDP copy changed -> refused # persist:/ss/0 changed -> refused # a writable partition -> refused @@ -48,7 +49,13 @@ phone() { echo "debugfs \$*" >> "$p/debugfs.log" [[ \$1 == -R ]] || exit 1 read -r cmd flag src dst <<<"\$2" -[[ \$cmd == dump && \$flag == -p && \$3 == "$p/dev/sda5" ]] || exit 1 +[[ \$3 == "$p/dev/sda5" ]] || exit 1 +if [[ \$cmd == stat ]]; then + [[ -f "$p/persistfs\$flag" ]] && echo "Inode: 15 Type: regular Mode: 0600" && + echo "User: 1000 Group: 1000 Project: 0 Size: \$(stat -c %s "$p/persistfs\$flag")" + exit 0 +fi +[[ \$cmd == dump && \$flag == -p ]] || exit 1 [[ -f "$p/persistfs\$src" ]] && cp "$p/persistfs\$src" "\$dst" exit 0 EOF @@ -108,6 +115,22 @@ pf && fail "no /ss/0 in persist: refused" [[ ! -e $S/provenance && ! -e $marker ]] || fail "nothing recorded without a TDP copy" pass "persist without /ss/0: refused, no TDP copy, no storage start" +# An empty /ss/0 in persist (a TDP stock never committed): an empty copy, +# its hash recorded, and still refused once persist:/ss/0 is no longer empty +phone; : > "$t/p/persistfs/ss/0" +pf || { cat "$t/out"; fail "an empty persist:/ss/0 passes preflight"; } +[[ -f $S/persist-ss/0 && ! -s $S/persist-ss/0 ]] || fail "the TDP copy is the empty file" +[[ $(awk '$2 == "persist-ss/0" {print $1}' "$S/provenance") == "$(sha256sum < /dev/null | cut -d' ' -f1)" ]] || + fail "provenance records the empty file's sha256" +newboot +pf || { cat "$t/out"; fail "the empty TDP copy passes again on the next boot"; } +newboot; echo stock > "$t/p/persistfs/ss/0" +pf && fail "persist:/ss/0 written after an empty copy is refused" +grep -c 'persist:/ss/0 changed' "$t/out" >/dev/null || { cat "$t/out"; fail "says persist:/ss/0 changed"; } +newboot; : > "$t/p/persistfs/ss/0"; echo x > "$S/persist-ss/0" +pf && fail "an empty TDP copy that Linux wrote to is refused" +pass "an empty persist:/ss/0: an empty TDP copy, recorded, refused once either side changes" + # The TDP copy changed after the record (Linux wrote TDP) phone; pf || fail "setup" newboot; echo x >> "$S/persist-ss/0" From 43116e440454f86298a1ce74e51bec2b16fe7649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Fri, 6 Nov 2026 18:54:05 +0100 Subject: [PATCH 09/10] panther FINGERPRINT-PLAN: P5 passed, enrolled and unlocking --- device/panther/FINGERPRINT-PLAN.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/device/panther/FINGERPRINT-PLAN.md b/device/panther/FINGERPRINT-PLAN.md index 69a50c8b6..f76a1a40e 100644 --- a/device/panther/FINGERPRINT-PLAN.md +++ b/device/panther/FINGERPRINT-PLAN.md @@ -118,4 +118,30 @@ the sound and camera overlays the phone already ran; only | P2 | Passed (Trusty was on through the sound overlay): "trusty version: Project: cloudripper", "selected api version: 5", `/dev/trusty-ipc-dev0`, "refusing to take cpu 7 offline" | | P3 | Passed: keymaster, gatekeeper and apploader "open" | | P4 | Passed with goodix_fp blacklisted and loaded by hand: "irq 129, supply switched, netlink 25"; `vdd_udfps` 0 users before, 1 (enabled) while `/dev/goodix_fp` was open (152 sensor interrupts), 0 (disabled) after; `regulator_summary` otherwise identical (81 lines) | -| P5 | Not run (writes RPMB: Ángel's yes first) | +| P5 | Passed (Ángel's yes, 2026-11-04 and 11-06): see below | + +**P5.** The runner first refused: this phone's `persist:/ss/0` is a 0-byte +file with the factory date (1 Jan 2020), in the 11-03 and 11-04 backups +alike, so its Trusty never committed TDP, and stock's `storageproxyd` +serves that empty file on every boot (`init.gs201.rc` links +`/data/vendor/ss/persist` to persist's `/ss`). With the runner taking an +empty `/ss/0` as an empty TDP copy (its hash recorded, refused once either +side changes), the first start (11-04 18:24) copied `mfg_data` and +`persist:/ss`, ran `storageproxyd`, loaded `g7.app`, and brought up KeyMint, +Gatekeeper, the Goodix HAL and the bridge; the HAL reported the sensor at +(540, 1713), radius 100, and no calibration error ("injectMtCali: +Calibration file already sent" only). On 11-06, same kernel and DTB, +`omamobile-fp` started the stack again; `fprintd-list` showed "Under-display +fingerprint sensor (Omarchy Mobile)". A right index finger was enrolled from +the shell's enrollment screen (quick settings, Fingerprint) and the lock +screen unlocked with it (the bridge logged `MATCH`). The TDP copy was still +the empty file (`e3b0c442…`) two days and one enrollment later: Trusty did +not write TDP. Then, with `omamobile-fp` enabled and this package's +`omamobile-fingerprint.conf` in place of the hand-written blacklist, a +reboot (11-06 19:02): Trusty loaded from the DT, `/dev/trusty-ipc-dev0` +and `goodix_fp` were there, the unit started the stack by itself ("g7.app +loaded", the bridge ready), no unit failed, the finger was still enrolled, +the TDP copy still empty, and the lock screen unlocked with it (`MATCH`). +Not checked: the packages installed with `pacman -U` (their files were +copied by hand), a wrong finger, sudo through `pam_fprintd`, and stock +Android after a factory reset (cheetah's T2). From 2a090ab87418dcd20f9eb854db348fe5ea5d2e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Ren=C3=A9?= <17342133+angelrenefm@users.noreply.github.com> Date: Sat, 7 Nov 2026 15:59:41 +0100 Subject: [PATCH 10/10] omamobile-fp-chroot test, panther plan: an unreadable /ss/0 is not empty The preflight test now covers the line between an empty persist:/ss/0 and one that can't be read: a dump that yields nothing while stat says a regular file of 4096 bytes, and a /ss/0 that isn't a regular file. Both are refused with no copy and nothing recorded. Removing either the size or the type check from persist_dump_tdp() now fails its case. The Pixel 7's plan: the status line says P1 to P5 passed, the kernel is linux-omarchy-mobile#207 instead of a local branch and commit, the results are section 5 (there was no section 5), the panel driver on omamobile doesn't have local HBM yet, and Trusty gets the 7 Pro's guarded start before a Pixel 7 DTB turns it on by default. I used AI help (Claude) to work on this. --- device/panther/FINGERPRINT-PLAN.md | 23 +++++++++++++------ packages/omamobile-fingerprint/test/preflight | 20 ++++++++++++++++ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/device/panther/FINGERPRINT-PLAN.md b/device/panther/FINGERPRINT-PLAN.md index f76a1a40e..7ee0d34bc 100644 --- a/device/panther/FINGERPRINT-PLAN.md +++ b/device/panther/FINGERPRINT-PLAN.md @@ -1,9 +1,10 @@ # Fingerprint plan (panther / gs201): what the Pixel 7 shares with the 7 Pro -Status (2026-11-03): **offline work only, nothing run on the phone for -fingerprint.** The sensor is the 7 Pro's; the panel and the touchscreen are -not. Kernel commit `1fa21bbc7` (branch `panther-huella`, on `panther-todo`) +Status (2026-11-07): **P1 to P5 passed on the phone** (section 5): a finger +enrolled and the lock screen unlocked with it, also after a reboot with the +unit starting the stack by itself. The sensor is the 7 Pro's; the panel and +the touchscreen are not. linux-omarchy-mobile#207 (merged 2026-11-07) describes the sensor, its supply and pins, all disabled; this repo adds the two bring-up overlays and the Pixel 7 to `omamobile-fingerprint` and `tools/extract-fingerprint-vendor`. The 7 Pro's plan and research @@ -38,7 +39,7 @@ drivers, chroot, bridge and libfprint driver are the ones to use. | Piece | Pixel 7 | Consequence | |---|---|---| | Trusty | Started on the Pixel 7 on 2026-11-03 with the sound bring-up's overlay, which enables `/trusty` (kernel `g89edef70d4d5`, 23:43): "trusty version: Project: cloudripper", "selected api version: 5", trusty_ipc virtio0 vrings, "trusty-virtio ... initializing done". `/dev/trusty-ipc-dev0` and the cpu 7 hotplug were not checked | Gate P2 is mostly seen already; what is left of it is in P2 | -| Sub-PMIC | Not described before `1fa21bbc7` (running regulators: `ldo*m` only) | The commit adds `pmic-2` with LDO15S only | +| Sub-PMIC | Not described before linux-omarchy-mobile#207 (running regulators: `ldo*m` only) | #207 adds `pmic-2` with LDO15S only | | Panel | Samsung S6E3FC3 (`panel-samsung-s6e3fc3`, `samsung,s6e3fc3-p10`), 1080x2400, ABL's `exynos_drm.panel_name=sdc-s6e3fc3-p10` | Local HBM is in a local kernel commit (branch `panther-lhbm`, not on the phone yet): section 4 | | Touchscreen | FocalTech FT3658 (`focaltech_ft3658`, input "FocalTech FT3658") | The runner looked only for the Synaptics name: now per device | | `omamobile-fp-chroot` | Any board but the 9a ran as cheetah | Now detects `google,gs201-panther`: g7.app, C++ KeyMint, 1080x2400 at 60 Hz, `sdc-s6e3fc3-p10`, FT3658 (untested) | @@ -54,7 +55,8 @@ run (cheetah F4) is irreversible. Before any reboot: Vol- + Power, `fastboot --set-active=b` (slot B's retry counter). The NV backup of 2026-11-03 exists (`tools/nv-backup -d panther`, 7 partitions, `--check` SAME). -Kernel: `panther-huella` (= `panther-todo` + `1fa21bbc7`). Overlays apply +Kernel: the bring-up ran on a local branch with linux-omarchy-mobile#207's +commit on top (section 5 names the kernel). Overlays apply with `DTB_OVERLAYS="..."` in `device/panther/device.conf` (a local edit for the test, never committed) before `bin/omamobile images`. @@ -96,7 +98,9 @@ CALIBRATION_NOT_READY): the calibration question is then panther's own. The optical sensor reads the finger lit by the panel's local HBM circle. The bridge drives it through `local_hbm_mode`; without it the bridge logs "LHBM on refused" and captures run unlit, which is expected to fail or match -poorly (not measured). The kernel branch `panther-lhbm` adds it to +poorly (not measured). The panel driver on `omamobile` has no +`local_hbm_mode` yet: a local kernel commit (branch `panther-lhbm`, not +proposed yet) adds it to `panel-samsung-s6e3fc3`, from Google's GPL `panel-samsung-s6e3fc3-p10.c` (android-gs-pantah-5.10-android15-qpr1): the 7 Pro's interface (`local_hbm_mode`, `local_hbm_max_timeout` up to 3 s, `allow_lhbm`, off on @@ -105,7 +109,7 @@ at x 540, y 1713. `omamobile-fingerprint-lhbm.conf` has the `panel_samsung_s6e3fc3` line. Not run on the phone: check the circle's place and the 3 s timeout before P5. -## 6. Results +## 5. Results On 2026-11-04, kernel `7.3.0-rc6-omamobile-push1-g44048a9aa795` with the fingerprint DT commit (its LDO15S `disabled`, enabled by this overlay) and @@ -145,3 +149,8 @@ the TDP copy still empty, and the lock screen unlocked with it (`MATCH`). Not checked: the packages installed with `pacman -U` (their files were copied by hand), a wrong finger, sudo through `pam_fprintd`, and stock Android after a factory reset (cheetah's T2). + +Before a Pixel 7 DTB turns `/trusty` on by default (not just the bring-up +overlay): Trusty loads straight from the DT here and calls into the secure +world at probe, while the 7 Pro loads it from a start script behind a hang +marker. The Pixel 7 gets the same guarded start first. diff --git a/packages/omamobile-fingerprint/test/preflight b/packages/omamobile-fingerprint/test/preflight index e871f4397..2b362c5c5 100755 --- a/packages/omamobile-fingerprint/test/preflight +++ b/packages/omamobile-fingerprint/test/preflight @@ -11,6 +11,8 @@ # the TDP copy missing -> refused (and never quietly recreated) # no /ss/0 in persist -> refused # an empty /ss/0 -> an empty copy, refused once either side changes +# /ss/0 unreadable -> refused: a dump that yields nothing from a +# non-empty or non-regular /ss/0 is not "empty" # the TDP copy changed -> refused # persist:/ss/0 changed -> refused # a writable partition -> refused @@ -51,11 +53,15 @@ echo "debugfs \$*" >> "$p/debugfs.log" read -r cmd flag src dst <<<"\$2" [[ \$3 == "$p/dev/sda5" ]] || exit 1 if [[ \$cmd == stat ]]; then + # what stat says, when a case sets it + [[ -f "$p/stat-says" ]] && { cat "$p/stat-says"; exit 0; } [[ -f "$p/persistfs\$flag" ]] && echo "Inode: 15 Type: regular Mode: 0600" && echo "User: 1000 Group: 1000 Project: 0 Size: \$(stat -c %s "$p/persistfs\$flag")" exit 0 fi [[ \$cmd == dump && \$flag == -p ]] || exit 1 +# a read error: the dump writes nothing (debugfs still exits 0) +[[ -e "$p/dump-fails" ]] && exit 0 [[ -f "$p/persistfs\$src" ]] && cp "$p/persistfs\$src" "\$dst" exit 0 EOF @@ -131,6 +137,20 @@ newboot; : > "$t/p/persistfs/ss/0"; echo x > "$S/persist-ss/0" pf && fail "an empty TDP copy that Linux wrote to is refused" pass "an empty persist:/ss/0: an empty TDP copy, recorded, refused once either side changes" +# /ss/0 that can't be read is not an empty /ss/0: the dump yields nothing +# while stat says a regular file of 4096 bytes, or something that isn't a +# regular file. Refused, with no copy and nothing recorded, so a failed read +# never hands Trusty an empty TDP while persist holds a real one. +phone; touch "$t/p/dump-fails" +pf && fail "a non-empty /ss/0 that dumps nothing is refused" +grep -c "can't be read" "$t/out" >/dev/null || { cat "$t/out"; fail "says /ss/0 can't be read"; } +[[ ! -e $S/persist-ss/0 && ! -e $S/provenance && ! -e $marker ]] || fail "no TDP copy and nothing recorded after a failed read" +phone; touch "$t/p/dump-fails"; : > "$t/p/persistfs/ss/0" +printf 'Inode: 15 Type: directory Mode: 0700\nUser: 1000 Group: 1000 Project: 0 Size: 0\n' > "$t/p/stat-says" +pf && fail "a /ss/0 that isn't a regular file is refused" +[[ ! -e $S/persist-ss/0 && ! -e $S/provenance && ! -e $marker ]] || fail "no TDP copy and nothing recorded for a non-regular /ss/0" +pass "an unreadable persist:/ss/0 (4096 bytes dumping nothing, or not a regular file): refused, nothing copied or recorded" + # The TDP copy changed after the record (Linux wrote TDP) phone; pf || fail "setup" newboot; echo x >> "$S/persist-ss/0"