Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for gzip VABC algorithm #333

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Add support for gzip VABC algorithm #333

merged 1 commit into from
Aug 19, 2024

Conversation

chenxiaolong
Copy link
Owner

@chenxiaolong chenxiaolong commented Aug 18, 2024

Older devices, like the Pixel 4a 5G (bramble) use gzip instead of lz4.

This commit also reworks the CoW size estimate calculation to add the same constant headroom that AOSP's delta_generator adds. Previously, avbroot was already adding an additional 1% to account for differences in compression ratios across compression library implementations. This papered over the issue for large partitions, but small partitions could still have a CoW size estimate that's too small. Adding the constant headroom prevents ENOSPC when flashing those partitions.

Fixes: #332

@chenxiaolong chenxiaolong self-assigned this Aug 18, 2024
@chenxiaolong chenxiaolong force-pushed the vabc_gzip branch 3 times, most recently from fa81f5a to 1fa35fd Compare August 19, 2024 03:26
Older devices, like the Pixel 4a 5G (bramble) use gzip instead of lz4.

This commit also reworks the CoW size estimate calculation to add the
same constant headroom that AOSP's delta_generator adds. Previously,
avbroot was already adding an additional 1% to account for differences
in compression ratios across compression library implementations. This
papered over the issue for large partitions, but small partitions could
still have a CoW size estimate that's too small. Adding the constant
headroom prevents ENOSPC when flashing those partitions.

Fixes: #332

Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong merged commit 59ca759 into master Aug 19, 2024
5 checks passed
chenxiaolong added a commit that referenced this pull request Aug 19, 2024
Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong deleted the vabc_gzip branch August 19, 2024 03:45
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.

Error while Patching Image: "Unsupported VABC compression: gz"
1 participant