frida
frida copied to clipboard
Android 12 Java.choose problem
js code:
setImmediate(function() {
console.log("[] Starting script");
Java.perform(function () { Java.choose("com.mycompany.myapp.MainActivity", {
"onMatch":function(instance){
console.log("[] Instance found");
},
"onComplete":function() {
console.log("[*] Finished heap search")
}
});
});
});
result:
[on_message] message: {'type': 'error', 'description': 'TypeError: not a function', 'stack': 'TypeError: not a function\n at _chooseObjectsArtModern (frida/node_modules/frida-java-bridge/lib/class-factory.js:286)\n at
I had the same problem
+1
+1
Implemented in the Android 12 branch (still in progress), if anyone's interested in testing it.
+1, but my problem is in android 7。。。。
is there any update? i'm using android 12 simulator. meet the error here:
{'type': 'error', 'description': "TypeError: cannot read property 'value' of undefined", 'stack': "TypeError: cannot read property 'value' of undefined\n at onMatch (/script1.js:23)\n at _chooseObjectsJvm (frida/node_modules/frida-java-bridge/lib/class-factory.js:269)\n at choose (frida/node_modules/frida-java-bridge/lib/class-factory.js:247)\n at choose (frida/node_modules/frida-java-bridge/index.js:264)\n at <anonymous> (/script1.js:30)\n at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:12)\n at perform (frida/node_modules/frida-java-bridge/index.js:205)\n at <eval> (/script1.js:31)", 'fileName': '/script1.js', 'lineNumber': 23, 'columnNumber': 1}
script here `Java.perform(function() { var context = Java.use('android.app.ActivityThread').currentApplication().getApplicationContext(); console.log("testeste") context.openFileOutput.implementation = function(a, b) { console.log("Hello world"); this.openFileOutput(a, b); }
})`
+1, but my problem is in android 7。。。。
android 7 +1