Skip to content

How to use frida to hook a native function's arguments in Android? #491

@bxl0608

Description

@bxl0608

Hello,Recent,I learn to use the frida framework,but i met a problem.
I have a native function, i know it has three argumens,fisrt is a Int, the second is String,i can print the first argument,but the second argument .i don't konw how to print it. code like this:

Interceptor.attach(Module.findExportByName("libuserinfo.so", "getString"),{
onEnter: function (args) {
send(args[2].toInt32()); // this is first argument.
// this.buf = args[3]; how can i print the second argument?
},
onLeave: function (retval) {

    }

});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions