Limitations of the Android Andfix repair method

Source: Internet
Author: User

Here read a lot of online information about the repair, one by one posted here for easy viewing:

Https://github.com/alibaba/AndFix This is the official office. To understand the use, be sure to look here.

Http://www.jianshu.com/p/479b8c7ec3e3 If you can't read the official, look here.

HTTP://BLOG.CSDN.NET/LPFTOBETHEONE/ARTICLE/DETAILS/50435371 is suitable for preliminary understanding of use, a simple demo (this article has a fix for the patch can only load one problem)

Http://www.cnblogs.com/common1140/p/5287040.html This article is closer to our actual development, how to use repair-generation-upload patch-Download patch

https://mp.weixin.qq.com/s?__biz=MzI1MTA1MzM2Nw==&mid=400118620&idx=1&sn= B4fdd5055731290eef12ad0d17f39d4a&scene=1&srcid=1106imu9zgwybid13e7y2nei#wechat_redirect here is the place to find the principle.

Here are a few ways to fix it:

Andfix Repair:

① does not support YunOS
② Unable to add new class and new field
③ needs to use the pre-hardening apk to make patches, but the patch file is easily decompile, that is, the modified class source is easy to leak.
④ using a hardened platform may invalidate the hot patch function (see someone in the 360 reinforcement that raised the issue, not yet verified by yourself).

⑤andfix does not support modification of layout resources, etc.

⑥ Official website: Andfix supports Android version from 2.3 to 7.0, both ARM and X86 architecture, both Dalvik and ART runtime, both 32b it and 64bit.

⑦ application patches do not require a restart. However, because the initialization of the class is skipped directly from the implementation, the initialization is complete, so there is a problem with the static function, the static member, the constructor, and the class class.forname of the complex point will probably hang up directly.

A potential problem with ⑧andfix:

Once the patch is loaded, the Out.apatch file is copied to the/apatch folder in the Getfilesdir directory, and the next patch update detects if the patch has been added to the Apatch folder. Out.apatch that loaded sdcard will not be copied if it already exists.

Source:

 Public voidAddpatch (String Path)throwsIOException {File src =NewFile (path); File dest=NewFile (Mpatchdir, Src.getname ()); if(!src.exists ()) {
     Throw Newfilenotfoundexception (path); }
   if(Dest.exists ()) {
LOG.D (TAG, "patch [" + Path + "] have be loaded."); return; }
Fileutil.copyfile (SRC, dest);//copy to patch ' s directoryPatch patch =Addpatch (dest); if(Patch! =NULL) {
Loadpatch (patch); }
}

Limitations of the Android Andfix repair method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.