Fix SystemServer hook not working
This commit is contained in:
parent
54f5c435c5
commit
692d43cc57
|
|
@ -3,7 +3,7 @@ package com.elderdrivers.riru.edxp._hooker.yahfa;
|
||||||
import android.app.ActivityThread;
|
import android.app.ActivityThread;
|
||||||
|
|
||||||
import com.elderdrivers.riru.common.KeepMembers;
|
import com.elderdrivers.riru.common.KeepMembers;
|
||||||
import com.elderdrivers.riru.edxp._hooker.impl.OneplusWorkaround;
|
import com.elderdrivers.riru.edxp._hooker.impl.SystemMain;
|
||||||
|
|
||||||
import de.robv.android.xposed.XC_MethodHook;
|
import de.robv.android.xposed.XC_MethodHook;
|
||||||
|
|
||||||
|
|
@ -13,10 +13,8 @@ public class SystemMainHooker implements KeepMembers {
|
||||||
public static String methodName = "systemMain";
|
public static String methodName = "systemMain";
|
||||||
public static String methodSig = "()Landroid/app/ActivityThread;";
|
public static String methodSig = "()Landroid/app/ActivityThread;";
|
||||||
|
|
||||||
public static ClassLoader systemServerCL;
|
|
||||||
|
|
||||||
public static ActivityThread hook() throws Throwable {
|
public static ActivityThread hook() throws Throwable {
|
||||||
final XC_MethodHook methodHook = new OneplusWorkaround();
|
final XC_MethodHook methodHook = new SystemMain();
|
||||||
final XC_MethodHook.MethodHookParam param = new XC_MethodHook.MethodHookParam();
|
final XC_MethodHook.MethodHookParam param = new XC_MethodHook.MethodHookParam();
|
||||||
param.thisObject = null;
|
param.thisObject = null;
|
||||||
param.args = new Object[]{};
|
param.args = new Object[]{};
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import com.elderdrivers.riru.edxp._hooker.yahfa.SystemMainHooker;
|
||||||
import com.elderdrivers.riru.edxp.core.yahfa.HookMain;
|
import com.elderdrivers.riru.edxp.core.yahfa.HookMain;
|
||||||
import com.elderdrivers.riru.edxp.entry.yahfa.AppBootstrapHookInfo;
|
import com.elderdrivers.riru.edxp.entry.yahfa.AppBootstrapHookInfo;
|
||||||
import com.elderdrivers.riru.edxp.entry.yahfa.SysBootstrapHookInfo;
|
import com.elderdrivers.riru.edxp.entry.yahfa.SysBootstrapHookInfo;
|
||||||
|
import com.elderdrivers.riru.edxp.entry.yahfa.SysInnerHookInfo;
|
||||||
import com.elderdrivers.riru.edxp.entry.yahfa.WorkAroundHookInfo;
|
import com.elderdrivers.riru.edxp.entry.yahfa.WorkAroundHookInfo;
|
||||||
import com.elderdrivers.riru.edxp.util.Utils;
|
import com.elderdrivers.riru.edxp.util.Utils;
|
||||||
|
|
||||||
|
|
@ -125,13 +126,13 @@ public abstract class BaseRouter implements Router {
|
||||||
ClassLoader classLoader = BaseRouter.class.getClassLoader();
|
ClassLoader classLoader = BaseRouter.class.getClassLoader();
|
||||||
if (useXposedApi) {
|
if (useXposedApi) {
|
||||||
XposedHelpers.findAndHookMethod(StartBootstrapServicesHooker.className,
|
XposedHelpers.findAndHookMethod(StartBootstrapServicesHooker.className,
|
||||||
SystemMainHooker.systemServerCL,
|
SystemMain.systemServerCL,
|
||||||
StartBootstrapServicesHooker.methodName, new StartBootstrapServices());
|
StartBootstrapServicesHooker.methodName, new StartBootstrapServices());
|
||||||
} else {
|
} else {
|
||||||
HookMain.doHookDefault(
|
HookMain.doHookDefault(
|
||||||
classLoader,
|
classLoader,
|
||||||
SystemMainHooker.systemServerCL,
|
SystemMain.systemServerCL,
|
||||||
SystemMainHooker.class.getName());
|
SysInnerHookInfo.class.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@ import org.gradle.internal.os.OperatingSystem
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
version "v0.4.3.3_alpha"
|
version "v0.4.3.4_alpha"
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
versionCode = "4330"
|
versionCode = "4340"
|
||||||
module_name = "EdXposed"
|
module_name = "EdXposed"
|
||||||
jar_dest_dir = "${projectDir}/template_override/system/framework/"
|
jar_dest_dir = "${projectDir}/template_override/system/framework/"
|
||||||
is_windows = OperatingSystem.current().isWindows()
|
is_windows = OperatingSystem.current().isWindows()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
|
|
||||||
EDXP_VERSION="0.4.3.3_alpha (4330)"
|
EDXP_VERSION="0.4.3.4_alpha (4340)"
|
||||||
ANDROID_SDK=`getprop ro.build.version.sdk`
|
ANDROID_SDK=`getprop ro.build.version.sdk`
|
||||||
BUILD_DESC=`getprop ro.build.description`
|
BUILD_DESC=`getprop ro.build.description`
|
||||||
PRODUCT=`getprop ro.build.product`
|
PRODUCT=`getprop ro.build.product`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue