Skip to content

Merge dev into fix/persist-rkp-only-knobs (resolves #270 conflicts) - #294

Closed
DebugBoard wants to merge 2 commits into
JingMatrix:devfrom
DebugBoard:fix/persist-rkp-only-knobs-conflict-resolved
Closed

DebugBoard wants to merge 2 commits into
JingMatrix:devfrom
DebugBoard:fix/persist-rkp-only-knobs-conflict-resolved

Conversation

@DebugBoard

Copy link
Copy Markdown
Contributor

Resolves the merge conflicts in #270 (`fix/persist-rkp-only-knobs` vs `dev`).

The only conflict was in `KeyAdmin.kt`'s KDoc comment for the `/rkp`, `/packages`, and `/icon` endpoints: `dev` had rewrapped the comment's line widths while #270 added a new sentence documenting `POST /rkp`. Resolved by keeping the new `POST /rkp` documentation and `setRkp` function from #270, rewrapped to match `dev`'s current line width, with no functional changes.

This branch is a straight merge of `origin/dev` into #270's branch and can replace it, or be used as a reference to resolve #270 directly.

JingMatrix and others added 2 commits August 21, 2026 15:56
The two remote_provisioning.*.rkp_only properties gate whether keystore2
provisions attestation keys only through RKP or may fall back to a batch key;
turning them off is what restores Strong Integrity on a device that ships them
on. They are plain system properties, not persist.*, so a live resetprop is
gone on the next boot -- and a vendor .prop that init re-applies each boot can
even reassert the on default (JingMatrix#236). The WebUI toggle therefore reverted on
every reboot, and integrity had to be won back by toggling again (JingMatrix#244).

The chosen values are now kept in /data/adb/teesim/rkp.json and re-forced onto
their properties at daemon start, in applyRkpProps, right after the
verified-boot props -- overwriting only on a live-vs-stored mismatch, so a
steady state does no work. enable_rkpd is persist.device_config and already
survives, so re-forcing it is a no-op. Only the three known knob names are ever
loaded or forced, so a stale or hand-edited rkp.json can never steer resetprop
at an arbitrary property.

The toggle itself moved into the daemon. It used to shell out resetprop and
write rkp.json from the WebUI, two out-of-process steps the daemon re-read on an
unrelated schedule; a re-push landing between them could read the old file and
force the old value back, undoing the toggle the user just made. A new POST /rkp
sets the property live and persists the choice as one step under the same lock
as the boot re-force (resolveAndPush), so the two can no longer interleave and
every write to rkp.json serializes through the daemon. The live set now goes
through the same resetprop -n path as the boot re-force; keystore2 reads the
knob on demand when it provisions, so the value still takes effect without a
property retrigger.
@DebugBoard

Copy link
Copy Markdown
Contributor Author

Just thought conflicts were holding up the PR and need the fix for Google Wallet :)

@DebugBoard DebugBoard closed this Sep 15, 2026
@DebugBoard
DebugBoard deleted the fix/persist-rkp-only-knobs-conflict-resolved branch September 15, 2026 22:55
@DebugBoard
DebugBoard restored the fix/persist-rkp-only-knobs-conflict-resolved branch September 24, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants