Skip to content

Process Crash when replacing the implementation of any Java method using ART #2

Description

@oleavr

(Continuation of frida/frida#193.)

As described by @EquiFox:

Tests were made using a Samsung Galaxy S6 on 5.1.1 (ART).

I've been using XPosed for a while, but I decided to spend a few hours learning how Frida works and everything, I can do many cool stuff on the native side. However when ever I try to replace the implementation of a Java method in Java.perform, the process dies.

Java.perform(function() {
       var classDef = Java.use("com.package.myClass");

       classDef.isAdmin.implementation = () => {
            return true;
       };
});

Something as basic as this fails, even a empty implementation fails.

However I can call Java methods correctly and create new classes instances. I also noticed that using, lets say, Java.cast to map an address to Java.lang.String object crash the process too (It works 1-2 times, then others call will crash the process)

I would use XPosed for Java related stuff and frida for native, but if Xposed is installed on my device, Frida tells me that Java Api isnt available when I try to spawn process.

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