Skip to content

Add optional source-built pdx235 vold timeout module - #157

Draft
0cwa wants to merge 79 commits into
mainfrom
codex/lineage-vold-exfat-timeout-pr
Draft

0cwa wants to merge 79 commits into
mainfrom
codex/lineage-vold-exfat-timeout-pr

Conversation

@0cwa

@0cwa 0cwa commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

ChatGPT refreshed this draft against merged main 5d6f52042b3a0fdd0aeefda3bfa499cf12ae25f3, including the upstream sync in #175 and publication-continuity guard in #177, and reassessed its remaining qualification.

November 10 review

  • The source-built route remains a fallback. feat(vold): raise the exFAT fsck limit by patching one vold instruction (supersedes #157) #174 now has a hardened binary patch and real authenticated-input evidence; it is the preferred approach to the same timeout change. These PRs share a module identity and should not both be merged.
  • Merged the upstream sync without changing the source locks, builder, qualification contract, or blank production artifact/provenance pins.
  • Nine affected suites passed on the refreshed tree, including source/build contracts, upstream and executable locks, modules, schedules, and ROM/workflow checks. The final main-refreshed head 2f6a6d9db1e86928b8aef3c368c9d0544878d072 passed CI 42769256763, including the new publication-continuity and strict helper checks. The source baseline, builder, blank artifact/provenance pins and qualification contract remain unchanged.
  • The latest manual baseline run found remains 39699955476: runner prerequisite failure, with compilation skipped. No genuine byte-identical baseline or device qualification has been produced by this review.

Keep this PR in draft. Accepting #174 would make this implementation unnecessary; preserve it as a fallback until that decision.


Purpose and current status

Prepare an optional source-built vold replacement for LineageOS 24.0 pdx235, increasing only the exFAT fsck timeout from 45 to 120 seconds.

This PR remains a draft pending real binary and device qualification. The optional vold module remains default-off, GrapheneOS is excluded, and the approved binary digest, staging tag, and provenance digest remain blank.

Baseline-first contract

The source contract remains pinned to the official lineage-24.0-20261016-nightly-pdx235-signed OTA, SHA-256 8af46661a1440e98018bb2abb155317d6d4ae54e051160f0786b75c1e6806c82, and the complete 1,243-project source manifest.

Before applying the timeout patch, the unmodified executable must match the publisher-authenticated OTA's /system/bin/vold byte for byte. The patched builder requires the actual baseline binary, authenticated reference, and matching receipt; a receipt alone is insufficient.

A registered GitHub runner is optional. The existing local original-vold workflow supports persistent source/vendor acquisition, bounded dependency exploration, compilation, and authenticated comparison. This draft's patched builder currently requires its separate full-manifest baseline receipt and complete source checkout. Those full-manifest commands can run on a suitable local Linux x86_64 host or the optional dedicated Actions runner. A subset receipt must not be relabeled as full-manifest proof.

Previous review refresh

Previous validation

The refreshed combined tree passes 13 Python suites and 9 shell suites, including draft/source/build contracts, diagnostic parsing, device-audit fixtures, local baseline tools, vendor verification, module selection, schedules, workflow routing, ROM fingerprints, and root-mode handling.

Real Bash and Git fixtures cover patch application/rollback, missing fresh output, unexpected source changes, dependency bypass rejection, and hidden tracked-file modifications. YAML parsing, Python compilation, shell syntax, and diff checks also pass. Uploaded blobs and the complete final tree match the locally reviewed tree d3331c5dea1ddc11b5ac8af767f7a9fb3aa51d61. After incorporating #171, all eight affected shell suites and nine Python suites also passed.

The prior refreshed head c107fee5be55ee6b9d9fc7832237389501bc5b5b passed repository CI 42531832054. The branch is conflict-free against the merged main. The opt-in exact-baseline and paired OTA qualification jobs were skipped in this run, so no real binary or device proof is implied. These local checks are synthetic and orchestration tests. No real Android baseline build, modified OTA qualification, or physical-device acceptance was completed.

Remaining qualification

  1. Produce and review a genuine authenticated byte-identical unmodified baseline, using the full-manifest route required by the current patched builder.
  2. Build the timeout patch with those evidence inputs and review the resulting binary/provenance.
  3. Qualify nonpublishing rootless/Magisk OTAs and physical pdx235 boot, encrypted storage, mounting, and exFAT behavior.
  4. Pin the independently reviewed binary/staging/provenance identities before enabling production use.

The latest recorded manual baseline run, 39699955476, failed its runner prerequisite and skipped compilation. No newer baseline execution appeared in the manual-run history checked during this review.

Each newer nightly requires fresh source pins, exact-baseline reproduction, and patch qualification. See the full draft contract and local/runner instructions. Do not merge or enable production use merely because synthetic CI passes.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

0cwa commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

Merge hold (owner request, 2026-10-21): Keep this vold exFAT timeout change out of main for now. This PR is intentionally in draft and must not be enabled in GrapheneOS builds or scheduled/release selections. Treat any future merge as a separate, explicit review/approval decision. The GrapheneOS fsck/SELinux isolation guard is handled independently in #160.

0cwa commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

Vold module review — deployment not yet ready (2026-10-21)

The isolated upstream change is sensible: on the pinned LineageOS android_system_vold revision, only the exFAT fsck timeout moves from 45s to 120s. The draft provides useful source/manifest pins, AArch64 ELF and dependency checks, a strict target-build check, and an existing-file/SELinux-label preservation check. The original PR CI passed.

I made two small commits to this draft to prevent unintended release churn when the module is off: the existing selection fingerprint bytes are retained until vold is selected, and tests/rom_contract_test.sh now covers both the disabled serialization and enabled digest fields. Updated CI is running.

Blockers before merge + scheduled enablement + force-publish:

  1. No real binary/OTA qualification. The documented full 1,243-project source sync and m vold were not executed, and this PR ships no validated vold + provenance.json. Synthetic ELF/manifest contract tests cannot establish boot safety, Android linker compatibility, fsck behavior on hardware, or successful encrypted-data mounting. Build from the pinned full source tree, verify artifact and OTA injection against authentic 20261016 pdx235 images, and require device-side boot/functional validation before publishing a system-critical vold replacement.
  2. No scheduled workflow path. release-lineage.yml, build-rom.yml, and load_schedule_definition.sh currently provide no lineage-vold-exfat-timeout selector pass-through, artifact download/build step, or trusted artifact provenance delivery. Adding a TOML default alone would be silently ignored or fail. The scheduled pair-preflight must see the same authenticated binary before computing selection fingerprints as the build job sees.
  3. Pinned to one nightly. The adapter explicitly accepts only lineage-24.0-20261016-nightly-pdx235-signed. A rolling scheduled job must provision, rebuild/requalify and re-pin for every newer source OTA, or intentionally fail closed; never substitute this 20261016 binary into a later nightly.
  4. Publishing is not a CI substitute. Keep release defaults off, avoid GrapheneOS integration, ensure any source/publication provenance requirements are met, and only then run a one-off force-publish and verify the resulting rootless/magisk OTA pair plus install/boot and update delivery.

Current decision: retain draft status; do not merge, enable scheduled production builds, or publish an untested vold binary. This does not negate the owner's new conditional merge authorization: it documents the remaining conditions for readiness.

0cwa added 22 commits October 22, 2026 00:17

0cwa commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

Baseline-first CI progress (2026-10-22 UTC)

The ordering is now enforced in code: build_lineage_vold.py baseline never opens or applies the timeout patch, and records a diagnostic JSON receipt only after building unmodified vold; it fails unless every byte matches the authenticated source OTA reference. The patched build subcommand requires a baseline report, original OTA vold and unmodified binary and re-verifies their full byte identity before git apply.

Historical source identity is now pinned to the SHA-256 8af46661a1440e98018bb2abb155317d6d4ae54e051160f0786b75c1e6806c82 and the official LineageOS archive URL, grounded in verified ModOS runs #39632433468 and #39678546023. Actual OTA bytes must still pass that digest, the independent signer-key pin and avbroot ota verify before being used as reference.

CI: #39697359803 passed the complete normal test job at exact PR head 0038a55ee13082684ff539d34fdbbe40e8baeab8; the added reproduction tests are synthetic. The large lineage_vold_exact_baseline job is SKIPPED by design, not a successful physical Android build. It requires a trusted [self-hosted, linux, x64, modos-lineage-large] runner with Android build tools and ≥220 GB free scratch, and repository variables MODOS_LINEAGE_LARGE_SCRATCH and MODOS_VOLD_BASELINE_RUNNER_READY=true. No such execution has occurred.

The rollout remains draft and unmerged; both LineageOS and GrapheneOS production defaults remain off for this module, the approved patched binary hash/staging tag remain blank, and no OTA release or force-publish was dispatched. Next gate is to provision that runner and obtain a real byte_identical: true report. If it differs, investigate the exact build environment/source/toolchain before touching the patch or publishing any candidate.

0cwa commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

Stage-1 baseline prerequisite merged — 2026-10-22

The independent, unmodified-vold-only infrastructure has been merged to main as #161 (merge 986e238e2b5075899519fd9035b60826a3c690f2; passing PR CI).

  • New manual, nonpublishing workflow: .github/workflows/vold-baseline.yml.
  • Complete official 1,243-project manifest and pinned 2026-10-16 source digest retained on main; no daemon patch/injection code included.
  • Reference obtained only from the SHA-256/publisher-verified original OTA; clean unmodified build must be byte-for-byte identical and produces only a diagnostic baseline-report.json.
  • A real run still needs a trusted modos-lineage-large self-hosted runner with >=250 GB free and repository variables MODOS_LINEAGE_LARGE_SCRATCH and MODOS_VOLD_BASELINE_RUNNER_READY=true. No real baseline proof exists yet.

Retain this #157 draft unmerged. Do not enable the scheduled selector or force-publish a replacement vold until the merged baseline workflow produces a reviewed actual byte_identical: true artifact, followed by separate patched binary/OTA/device qualification. The previous ordinary CI unit-test successes do not satisfy this first gate.

See stage-1 runner setup and acceptance.

0cwa commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

2026-10-22 — Build-scope correction / dependency feasibility finding

The baseline workflow already invokes m vold, which builds the vold target and its required build dependencies, not the entire LineageOS firmware. The main inefficiency is that src/ci/build_original_vold.py sync currently checks out every project in the 1,243-project pinned manifest. Google's repo sync <project>... supports restricting checkout to selected paths; a smaller immutable source set should be investigated, while continuing to require byte-for-byte equality with the authenticated OTA executable.

Additional reproducibility blocker: the pinned LineageOS/android_device_sony_pdx235 tree at 0559de69466e1e9af69b121985f592c4f4609283 has

  • device.mk → $(call inherit-product, vendor/sony/pdx235/pdx235-vendor.mk)
  • BoardConfig.mk → include vendor/sony/pdx235/BoardConfigVendor.mk
  • extract-files.py → extracts proprietary Sony blobs via the LineageOS extract-utils and vendor/sony/sm6375-common.

Neither vendor/sony/pdx235 nor vendor/sony/sm6375-common is present as a source project in the pinned official manifest. Therefore even the 1,243-project public checkout alone may be insufficient to configure lineage_pdx235-userdebug and reproduce official vold. The exact vendor build inputs must be obtained/derived with verifiable provenance or an explicitly reviewed build-configuration alternative; do not silently ignore missing product dependencies.

Review the exact vold Android.bp at the pinned revision: vold links substantial platform libraries (libfs_mgr, libavb, libbinder, etc.) and declares other required build modules. A standalone C++ compile is not expected to reproduce the signed OTA executable.

The manual baseline run #39699955476 did not reach compilation: BASELINE_READY and SCRATCH were both empty. The 250 GB check is a conservative limit for the current all-project checkout, not a measured minimum required to build the vold module.

Suggested safe next engineering sequence: (1) audit/recover/pin the vendor configuration and its provenance; (2) create a separate read-only, nonpublishing, bounded repo sync <paths>... experiment with explicitly pinned source/toolchain dependencies; (3) build only m vold; (4) compare all resulting bytes with the exact authenticated OTA executable. If subset builds fail, expand the pinned dependency list rather than using SOONG_ALLOW_MISSING_DEPENDENCIES or altering the acceptance gate. Keep this PR draft, scheduled module selection off, and force-publish blocked until a real binary comparison is accepted.

0cwa added a commit that referenced this pull request Oct 22, 2026
Acquire exact TheMuppets vendor candidates with complete inventories and real pinned-source regeneration. Add persistent local setup, staged source builds, authenticated fresh reference extraction, and unchanged exact-byte acceptance. No Actions runner is required for local builds.

Validated head: 768df41
CI: https://github.com/0cwa/ModOS/actions/runs/39786297037
78 local tests and workflow contracts passed. Real vendor preparation and no-fetch resume succeeded; official Repo/avbroot setup succeeded. Android compilation and original-vold equality remain unproved. Draft timeout module #157 and production gates remain unchanged.
0cwa added 3 commits November 8, 2026 23:30
…ion gates

Integrate current diagnostics and Lineage-only BCR behavior, resolve conflicts, and reuse verified original-vold build setup. Verify pinned Sony vendor inputs, reject stale outputs/dependency bypasses/hidden source edits, and require patch restoration plus source revalidation before accepting artifacts.

Keep the module default-off, GrapheneOS excluded, and artifact approvals blank. Thirteen Python suites and nine shell suites pass on the combined tree; no real byte-identical Android baseline or device acceptance is claimed.

Uploaded tree matches locally reviewed tree d86b090.
Preserve the default-off vold gate while keeping the draft current with all reviewed ROM/module changes. Eight affected shell suites and nine Python suites pass after this integration, including Shizuku, draft vold, shared source guards, workflow routing and selection identity.

Artifact approvals remain blank; real original-vold reproduction and device acceptance remain outstanding. Exact uploaded tree: d3331c5.
Incorporate the refreshed Shizuku integration parent without changing the reviewed draft tree d3331c5. Qualification gates and artifact approvals remain unchanged.
0cwa added 2 commits November 10, 2026 06:50
Keep the baseline, source lock, approved-artifact blanks and default-off qualification contract intact while incorporating the reviewed ModOS dependency sync. This refresh does not establish a byte-identical Android build or device acceptance.
…ation

Merge the reviewed main branch without changing its unqualified source baseline, artifact pins, or draft status.

This branch has not been deployed

No deployments
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.

1 participant