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

Hot Fix补丁如何生成,生成的文件名规则是什么样的,以及放到哪个目录下运行? #40

Open
xxxyanchenxxx opened this issue Dec 22, 2015 · 3 comments

Comments

@xxxyanchenxxx
Copy link

看到说能够支持host fix,但看了源码,对host fix的使用还是很云里雾里的....
关于如何生成,生成后的文件名规则是什么样的,以及放到手机的哪个目录能够运行生效。
看到都没人题,难道就我一个人有这样的疑问??

在源码里面找到了一些有关的代码,但要反推出hot fix的使用还是很难。
/**

  • Created by yb.wang on 15/7/30.
    */
    public class HotPatchItem {
    private static final Logger log;
    private static final String HOTPATCH_FILE_NAME="hotfix.zip";

谢谢....

@peacepassion
Copy link

@xxxyanchenxxx 看了下源码,我的理解是这样的,hotfix的补丁也是插件项目,但是是放在hotpatch下的hotfix.zip文件,这个文件应该是一个dex,但是在加载进classloader的时候,其优先级比较高,先加载进classloader,可以参考一下BundlePathLoader#expandFieldArray()方法。这样的话,就替换掉了原来有bug的插件。

@javalover
Copy link

@peacepassion 我觉得应该不是这么设计的,插件有升级系统,可以BoundleCore#updateBundle,插件不需要hotfix,只需要升级就可以了呀,这个框架的 Hotfix我也还没看懂,看代码是基于 多dex 的方式,但又好像没考虑到 class_ispreverified 的问题

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

3 participants