Skip to content

Instantly share code, notes, and snippets.

@SeeFlowerX
Created November 29, 2021 14:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SeeFlowerX/67d4503e0e521a6711862f65d8494b00 to your computer and use it in GitHub Desktop.
Save SeeFlowerX/67d4503e0e521a6711862f65d8494b00 to your computer and use it in GitHub Desktop.
jnitrace patch 避免APP卡死
Interceptor.attach(dlopenRef, {
onEnter:function(args){
this.path = args[0].readCString();
},onLeave:function(retval){
if (this.path != null) {
if (checkLibrary(this.path)) {
trackedLibs.set(retval.toString(), true);
}
else {
libBlacklist.set(retval.toString(), true);
}
}
}
});
// patch for https://github.com/chame1eon/jnitrace-engine/blob/981d4737cc78db5814ca149f32c0ba9252287926/lib/engine.ts#L147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment