mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-19 09:27:30 +00:00
scripts: match AGP zip alignment in android reproduce build (#7196)
Release APKs are packaged by AGP (:android:assembleRelease), which zero-pads ZIP alignment. verify_apk re-aligned the rebuilt APK with repro-apk's --pad-like-apksigner (the 0xd935 extra-field scheme of standalone apksigner >= 35.0.0-rc1), so apksigcopier aborted with "APK Signing Block offset < central directory offset". Drop the flag so the padding matches AGP's output; the rebuilt APK then reproduces the published one byte-for-byte.
This commit is contained in:
@@ -118,9 +118,14 @@ check_apk() {
|
||||
verify_apk() {
|
||||
apk_name="$1"
|
||||
|
||||
# Release APKs are packaged by AGP (gradle :android:assembleRelease; AGP version is
|
||||
# gradle.plugin.version in apps/multiplatform/gradle.properties), which zero-pads ZIP
|
||||
# alignment. Do NOT add --pad-like-apksigner (standalone apksigner >= 35.0.0-rc1 uses
|
||||
# the 0xd935 extra-field padding) unless AGP is bumped to a packager that uses it —
|
||||
# otherwise apksigcopier aborts with "APK Signing Block offset < central directory offset".
|
||||
# https://github.com/obfusk/apksigcopier?tab=readme-ov-file#what-about-signatures-made-by-apksigner-from-build-tools--3500-rc1
|
||||
docker exec "${CONTAINER_NAME}" repro-apk zipalign --page-size 16 --pad-like-apksigner --replace "${DOCKER_PATH_VERIFY}/${apk_name}.${SUFFIX_BUILT}" \
|
||||
"${DOCKER_PATH_VERIFY}/${apk_name}.aligned"
|
||||
docker exec "${CONTAINER_NAME}" repro-apk zipalign --page-size 16 --replace "${DOCKER_PATH_VERIFY}/${apk_name}.${SUFFIX_BUILT}" \
|
||||
"${DOCKER_PATH_VERIFY}/${apk_name}.aligned"
|
||||
docker exec "${CONTAINER_NAME}" mv "${DOCKER_PATH_VERIFY}/${apk_name}.aligned" \
|
||||
"${DOCKER_PATH_VERIFY}/${apk_name}.${SUFFIX_BUILT}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user