mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Fix root service on stub
This commit is contained in:
parent
c1fc3f373c
commit
a009fdbdc3
@ -9,6 +9,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.ContentProvider;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.os.Process;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public class DelegateComponentFactory extends AppComponentFactory {
|
||||
@ -21,6 +22,10 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
|
||||
@Override
|
||||
public ClassLoader instantiateClassLoader(ClassLoader cl, ApplicationInfo info) {
|
||||
if (Process.myUid() == 0) {
|
||||
// Do not do anything in root process
|
||||
return cl;
|
||||
}
|
||||
DynLoad.loadApk(info);
|
||||
return new DelegateClassLoader();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user