Skip to content

fix: make runtime boot animation archives deterministic - #111

Merged
0cwa merged 3 commits into
mainfrom
fix/boot-animation-deterministic-runtime-20260925
Sep 25, 2026
Merged

0cwa merged 3 commits into
mainfrom
fix/boot-animation-deterministic-runtime-20260925

Conversation

@0cwa

@0cwa 0cwa commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Failure found by finished-OTA verification

The force-publish after PR #110 successfully:

  • installed both /media/bootanimation.zip and /media/bootanimation-dark.zip;
  • repacked and AVB-signed product.img;
  • created the patched OTA.

Publication was correctly blocked only because the finished-OTA verifier rebuilt the expected runtime ZIP later and got different bytes.

The reason is Python ZipFile.writestr(filename, ...): when passed only a filename, it stamps the new ZIP entry with the current time. The adapter therefore claimed to produce a deterministic runtime archive but did not.

Fix

Canonicalize every runtime ZIP entry with:

  • fixed DOS epoch timestamp 1980-01-01 00:00:00;
  • ZIP_STORED;
  • Unix creator metadata;
  • regular-file mode 0644;
  • no extra field or comment.

This makes the runtime animation byte-for-byte reproducible regardless of source ZIP timestamps or the time the build/verifier runs.

Regression coverage

Two source animations with identical contents but different entry timestamps must now produce identical runtime ZIP bytes. Tests also require the canonical timestamp and stored compression.

The selection contract is bumped to product-image-root-theme-context-deterministic-stored-v7 so previous artifacts cannot satisfy existing-build preflight.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 67200d65-83e1-4cb3-af1a-12be3d8d6983


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

Comment @coderabbitai help to get the list of available commands.

@0cwa
0cwa merged commit 27fbfd9 into main Sep 25, 2026
2 checks passed
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