I'm trying to call a method with this signature (int, int, long, String, Object)
The problem is the last parameter needs to be a String array
When I hook it and print its last parameters something like this will be shown:
[Ljava.lang.String@abcd1234;
And If I pass it, the function works fine
But when I change it to my custom String array
Like below:
const arrayList = Java.use("java.util.ArrayList")
const myArray = arrayList.$new()
myArray.add("test")
myArray.add("test-1")
const stringArr = myArray.toArray()
this.a(arguments[0], arguments[1], arguments[2], arguments[3], stringArr)
will throw error:
Error: a(): argument types do not match any of:
.overload('int', 'int', 'long', 'java.lang.String', 'java.lang.Object')
at X (frida/node_modules/frida-java-bridge/lib/class-factory.js:563)
at value (frida/node_modules/frida-java-bridge/lib/class-factory.js:967)
at e (frida/node_modules/frida-java-bridge/lib/class-factory.js:547)
at <anonymous> (/script1.js:94)
at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:12)
at perform (frida/node_modules/frida-java-bridge/index.js:193)
at ms_bd_c_h_a (/script1.js:99)
at apply (native)
at <anonymous> (frida/runtime/message-dispatcher.js:13)
at c (frida/runtime/message-dispatcher.js:23)
What should I do?