Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 12+ giving incorrect results #1

Open
viktor76525 opened this issue Jul 2, 2024 · 2 comments
Open

Android 12+ giving incorrect results #1

viktor76525 opened this issue Jul 2, 2024 · 2 comments

Comments

@viktor76525
Copy link

viktor76525 commented Jul 2, 2024

I have 2 APKs and a delta APK to get from the first to the second, not much has really changed (compressed delta is 65k) and both are signed.

On a computer the file rebuilds fine.
On a devices running Android 8, 11 the file rebuilds fine.
The same application on Android 12, 13 and 14 cannot rebuild the APK. It gives the wrong checksum, the bytes are different in the result APK after position 0x007fa3e0 of a 25 MB APK and trying to open the result with ARK on the computer gives the error:

Loading the archive ‘rebuild.apk’ failed with the following error:
Failed to open archive: Zip archive inconsistent: central directory overlaps EOCD, or there is space between them

The file size has changed from 25,233,092 bytes to 25,232,728 in the broken rebuild (364 fewer bytes in the rebuild). Android 12+ all have the same incorrect result checksum.

P.S. I also had to add the parameter ::DefaultDeflater to FileByFileV1DeltaApplier(::DefaultDeflater) in the sample command in README.md for it to work.

@viktor76525 viktor76525 changed the title Android 14 giving incorrect results Android 12+ giving incorrect results Jul 2, 2024
@viktor76525
Copy link
Author

I'll have a look at some of these workarounds:
google/archive-patcher#183

@viktor76525
Copy link
Author

viktor76525 commented Jul 2, 2024

There's another repo suffixed with -android so I guess the only issue here is the README.md file is out of date.

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

No branches or pull requests

1 participant