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

编译后的可执行文件 #50

Closed
ghost opened this issue Feb 28, 2020 · 1 comment
Closed

编译后的可执行文件 #50

ghost opened this issue Feb 28, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 28, 2020

你好:
我下了hdiffpatch_v3.0.8_ApkDiffPatch_v1.3.2_bin_beta 这个包,
运行 ZipDiff 和 ZipPatch 之后,V2签名的apk 不能正常安装。但是
我试了
hdiffz.exe
hpatchz.exe
可以!
所以想问下, 这两个文件是怎么通过源码编译生成的?

@sisong
Copy link
Owner

sisong commented Feb 28, 2020

“V2签名的apk 不能正常安装” 当然不能,diff前需要Released newZip := AndroidSDK#apksigner(ApkNormalized(newZip)),才能保证生成的apk二进制相同;

“这两个文件是怎么通过源码编译生成的?” hdiffz和hpatchz是HDiffPatch这个仓库生成的;

HDiffPatch的实现只是把文件输入看作2块二进制数据,来执行diff&patch; ApkDiffPatch是把2个zip文件解压缩后调用HDiffPatch来实现的;差别在于HDiffPatch打补丁速度快,而ApkDiffPatch生成的补丁小;

@sisong sisong closed this as completed Mar 6, 2020
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