Dynamic load updated APK for patching

Magisk Manager sometimes updates the code for patching the APK due to several changes.
When an old manager tries to patch an updated APK using its internal methods, it is
sometimes incomplete, or simply won't work at all.

This commit exposes an API that can be dynamically loaded from an old app to invoke the
updated patchAPK method from the downloaded new APK.
This commit is contained in:
topjohnwu
2018-12-31 15:53:24 +08:00
parent 2e10fa494f
commit 6d27eb7f64
3 changed files with 22 additions and 16 deletions
+4 -1
View File
@@ -1,10 +1,13 @@
package a;
import com.topjohnwu.core.utils.BootSigner;
import com.topjohnwu.magisk.utils.PatchAPK;
import androidx.annotation.Keep;
@Keep
public class a extends BootSigner {
/* stub */
public static boolean patchAPK(String in, String out, String pkg) {
return PatchAPK.patch(in, out, pkg);
}
}