Skip to content
New issue

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

Android 10中hook libart.so #77

Open
zdpdz opened this issue Jun 30, 2020 · 3 comments
Open

Android 10中hook libart.so #77

zdpdz opened this issue Jun 30, 2020 · 3 comments

Comments

@zdpdz
Copy link

zdpdz commented Jun 30, 2020

在Android 10中hook libart.so时,看log信息是hook成功了,但是却没执行hook之后的新函数
image
image

@lj94093
Copy link

lj94093 commented Jul 16, 2020

so里有这个函数,并不代码代码执行的时候就一定会去执行这个so里的函数

@Captain0X
Copy link

大佬有代码吗?求hook代码,当我 hook libart.so的java.lang.String.init函数时,貌似也没有调用,java代码里确实是调用了new String(byte,10,20,'UTF-8'),感觉有点小坑
我的代码如下:

let moduleFuncName;
let m = Module.enumerateExportsSync('libart.so');
m.forEach(function (m) {
    if (m.name.indexOf("java_lang_String_init_BIIStringE") != -1) {
        moduleFuncName = m.name;
        console.log("moduleFuncName: " + m.name);
    };
});
let DefineClassFunc = Module.findExportByName("libart.so", moduleFuncName);
Interceptor.attach(DefineClassFunc, {
    onEnter: function (args) {
            console.log("Hooked Function");
        },
        onLeave: function (retval) {
            console.log("Finished!!!");
        }
});

@yangsusuqq
Copy link

大佬有代码吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants