Fix file permissions for Android 14 (#201)
Dex file should not be writable, otherwise it causes java.lang.SecurityException. Here is the related [soucre code](https://cs.android.com/android/platform/superproject/+/master:art/runtime/native/dalvik_system_DexFile.cc;l=381) of Android 14. --------- Co-authored-by: LoveSy <shana@zju.edu.cn>
This commit is contained in:
parent
d2b1de7ba5
commit
5d927f1dd2
|
|
@ -137,6 +137,7 @@ public class LSPApplication {
|
||||||
Files.copy(is, cacheApkPath);
|
Files.copy(is, cacheApkPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cacheApkPath.toFile().setWritable(false);
|
||||||
|
|
||||||
var mPackages = (Map<?, ?>) XposedHelpers.getObjectField(activityThread, "mPackages");
|
var mPackages = (Map<?, ?>) XposedHelpers.getObjectField(activityThread, "mPackages");
|
||||||
mPackages.remove(appInfo.packageName);
|
mPackages.remove(appInfo.packageName);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue