不能使用EnumerateLoadedClass

31moq8wy  于 2021-07-06  发布在  Java
关注(0)|答案(0)|浏览(307)

我成功地启动了frida服务器(使用su)并将其连接到进程而没有出错。 Java.Interceptor 工作正常,但我不能枚举类,我只得到 Unexpected end of block 错误。

Java.perform(() => {
    Java.enumerateLoadedClasses({
        "onMatch": function(name) {
            console.log(name);
        },
        "onComplete": function() {
            console.log('Done!');
        }
    });
});

然后:

Error: Unexpected end of block
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/android.js:1175)
    at forEach (native)
    at Ot (frida/node_modules/frida-java-bridge/lib/android.js:1240)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/android.js:990)
    at _patchCode (native)
    at value (frida/runtime/core.js:163)
    at Dt (frida/node_modules/frida-java-bridge/lib/android.js:991)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/memoize.js:4)
    at Fe (frida/node_modules/frida-java-bridge/lib/android.js:475)
    at _enumerateLoadedClassesArt (frida/node_modules/frida-java-bridge/index.js:108)
    at enumerateLoadedClasses (frida/node_modules/frida-java-bridge/index.js:54)
    at <anonymous> (<input>:9)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:12)
    at perform (frida/node_modules/frida-java-bridge/index.js:192)
    at <eval> (<input>:10)
    at eval (native)
    at fridaReplEvaluate (/repl.js:9)
    at apply (native)
    at <anonymous> (frida/runtime/message-dispatcher.js:13)
    at c (frida/runtime/message-dispatcher.js:23)
TypeError: cannot set property '_code' of null
    at Dt (frida/node_modules/frida-java-bridge/lib/android.js:991)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/memoize.js:4)
    at Fe (frida/node_modules/frida-java-bridge/lib/android.js:475)
    at _enumerateLoadedClassesArt (frida/node_modules/frida-java-bridge/index.js:108)
    at enumerateLoadedClasses (frida/node_modules/frida-java-bridge/index.js:54)
    at <anonymous> (<input>:9)
    at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:12)
    at perform (frida/node_modules/frida-java-bridge/index.js:192)
    at <eval> (<input>:10)
    at eval (native)
    at fridaReplEvaluate (/repl.js:9)
    at apply (native)
    at <anonymous> (frida/runtime/message-dispatcher.js:13)
    at c (frida/runtime/message-dispatcher.js:23)

为什么不工作?更多信息:

Android.........: 6.0.1
 Phone...........: Galaxy S5 Mini
 CPU ABI.........: armeabi-v7a
 Root access.....: Yes
 Java.available..: true
 Frida...........: frida-server-14.0.8-android-arm

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题