Home hookzz libart.so not working
Reply: 0

hookzz libart.so not working

user1451
1#
user1451 Published in July 21, 2018, 1:49 pm
    void * (*old_art_hook)(void* self, const char* descriptor, size_t hash,
                       Handle<art::mirror::ClassLoader> class_loader,
                       const DexFile& dex_file,
                       const art::DexFile::ClassDef& dex_class_def) = NULL;

void * new_art_hook( void* self, const char* descriptor, size_t hash,
                                         Handle<art::mirror::ClassLoader> class_loader,
                                         const DexFile& dex_file,
                                         const art::DexFile::ClassDef& dex_class_def) {
    LOGD("art hook run ------:"); 
    return old_art_hook( self, descriptor, hash, class_loader, dex_file, dex_class_def);
}

/**************************************/

void *symbol = NULL;
findSymbol("_ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE", "libart.so", (unsigned long *) &symbol);
ZzHookReplace(symbol, (void *) new_art_hook, (void **) &old_art_hook);

I use hookzz, through the above code, hook libart.so in the _ZN3art11ClassLinker11DefineClassEPNS_6ThreadEPKcjNS_6HandleINS_6mirror11ClassLoaderEEERKNS_7DexFileERKNS9_8ClassDefE in Android7.0, but new_art_hook, no call function, no error, the symbol address of the function is correct, I compared 010editor, What is wrong?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.297609 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO