Fix a live Android app bug and push the patch to all users instantly without submitting a new APK to the app store
Deliver an emergency hotfix from your own server that takes effect the next time a user opens the app
Merge patches from multiple developers into one combined .apatch file and ship it as a single update
Requires the apkpatch CLI tool and your app release keystore to generate and sign a patch file.
AndFix is an Android library from Alibaba that lets developers fix bugs in a published app without asking users to download a full update. The name stands for Android hot-fix. It supports Android versions from 2.3 through 7.0 across a wide range of device types, covering both 32-bit and 64-bit hardware architectures. The way it works is that developers prepare a small patch file, called an .apatch file, that contains only the changed code. This patch is then delivered from the developer's own server to users' devices. Once the app receives and loads the patch, the fix takes effect immediately without restarting the app. The library achieves this by replacing the old method's code in memory with the new version at runtime. To create a patch, Alibaba provides a command-line tool called apkpatch. You give it two copies of your app, the old published version and the new fixed version, and it generates the patch file. If multiple developers have fixed separate bugs, you can merge their individual patch files into one combined patch. The patch file must be signed with your app's keystore to prevent tampering. Integrating AndFix into an Android project involves adding a few lines to your build configuration, initializing a patch manager when the app starts, and calling a method to load any patches that have been downloaded. Developers are responsible for building the delivery mechanism that gets the patch file onto user devices, since AndFix handles only the loading and applying side. The library is open source under the Apache 2.0 license. Note that it targets older Android versions and was last updated several years ago, so teams targeting modern Android releases should verify compatibility before adopting it.
← alibaba on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.