Instant modules: update module list in zygote before child process forked
This commit is contained in:
parent
93170d9388
commit
1df3d88c13
|
|
@ -1,4 +1,4 @@
|
|||
version: '0.4.5.1_beta({build})'
|
||||
version: '0.4.5.2_beta({build})'
|
||||
|
||||
environment:
|
||||
ANDROID_HOME: C:\android-sdk-windows
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ import java.util.Iterator;
|
|||
import java.util.ServiceLoader;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static com.elderdrivers.riru.edxp.proxy.BaseProxy.onBlackListed;
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public class Main implements KeepAll {
|
||||
|
||||
|
|
@ -66,6 +68,7 @@ public class Main implements KeepAll {
|
|||
|
||||
public static void forkAndSpecializePost(int pid, String appDataDir, String niceName) {
|
||||
if (isBlackListedProcess(Process.myUid())) {
|
||||
onBlackListed();
|
||||
return;
|
||||
}
|
||||
final EdxpImpl edxp = getEdxpImpl();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.elderdrivers.riru.edxp.proxy;
|
|||
|
||||
import com.elderdrivers.riru.edxp.core.Proxy;
|
||||
|
||||
import de.robv.android.xposed.XposedBridge;
|
||||
|
||||
public abstract class BaseProxy implements Proxy {
|
||||
|
||||
protected Router mRouter;
|
||||
|
|
@ -14,4 +16,8 @@ public abstract class BaseProxy implements Proxy {
|
|||
public boolean init() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void onBlackListed() {
|
||||
XposedBridge.clearAllCallbacks();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,8 +131,4 @@ public class BlackWhiteListProxy extends BaseProxy {
|
|||
}
|
||||
return needHook;
|
||||
}
|
||||
|
||||
private static void onBlackListed() {
|
||||
XposedBridge.clearAllCallbacks();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import org.gradle.internal.os.OperatingSystem
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
// Values set here will be overriden by AppVeyor, feel free to modify during development.
|
||||
def buildVersionName = 'v0.4.5.1_beta'
|
||||
def buildVersionName = 'v0.4.5.2_beta'
|
||||
def buildVersionCode = 10000
|
||||
|
||||
if (System.env.APPVEYOR_BUILD_VERSION != null) {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace edxp {
|
|||
variant_ = static_cast<Variant>(variant);
|
||||
}
|
||||
}
|
||||
LOGI("EdxpVariant: %d", variant_);
|
||||
// LOGI("EdxpVariant: %d", variant_);
|
||||
|
||||
initialized_ = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -309,8 +309,7 @@ public final class XposedInit {
|
|||
|
||||
public static boolean loadModules(boolean isInZygote, boolean callInitZygote) throws IOException {
|
||||
boolean hasLoaded = !modulesLoaded.compareAndSet(false, true);
|
||||
// dynamic module list mode doesn't apply to loading in zygote
|
||||
if (hasLoaded && (isInZygote || !EdXpConfigGlobal.getConfig().isDynamicModulesMode())) {
|
||||
if (hasLoaded && !EdXpConfigGlobal.getConfig().isDynamicModulesMode()) {
|
||||
return false;
|
||||
}
|
||||
synchronized (moduleLoadLock) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue