i have a java method i am trying to call manually
public static native Object a(int i, int i2, long j, String str, Object obj);
whenever i try to call it and pass the needed arguments it raises a error pointer expected the obj parameter is a string list this is the code i tried
var e = ["string1","string2"];
var arr = Java.array('java.lang.String', e);
var x = Java.use("ms.bd.o.k")
x.a.overload('int', 'int', 'long', 'java.lang.String', 'java.lang.Object').call(x, 50331649, 0, 140734272498240, url, arr)
i also tried changing the overload to
.overload('int', 'int', 'long', 'java.lang.String', '[java.lang.String')
this raises the error below
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)
native
).java.lang.object
since its throws the same error asJava.cast(Java.array('java.lang.String', ["a"]), Java.use("java.lang.Object"))
Java.array does not returns a pointer and the cast method needs a pointer do you know any way to retrieve the pointer of a array using frida