mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-13 05:37:47 +02:00
Update dependencies, AGP, and SDK level
This commit is contained in:
@ -60,9 +60,11 @@ public class DynLoad {
|
||||
try {
|
||||
File external = new File(context.getExternalFilesDir(null), "magisk.apk");
|
||||
if (external.exists()) {
|
||||
apk.delete();
|
||||
try {
|
||||
var in = new FileInputStream(external);
|
||||
var out = new FileOutputStream(apk);
|
||||
apk.setReadOnly();
|
||||
try (in; out) {
|
||||
APKInstall.transfer(in, out);
|
||||
}
|
||||
@ -79,6 +81,7 @@ public class DynLoad {
|
||||
}
|
||||
|
||||
if (apk.exists()) {
|
||||
apk.setReadOnly();
|
||||
return new AppClassLoader(apk);
|
||||
}
|
||||
|
||||
@ -86,8 +89,10 @@ public class DynLoad {
|
||||
if (!context.getPackageName().equals(APPLICATION_ID)) {
|
||||
try {
|
||||
var info = context.getPackageManager().getApplicationInfo(APPLICATION_ID, 0);
|
||||
apk.delete();
|
||||
var src = new FileInputStream(info.sourceDir);
|
||||
var out = new FileOutputStream(apk);
|
||||
apk.setReadOnly();
|
||||
try (src; out) {
|
||||
APKInstall.transfer(src, out);
|
||||
}
|
||||
|
Reference in New Issue
Block a user