Repository navigation
Make release APK bytecode reproducible across ABI builds - #170
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=falseto 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
ded36a52by CI run #544.Artifacts expire after 14 days. Neither APK uses the MegaProxy release key.