mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-23 09:51:33 +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;
|
package com.topjohnwu.magisk.utils;
|
||||||
|
|
||||||
|
import android.os.Process;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@ -14,8 +16,8 @@ public class DynamicClassLoader extends BaseDexClassLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DynamicClassLoader(File apk, ClassLoader parent) {
|
public DynamicClassLoader(File apk, ClassLoader parent) {
|
||||||
// Set optimizedDirectory to null to bypass DexFile's security checks
|
// Set optimizedDirectory to null for RootService to bypass DexFile's security checks
|
||||||
super(apk.getPath(), null, null, parent);
|
super(apk.getPath(), Process.myUid() == 0 ? null : apk.getParentFile(), null, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user