Created
March 23, 2026 04:33
-
-
Save uyjulian/aa49a2af52e5155750f8f9c20e7221f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # SPDX-License-Identifier: MIT | |
| # This program fixes file header in place for BDJ.czf (referenced by libcvm.so/modified phoneME) | |
| # such that it can be extracted by standard tools. | |
| import sys | |
| import zipfile | |
| with zipfile.ZipFile(sys.argv[1], "a") as myzip: | |
| myzip.comment = b"Fixed CZF" | |
| for zfi in myzip.infolist(): | |
| if zfi.compress_type == 16: | |
| zfi.compress_type = zipfile.ZIP_STORED | |
| if zfi.compress_type == 24: | |
| zfi.compress_type = zipfile.ZIP_DEFLATED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment