Commit 2839978c authored by 石松洲's avatar 石松洲 Committed by John Wu

Use null oat dir in root service only

parent e73f87b7
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment