Skip to content

fix: install boot animation at the product image root - #108

Merged
0cwa merged 9 commits into
mainfrom
fix/boot-animation-apex-precedence-20260925
Sep 25, 2026
Merged

0cwa merged 9 commits into
mainfrom
fix/boot-animation-apex-precedence-20260925

Conversation

@0cwa

@0cwa 0cwa commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Diagnosis

The force-published shiba Magisk OTA from run 36007288494 definitely exercised the previous custom-animation path, but the build log contains the clue to why it still does not show:

Adding Directory filesystem entry: /product

The helper had already unpacked product.img as its own standalone filesystem. AFSR represents that image from filesystem root /, while Android mounts the completed image at /product. The previous adapter installed /product/media/bootanimation.zip inside product.img, creating a nested product directory. At runtime that corresponds to /product/product/media/bootanimation.zip, not the path Android probes.

This also fits the on-device observations:

  • ro.product.bootanim.file is unset, so Android uses the standard product filename;
  • /apex/com.android.bootanimation is not present on the running shiba, so there is no evidence that APEX precedence is masking the product animation.

The earlier APEX-bypass experiment has therefore been removed. This PR does not patch the bootanimation executable.

Fix

Keep the existing soft-fork adapter and use the correct per-partition filesystem path:

  • request only product.img;
  • write /media/bootanimation.zip and /media/bootanimation-dark.zip inside the product filesystem;
  • Android then sees those as /product/media/bootanimation.zip and /product/media/bootanimation-dark.zip after the partition is mounted;
  • continue canonicalizing frame entries to ZIP_STORED for Android compatibility;
  • never create a nested /product directory inside product.img.

Finished-OTA verification

After patching, extract the finished OTA's product.img, AVB-unpack it, AFSR-unpack it, and require:

  • fs_tree/media/bootanimation.zip exists and exactly matches the deterministic runtime payload;
  • fs_tree/media/bootanimation-dark.zip exists and exactly matches it.

A verification failure deletes the candidate OTA and blocks publication.

Selection identity

The boot-animation selection fingerprint includes the adapter contract version product-image-root-stored-v4, so older broken artifacts with the same source animation cannot satisfy existing-build preflight.

Why this is less brittle

This does not modify GrapheneOS/AOSP executable code, search order, properties, or APEX handling. It uses Android's existing standard product boot-animation path and treats the product partition as the mount-root filesystem it is.

@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: bdfcf5ab-68b1-4920-a198-cf03655e569f


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 changed the title fix: bypass Android 17 boot animation APEX precedence fix: install boot animation at the product image root Sep 25, 2026
@0cwa
0cwa merged commit 770c3e3 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