Skip to content

Comments

Added support for Python 3.12, and support for generating brotli compressed images#21

Open
rcky844 wants to merge 4 commits intoxpirt:masterfrom
rcky844:master
Open

Added support for Python 3.12, and support for generating brotli compressed images#21
rcky844 wants to merge 4 commits intoxpirt:masterfrom
rcky844:master

Conversation

@rcky844
Copy link

@rcky844 rcky844 commented Jun 3, 2025

Tested fine with my own images, but code review will be left to you to decide.

danw and others added 4 commits June 3, 2025 04:30
imp is deprecated, and has been removed in python 3.12+.

This is largely following this example:

https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly

Bug: 388344853
Test: treehugger
Change-Id: I3b4f7659377951d7c1291f11a977516924b25393
When the specified device_specific code isn't found, handle the error
with a log statement rather than a NoneType exception.

Fixes: 390497895
Test: treehugger
Change-Id: Id5925f4e9ec9ae35d217823fc32f1ac7f06f1652
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)

Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
Based on common.py implementation (commit 3c22af3).

Signed-off-by: Ricky Cheung <rcheung844@gmail.com>
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