Commit 8aa1f24a authored by swift_gan's avatar swift_gan

fix method stub on 64bit

parent 6e652fbf
......@@ -60,7 +60,8 @@ TEMP_STUB_INFO = """
"""
STUB_SIZES = [10,20,30,30,30,30,30,20,10,10,5,5,3]
STUB_SIZES_32 = [10,20,30,30,30,30,30,20,10,10,5,5,3]
STUB_SIZES_64 = [10,20,30,30,30,30,50,50]
HAS_BACKUP = False
......@@ -126,20 +127,29 @@ def genCallOriginClass(is64Bit, args, index):
method = TEMP_STUB_CALL_ORIGIN_CLASS % (getCallOriginClassName(args, index), getMethodBackupName(index), genArgsListForCallOriginMethod(is64Bit, args))
return method
def genStubInfo():
def genStubInfo32():
hasStub = "true" if HAS_BACKUP else "false"
stubSizes = ""
for args in range(len(STUB_SIZES)):
for args in range(len(STUB_SIZES_32)):
if (args != 0):
stubSizes += ", "
stubSizes += str(STUB_SIZES[args])
stubSizes += str(STUB_SIZES_32[args])
return TEMP_STUB_INFO % (hasStub, stubSizes)
def genStubInfo64():
hasStub = "true" if HAS_BACKUP else "false"
stubSizes = ""
for args in range(len(STUB_SIZES_64)):
if (args != 0):
stubSizes += ", "
stubSizes += str(STUB_SIZES_64[args])
return TEMP_STUB_INFO % (hasStub, stubSizes)
def gen32Stub(packageDir):
class_content = genStubInfo()
class_content = genStubInfo32()
class_name = STUB_FILE_NAME + "32"
for args in range(len(STUB_SIZES)):
for index in range(STUB_SIZES[args]):
for args in range(len(STUB_SIZES_32)):
for index in range(STUB_SIZES_32[args]):
class_content += """\n\n\t//stub of arg size %d, index %d""" % (args, index)
class_content += genHookMethod(False, args, index)
if HAS_BACKUP:
......@@ -155,10 +165,10 @@ def gen32Stub(packageDir):
def gen64Stub(packageDir):
class_content = genStubInfo()
class_content = genStubInfo64()
class_name = STUB_FILE_NAME + "64"
for args in range(len(STUB_SIZES)):
for index in range(STUB_SIZES[args]):
for args in range(len(STUB_SIZES_64)):
for index in range(STUB_SIZES_64[args]):
class_content += """\n\n\t//stub of arg size %d, index %d""" % (args, index)
class_content += genHookMethod(True, args, index)
if HAS_BACKUP:
......
......@@ -24,12 +24,15 @@ import static de.robv.android.xposed.XposedBridge.sHookedMethodCallbacks;
public class HookStubManager {
public static volatile boolean is64Bit;
//64bits arg0 - arg7 is in reg x1 - x7 and > 7 is in stack, but can not match
public final static int MAX_64_ARGS = 7;
public static int MAX_STUB_ARGS = 0;
public static int[] stubSizes;
public static boolean hasStubBackup = false;
public static boolean hasStubBackup;
public static AtomicInteger[] curUseStubIndexes;
......@@ -42,7 +45,8 @@ public class HookStubManager {
= sHookedMethodCallbacks;
static {
Class stubClass = SandHook.is64Bit() ? MethodHookerStubs64.class : MethodHookerStubs32.class;
is64Bit = SandHook.is64Bit();
Class stubClass = is64Bit ? MethodHookerStubs64.class : MethodHookerStubs32.class;
stubSizes = (int[]) XposedHelpers.getStaticObjectField(stubClass, "stubSizes");
Boolean hasBackup = (Boolean) XposedHelpers.getStaticObjectField(stubClass, "hasStubBackup");
hasStubBackup = hasBackup != null && (hasBackup && !XposedCompat.useNewCallBackup);
......@@ -90,6 +94,8 @@ public class HookStubManager {
needStubArgCount += parType.length;
if (needStubArgCount > MAX_STUB_ARGS)
return null;
if (is64Bit && needStubArgCount > MAX_64_ARGS)
return null;
for (Class par:parType) {
if (!ParamWrapper.support(par))
return null;
......@@ -99,7 +105,7 @@ public class HookStubManager {
}
synchronized (HookStubManager.class) {
StubMethodsInfo stubMethodInfo = getStubMethodPair(SandHook.is64Bit(), needStubArgCount);
StubMethodsInfo stubMethodInfo = getStubMethodPair(is64Bit, needStubArgCount);
if (stubMethodInfo == null)
return null;
HookMethodEntity entity = new HookMethodEntity(origin, stubMethodInfo.hook, stubMethodInfo.backup);
......@@ -181,7 +187,7 @@ public class HookStubManager {
}
public static Method getCallOriginMethod(int args, int index) {
Class stubClass = SandHook.is64Bit() ? MethodHookerStubs64.class : MethodHookerStubs32.class;
Class stubClass = is64Bit ? MethodHookerStubs64.class : MethodHookerStubs32.class;
String className = stubClass.getName();
className += "$";
className += getCallOriginClassName(args, index);
......
......@@ -12,7 +12,7 @@ import static com.swift.sandhook.xposedcompat.utils.DexLog.printCallOriginError;
public class MethodHookerStubs64 {
public static boolean hasStubBackup = false;
public static int[] stubSizes = {10, 20, 30, 30, 30, 30, 30, 20, 10, 10, 5, 5, 3};
public static int[] stubSizes = {10, 20, 30, 30, 30, 30, 50, 50};
//stub of arg size 0, index 0
......@@ -1095,6 +1095,126 @@ public class MethodHookerStubs64 {
}
//stub of arg size 6, index 30
public static long stub_hook_30(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 30), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 31
public static long stub_hook_31(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 31), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 32
public static long stub_hook_32(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 32), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 33
public static long stub_hook_33(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 33), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 34
public static long stub_hook_34(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 34), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 35
public static long stub_hook_35(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 35), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 36
public static long stub_hook_36(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 36), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 37
public static long stub_hook_37(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 37), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 38
public static long stub_hook_38(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 38), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 39
public static long stub_hook_39(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 39), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 40
public static long stub_hook_40(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 40), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 41
public static long stub_hook_41(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 41), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 42
public static long stub_hook_42(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 42), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 43
public static long stub_hook_43(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 43), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 44
public static long stub_hook_44(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 44), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 45
public static long stub_hook_45(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 45), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 46
public static long stub_hook_46(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 46), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 47
public static long stub_hook_47(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 47), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 48
public static long stub_hook_48(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 48), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 6, index 49
public static long stub_hook_49(long a0, long a1, long a2, long a3, long a4, long a5) throws Throwable {
return hookBridge(getMethodId(6, 49), null , a0, a1, a2, a3, a4, a5);
}
//stub of arg size 7, index 0
public static long stub_hook_0(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 0), null , a0, a1, a2, a3, a4, a5, a6);
......@@ -1215,201 +1335,183 @@ public class MethodHookerStubs64 {
}
//stub of arg size 8, index 0
public static long stub_hook_0(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 0), null , a0, a1, a2, a3, a4, a5, a6, a7);
}
//stub of arg size 8, index 1
public static long stub_hook_1(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 1), null , a0, a1, a2, a3, a4, a5, a6, a7);
}
//stub of arg size 8, index 2
public static long stub_hook_2(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 2), null , a0, a1, a2, a3, a4, a5, a6, a7);
}
//stub of arg size 8, index 3
public static long stub_hook_3(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 3), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 20
public static long stub_hook_20(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 20), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 8, index 4
public static long stub_hook_4(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 4), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 21
public static long stub_hook_21(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 21), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 8, index 5
public static long stub_hook_5(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 5), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 22
public static long stub_hook_22(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 22), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 8, index 6
public static long stub_hook_6(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 6), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 23
public static long stub_hook_23(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 23), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 8, index 7
public static long stub_hook_7(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 7), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 24
public static long stub_hook_24(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 24), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 8, index 8
public static long stub_hook_8(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 8), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 25
public static long stub_hook_25(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 25), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 8, index 9
public static long stub_hook_9(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7) throws Throwable {
return hookBridge(getMethodId(8, 9), null , a0, a1, a2, a3, a4, a5, a6, a7);
//stub of arg size 7, index 26
public static long stub_hook_26(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 26), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 0
public static long stub_hook_0(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 0), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 27
public static long stub_hook_27(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 27), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 1
public static long stub_hook_1(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 1), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 28
public static long stub_hook_28(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 28), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 2
public static long stub_hook_2(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 2), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 29
public static long stub_hook_29(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 29), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 3
public static long stub_hook_3(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 3), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 30
public static long stub_hook_30(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 30), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 4
public static long stub_hook_4(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 4), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 31
public static long stub_hook_31(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 31), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 5
public static long stub_hook_5(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 5), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 32
public static long stub_hook_32(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 32), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 6
public static long stub_hook_6(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 6), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 33
public static long stub_hook_33(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 33), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 7
public static long stub_hook_7(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 7), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 34
public static long stub_hook_34(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 34), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 8
public static long stub_hook_8(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 8), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 35
public static long stub_hook_35(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 35), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 9, index 9
public static long stub_hook_9(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) throws Throwable {
return hookBridge(getMethodId(9, 9), null , a0, a1, a2, a3, a4, a5, a6, a7, a8);
//stub of arg size 7, index 36
public static long stub_hook_36(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 36), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 10, index 0
public static long stub_hook_0(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9) throws Throwable {
return hookBridge(getMethodId(10, 0), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
//stub of arg size 7, index 37
public static long stub_hook_37(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 37), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 10, index 1
public static long stub_hook_1(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9) throws Throwable {
return hookBridge(getMethodId(10, 1), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
//stub of arg size 7, index 38
public static long stub_hook_38(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 38), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 10, index 2
public static long stub_hook_2(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9) throws Throwable {
return hookBridge(getMethodId(10, 2), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
//stub of arg size 7, index 39
public static long stub_hook_39(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 39), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 10, index 3
public static long stub_hook_3(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9) throws Throwable {
return hookBridge(getMethodId(10, 3), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
//stub of arg size 7, index 40
public static long stub_hook_40(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 40), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 10, index 4
public static long stub_hook_4(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9) throws Throwable {
return hookBridge(getMethodId(10, 4), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
//stub of arg size 7, index 41
public static long stub_hook_41(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 41), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 11, index 0
public static long stub_hook_0(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10) throws Throwable {
return hookBridge(getMethodId(11, 0), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
//stub of arg size 7, index 42
public static long stub_hook_42(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 42), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 11, index 1
public static long stub_hook_1(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10) throws Throwable {
return hookBridge(getMethodId(11, 1), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
//stub of arg size 7, index 43
public static long stub_hook_43(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 43), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 11, index 2
public static long stub_hook_2(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10) throws Throwable {
return hookBridge(getMethodId(11, 2), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
//stub of arg size 7, index 44
public static long stub_hook_44(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 44), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 11, index 3
public static long stub_hook_3(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10) throws Throwable {
return hookBridge(getMethodId(11, 3), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
//stub of arg size 7, index 45
public static long stub_hook_45(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 45), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 11, index 4
public static long stub_hook_4(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10) throws Throwable {
return hookBridge(getMethodId(11, 4), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
//stub of arg size 7, index 46
public static long stub_hook_46(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 46), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 12, index 0
public static long stub_hook_0(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10, long a11) throws Throwable {
return hookBridge(getMethodId(12, 0), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
//stub of arg size 7, index 47
public static long stub_hook_47(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 47), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 12, index 1
public static long stub_hook_1(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10, long a11) throws Throwable {
return hookBridge(getMethodId(12, 1), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
//stub of arg size 7, index 48
public static long stub_hook_48(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 48), null , a0, a1, a2, a3, a4, a5, a6);
}
//stub of arg size 12, index 2
public static long stub_hook_2(long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8, long a9, long a10, long a11) throws Throwable {
return hookBridge(getMethodId(12, 2), null , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
//stub of arg size 7, index 49
public static long stub_hook_49(long a0, long a1, long a2, long a3, long a4, long a5, long a6) throws Throwable {
return hookBridge(getMethodId(7, 49), null , a0, a1, a2, a3, a4, a5, a6);
}
}
......@@ -5,6 +5,7 @@ import android.util.Log;
import com.swift.sandhook.xposedcompat.methodgen.DynamicBridge;
import com.swift.sandhook.xposedcompat.utils.DexLog;
import java.io.File;
import java.io.IOException;
......@@ -122,7 +123,9 @@ public final class XposedBridge {
* @param text The log message.
*/
public synchronized static void log(String text) {
Log.i(TAG, text);
if (DexLog.DEBUG) {
Log.i(TAG, text);
}
}
/**
......@@ -134,7 +137,9 @@ public final class XposedBridge {
* @param t The Throwable object for the stack trace.
*/
public synchronized static void log(Throwable t) {
Log.e(TAG, Log.getStackTraceString(t));
if (DexLog.DEBUG) {
Log.e(TAG, Log.getStackTraceString(t));
}
}
/**
......
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