Do not stop reproducible comparison at the first mismatch#14570
Closed
BarbossHack wants to merge 1 commit intosignalapp:mainfrom
Closed
Do not stop reproducible comparison at the first mismatch#14570BarbossHack wants to merge 1 commit intosignalapp:mainfrom
BarbossHack wants to merge 1 commit intosignalapp:mainfrom
Conversation
Contributor
Author
Example(using protonmail apk just to show how many mismatch the script misses) Before$ uv run apkdiff.py ProtonMail-7.7.0_16219.apk ProtonMail-7.7.1_16244.apk
Comparing:
ProtonMail-7.7.0_16219.apk
ProtonMail-7.7.1_16244.apk
Unzipping...
Comparing zip entry names...
Manifest lengths differ!
Sorted manifests don't match, META-INF/androidx.compose.runtime_runtime-retain.version vs META-INF/androidx.compose.runtime_runtime-saveable.version
APKs don't match!Afteruv run apkdiff.py ProtonMail-7.7.0_16219.apk ProtonMail-7.7.1_16244.apk
Comparing:
ProtonMail-7.7.0_16219.apk
ProtonMail-7.7.1_16244.apk
Unzipping...
Comparing zip entry names...
Manifest lengths differ! 2375 vs 2372
Files present only in ProtonMail-7.7.0_16219.apk:
- META-INF/androidx.compose.runtime_runtime-retain.version
- META-INF/androidx.window_window-core.version
- META-INF/androidx.window_window.version
- META-INF/ui.kotlin_module
Files present only in ProtonMail-7.7.1_16244.apk:
- META-INF/ui_release.kotlin_module
Comparing zip entry contents...
APK info lists of different length! 2375 vs 2372
APKs differ on file META-INF/version-control-info.textproto! Files extracted to the mismatches/ directory.
APKs differ on file assets/dexopt/baseline.prof! Files extracted to the mismatches/ directory.
APKs differ on file assets/dexopt/baseline.profm! Files extracted to the mismatches/ directory.
APKs differ on file classes.dex! Files extracted to the mismatches/ directory.
APKs differ on file classes2.dex! Files extracted to the mismatches/ directory.
[...]
APKs differ on file res/zc.xml! Files extracted to the mismatches/ directory.
Comparing resources.arsc (may take a while)...
Package length mismatch: 74824 vs 74699
Files have differences beyond the allowed .res1 differences.
APKs differ on file META-INF/PROTONMA.SF! Files extracted to the mismatches/ directory.
APKs differ on file META-INF/PROTONMA.RSA! Files extracted to the mismatches/ directory.
APKs don't match! |
alabiaga
pushed a commit
to alabiaga/Signal-Android
that referenced
this pull request
Feb 26, 2026
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.
First time contributor checklist
Contributor checklist
Fixes #1234syntaxDescription
Short
This improves the reproducible script so that it shows all mismatches, not only the first one.
Long
The modifications are located in the three main functions of apkdiff.py
Instead of comparing entry names and antry contents using a single logical AND, both comparisons are now always executed and their results returned. This allows mismatches from both comparisons to be displayed.
Instead of returning on the first name mismatch, the function now checks which entry names are (or are not) present in both APKs, displays them, and then returns False. This makes it easier to see all entry name mismatches.
The function no longer returns immediately when entry lengths mismatch. It continues checking the contents of all entries and returns False afterward.