mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-19 19:18:30 +00:00
Use null oat dir in root service only
This commit is contained in:
parent
e73f87b758
commit
2839978cc1
@ -1,5 +1,7 @@
|
||||
package com.topjohnwu.magisk.utils;
|
||||
|
||||
import android.os.Process;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
@ -14,8 +16,8 @@ public class DynamicClassLoader extends BaseDexClassLoader {
|
||||
}
|
||||
|
||||
public DynamicClassLoader(File apk, ClassLoader parent) {
|
||||
// Set optimizedDirectory to null to bypass DexFile's security checks
|
||||
super(apk.getPath(), null, null, parent);
|
||||
// Set optimizedDirectory to null for RootService to bypass DexFile's security checks
|
||||
super(apk.getPath(), Process.myUid() == 0 ? null : apk.getParentFile(), null, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user