Hookzz进行hook系统函数,用MonkeyApp可以正常,用Monkey的Tweak就会已启动就崩溃?有哪位同学知道原因吗?

Hookzz进行hook系统函数,用MonkeyApp可以正常,用Monkey的Tweak就会已启动就崩溃?
有哪位同学知道原因吗?

size_t (*origin_fread)(void * ptr, size_t size, size_t nitems, FILE * stream);
size_t fake_fread(void * ptr, size_t size, size_t nitems, FILE * stream) {
NSLog(@“Test===fake_fread----Start----++++++++”);
return origin_fread(ptr, size, nitems, stream);
}

FILE * (*origin_fopen)(char * a1, char * a2);
FILE * new_fopen(char * a1, char * a2)
{
return origin_fopen(a1, a2);
}

CHConstructor{
NSLog(@“Test===HookSub----Start----++++++++”);
ZzReplace((void *)fread, (void *)fake_fread, (void **)&origin_fread);
ZzReplace((void *)fopen, (void *)new_fopen, (void **)&origin_fopen);
NSLog(@“Test===HookSub----End----++++++++”);
}

ZzReplace

可能是你的自己的框架并没有被打包进去

应该是打包进去了,看里面好像有ZzReplace等方法