-
Notifications
You must be signed in to change notification settings - Fork 74
On Android 12 devices, The file generated with the patch was different from the origin file; #183
Comments
I also encountered this problem |
me too |
1 similar comment
me too |
I also encountered this problem. Its issue with only Android 12, works fine in linux PC. |
Any solution? @pspencil |
Sorry I don't work on this anymore. I have some vague memories of Android 12 changing the underlying zip library. Perhaps you can try explicitly linking in your own zip lib. (Not sure how to do that though) |
My solution 1: ApkDiffPatch; MIT license; C++; linking own zlib; only for own apk; (can't be used by Android app store, because it requires re-signing apks before diff); |
How to integrate sfpatcher; in android app? are there jar/aar files available? |
Do you think the problem could be solved by changing the Zlib version in server side for generating diff?@pspencil |
I finally fixed this problem; in the near future, I will make a PR |
Can you share how to fix it?more PR details? |
finally I copy the zlib jni code(below android 12) solved |
Can you submit changes and share PR details? |
copy the zlib c code and use custom Deflater bind the custom zlib with jni。 |
It's fixed in my PR |
Inspired by @hamid97m's solution, we addressed this issue by bundling zlib 1.2.13 binaries (the currently latest version) and creating a version of Sources: https://github.com/EIDU/archive-patcher-android The library is on Maven Central. See the repo's |
On Android 12 devices(Almost all of android 12 devices), I found in certain cases the file generated with the patch was different from the origin file;
env: android os version:android12,archive-patcher version:v1.1
my test files as flows:
old file:19onlyjar.zip
patch file:patch-onlyjar.zip
origin file:20onlyjar-ori.zip
how to reproduce:
1、unzip patch file first;
2、apply the patch with the following code:
` public static void applyPatch(File oldFile, File patchFile, File newFile, File tempDir) throws IOException {
3、compare the md5 between the origin file and the generated file in step2
19onlyjar.zip
patch-onlyjar.zip
20onlyjar-ori.zip
The text was updated successfully, but these errors were encountered: