遇到odex指令的办法

经常遇到这样的指令throw-verification-error 类似指令
hook dvmOptimizeClass和dvmVerifyCodeFlow即可解决

void(*olddvmOptimizeClass)(ClassObject*, bool);
void dvmOptimizeClass(ClassObject* clazz, bool essentialOnly)
{
	return;
}
bool (*olddvmVerifyCodeFlow)(void* vdata);
bool dvmVerifyCodeFlow(void* vdata) {
	return true;
}
void* dvmOptimizeClassPtr = dlsym((void*)libdvm, "_Z16dvmOptimizeClassP11ClassObjectb");
HookFunction(dvmOptimizeClassPtr, (void*)&dvmOptimizeClass, (void**)&olddvmOptimizeClass);
void* _Z17dvmVerifyCodeFlowP12VerifierData = dlsym(libdvm, "_Z17dvmVerifyCodeFlowP12VerifierData");
HookFunction(_Z17dvmVerifyCodeFlowP12VerifierData, (void*)&dvmVerifyCodeFlow, (void**)&olddvmVerifyCodeFlow);

mark下,unshell

posted @ 2017-12-18 22:53  xiaobaiyey  阅读(411)  评论(0编辑  收藏  举报