We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
11-07 21:36:23.092 2589 2589 E AndroidRuntime: java.lang.IllegalArgumentException: wrong number of arguments; expected 1114564912, got 2
从代码流程看是info指针或者bakMethod指针失效,gdb跟踪(ArrayObject *) info->paramTypes,发现会被memset, fork等函数修改,在主线程调用java_method_hook就无此问题
HookInfo *info = (HookInfo *) malloc(sizeof(HookInfo)); ...... Method *bakMethod = (Method *) malloc(sizeof(Method)); Memcpy(bakMethod, method, sizeof(Method)); info->originalMethod = (void *) bakMethod; ...... method->insns = (u2 *) info; ...... HookInfo *info = (HookInfo *) method->insns;
pResult->l = (void *) dvmInvokeMethod(thisObject, originalMethod, argTypes, (ArrayObject *) info->paramTypes, (ClassObject *) info->returnType, true);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
11-07 21:36:23.092 2589 2589 E AndroidRuntime: java.lang.IllegalArgumentException: wrong number of arguments; expected 1114564912, got 2
从代码流程看是info指针或者bakMethod指针失效,gdb跟踪(ArrayObject *) info->paramTypes,发现会被memset, fork等函数修改,在主线程调用java_method_hook就无此问题
HookInfo *info = (HookInfo *) malloc(sizeof(HookInfo));
......
Method *bakMethod = (Method *) malloc(sizeof(Method));
Memcpy(bakMethod, method, sizeof(Method));
info->originalMethod = (void *) bakMethod;
......
method->insns = (u2 *) info;
......
HookInfo *info = (HookInfo *) method->insns;
The text was updated successfully, but these errors were encountered: