Skip to content

How to get all java class fields/methods in frida? #44

Description

@douniwan5788

After dig into source, I finally found the way to get a field which has the same name of a method.

https://github.com/frida/frida-java/blob/82bc59a8389ae62a94e65841b34bb003e03f6518/lib/class-factory.js#L810-L813

public class Test {
    private static int a = 1;
    
    private static int a()
    {
        return 0;
    }
}
'use strict';

if (Java.available) {
    console.log('Java Process!')

    Java.perform(function () {
        var Test = Java.use("Test");

        console.log( Test._a.value );

    });
} else
    console.log("not Java Process!")

My question is:
Is there a way to get all fields/methods of a java class?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions