var friendlyFunctionName = new NativeFunction(friendlyFunctionPtr, 'void', ['pointer', 'pointer']);
var returnValue = Memory.alloc(sizeOfLargeObject);
friendlyFunctionName(returnValue, thisPtr);
the second parameter need a "[Ljava.lang.Object;" type, and java code like this:
getMethod("say", new Class[]{String.class,int.class}); getMethod("say", new Class[]{Integer.TYPE,Integer.TYPE});
so How can i create this array using js or other ways ?
in addition,I created a obj array like this: var Integerclass = Java.use("java.lang.Integer"); var objectArr = Java.array('Ljava.lang.Class;',[Integerclass.TYPE,Integerclass.TYPE]);
but i got a "invalid argument value" error. {'type': 'error', 'description': 'Error: invalid argument value', 'stack': 'Error: invalid argument value\n at frida/node_modules/frida-java/lib/env.js:515\n at frida/node_modules/frida-java/lib/class-factory.js:2592\n at toJniObjectArray (frida/node_modules/frida-java/lib/class-factory.js:2640)\n at java.js:4489\n at frida/node_modules/frida-java/lib/class-factory.js:743\n at [anon] (script1.js:28)\n at input:1', 'fileName': 'frida/node_modules/frida-java/lib/env.js', 'lineNumber': 515, 'columnNumber': 1}
我叫菠菜的菠
原issue地址是:https://github.com/frida/frida-java/issues/78
问题是:
I have a question in "java.lan ...
var intClass = Java.use("java.lang.Integer").class; var booleanClass = Java.use("java.lang.Boolean").class; var objectArr = Java.array("Ljava.lang.Class;", [intClass, booleanClass]);