Commit 6637f8ed authored by swift_gan's avatar swift_gan

add stub 64bit

parent 60fd35cd
package com.swift.sandhook.xposedcompat.hookstub;
public interface CallOriginCallBack {
int call(long... args) throws Throwable;
long call(long... args) throws Throwable;
}
......@@ -21,7 +21,7 @@ public class HookStubManager {
public final static int MAX_STUB_ARGS = 5;
public final static int[] stubSizes = new int[] {
0,0,0,0,0,10
0,0,0,0,0,6
};
public final static AtomicInteger[] curUseStubIndexes = new AtomicInteger[MAX_STUB_ARGS + 1];
......
......@@ -10,7 +10,7 @@ public class MethodHookerStubs32 {
static class call_origin_5_0 implements CallOriginCallBack {
@Override
public int call(long... args) throws Throwable {
public long call(long... args) throws Throwable {
return stub_backup_0((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
......@@ -27,7 +27,7 @@ public class MethodHookerStubs32 {
static class call_origin_5_1 implements CallOriginCallBack {
@Override
public int call(long... args) throws Throwable {
public long call(long... args) throws Throwable {
return stub_backup_1((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
......@@ -43,7 +43,7 @@ public class MethodHookerStubs32 {
static class call_origin_5_2 implements CallOriginCallBack {
@Override
public int call(long... args) throws Throwable {
public long call(long... args) throws Throwable {
return stub_backup_2((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
......@@ -61,7 +61,7 @@ public class MethodHookerStubs32 {
static class call_origin_5_3 implements CallOriginCallBack {
@Override
public int call(long... args) throws Throwable {
public long call(long... args) throws Throwable {
return stub_backup_3((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
......@@ -79,7 +79,7 @@ public class MethodHookerStubs32 {
static class call_origin_5_4 implements CallOriginCallBack {
@Override
public int call(long... args) throws Throwable {
public long call(long... args) throws Throwable {
return stub_backup_4((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
......@@ -96,7 +96,7 @@ public class MethodHookerStubs32 {
static class call_origin_5_5 implements CallOriginCallBack {
@Override
public int call(long... args) throws Throwable {
public long call(long... args) throws Throwable {
return stub_backup_5((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
......@@ -110,4 +110,20 @@ public class MethodHookerStubs32 {
return 0;
}
static class call_origin_5_6 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_6((int)args[0], (int)args[1],(int) args[2], (int)args[3], (int)args[4]);
}
}
public static int stub_hook_6(int a, int b, int c, int d, int e) throws Throwable {
return (int) hookBridge(getMethodId(5, 6), new call_origin_5_5(), a, b, c, d, e);
}
public static int stub_backup_6(int a, int b, int c, int d, int e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 6)]);
} catch (Throwable throwable) {}
return 0;
}
}
package com.swift.sandhook.xposedcompat.hookstub;
import static com.swift.sandhook.xposedcompat.hookstub.HookStubManager.hookBridge;
import static com.swift.sandhook.xposedcompat.hookstub.HookStubManager.getMethodId;
import static com.swift.sandhook.xposedcompat.hookstub.HookStubManager.originMethods;
import static com.swift.sandhook.xposedcompat.utils.DexLog.printCallOriginError;
public class MethodHookerStubs64 {
static class call_origin_5_0 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_0(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_0(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 0), new call_origin_5_0(), a, b, c, d, e);
}
public static long stub_backup_0(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 0)]);
} catch (Throwable throwable) {}
return 0;
}
static class call_origin_5_1 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_1(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_1(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 1), new call_origin_5_1(), a, b, c, d, e);
}
public static long stub_backup_1(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 1)]);
} catch (Throwable throwable) {}
return 0;
}
static class call_origin_5_2 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_2(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_2(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 2), new call_origin_5_2(), a, b, c, d, e);
}
public static long stub_backup_2(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 2)]);
} catch (Throwable throwable) {}
return 0;
}
static class call_origin_5_3 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_3(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_3(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 3), new call_origin_5_3(), a, b, c, d, e);
}
public static long stub_backup_3(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 3)]);
} catch (Throwable throwable) {}
return 0;
}
static class call_origin_5_4 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_4(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_4(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 4), new call_origin_5_4(), a, b, c, d, e);
}
public static long stub_backup_4(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 4)]);
} catch (Throwable throwable) {}
return 0;
}
static class call_origin_5_5 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_5(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_5(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 5), new call_origin_5_5(), a, b, c, d, e);
}
public static long stub_backup_5(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 5)]);
} catch (Throwable throwable) {}
return 0;
}
static class call_origin_5_6 implements CallOriginCallBack {
@Override
public long call(long... args) throws Throwable {
return stub_backup_6(args[0], args[1], args[2], args[3], args[4]);
}
}
public static long stub_hook_6(long a, long b, long c, long d, long e) throws Throwable {
return hookBridge(getMethodId(5, 6), new call_origin_5_5(), a, b, c, d, e);
}
public static long stub_backup_6(long a, long b, long c, long d, long e) throws Throwable {
try {
printCallOriginError(originMethods[getMethodId(5, 6)]);
} catch (Throwable throwable) {}
return 0;
}
}
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