Skip to content

Make release APK bytecode reproducible across ABI builds - #170

Merged
andre487 merged 1 commit into
mainfrom
fix/reproducible-release-kotlin
Nov 28, 2026
Merged

andre487 merged 1 commit into
mainfrom
fix/reproducible-release-kotlin

Conversation

@andre487

@andre487 andre487 commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

The release script builds each ABI in the same Gradle project directory. On v1.5.0, assembling armeabi-v7a after arm64-v8a changed the Compose bytecode in MainActivityKt. R8 then retained an extra parameter in sshConnectionPrompt. The resulting DEX matched the published armeabi-v7a APK, while clean builds produced the signature reported by F-Droid.

Pass -Pkotlin.incremental=false to each release APK assembly so each ABI gets the same Kotlin compilation as a clean build. This applies to future releases. Reproducing the already published v1.5.0 binary is tracked in #169.

Verified on v1.5.0 with unsigned APKs and a shared native AAR. Three parallel clean armeabi-v7a builds were byte-identical. Disabling incremental Kotlin compilation in the reused directory produced the same DEX as the clean build.

With the fix enabled for both sequential builds, the unsigned arm64-v8a and armeabi-v7a APKs each matched their respective clean reference byte for byte (cmp).

APK artifacts

Built from commit ded36a52 by CI run #544.
Artifacts expire after 14 days. Neither APK uses the MegaProxy release key.

@andre487
andre487 merged commit 703f8d7 into main Nov 28, 2026
14 checks passed
@andre487
andre487 deleted the fix/reproducible-release-kotlin branch November 28, 2026 10:34
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