Skip to content

[feature] frida snippet log should print the renamed function name #1772

@Ran-Naor

Description

@Ran-Naor

When copying a frida snippet of a function the console.log contains the original name, even if you rename the function.
Lets say I rename the function "a" in class "SomeManager" to "startWork".
current frida snippet -

let SomeManager = Java.use("com.example.SomeManager");
SomeManager["a"].overload('android.content.Context').implementation = function (context) {
    console.log('SomeManager.a is called' + ', ' + 'context: ' + context);
    let ret = this["a"](context);
    console.log('SomeManager.a return: ' + ret);
    return ret;
};

new frida snippet would look like this -

let SomeManager = Java.use("com.example.SomeManager");
SomeManager["a"].overload('android.content.Context').implementation = function (context) {
    console.log('SomeManager.startWork is called' + ', ' + 'context: ' + context);
    let ret = this["a"](context);
    console.log('SomeManager.startWork return: ' + ret);
    return ret;
};

I will add the code for this change in a PR :).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions