You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Java.method.overload(...), the full name of native types must be used and not the letters representing these types in Java signatures. For instance int instead of I, byte instead of B, etc.
But when the parameter is an array of a native type, the letter must be used and not the full name.
For instance, if the method is method(int x, int y[]), overload must be used like this: method.overload("int", "[I") and not with [int orint[].
While not a big issue, this can be misleading/counter-intuitive.
A simpler way to avoid any confusion could be to use the signature of the method in overload(), for instance for the previous example I[I.
The text was updated successfully, but these errors were encountered:
Actually, Java's Class.forName has the same issue where ordinary type names are passed in like int or java.io.InputStream, while array types are given in the "internal" format like [Ljava/lang/Object; (an Object[]) or [[[Z (a boolean[][][]). Since there's also an issue where an obfuscated app may have bizzare class names like int or long which certainly won't work with frida-java, there may be a need for normalizing type representations for arguments passed in for such methods.
(Continuation of frida/frida-gum#117.)
As described by @stevielavern:
When using
Java.method.overload(...)
, the full name of native types must be used and not the letters representing these types in Java signatures. For instanceint
instead ofI
,byte
instead ofB
, etc.But when the parameter is an array of a native type, the letter must be used and not the full name.
For instance, if the method is
method(int x, int y[])
, overload must be used like this:method.overload("int", "[I")
and not with[int
orint[]
.While not a big issue, this can be misleading/counter-intuitive.
A simpler way to avoid any confusion could be to use the signature of the method in
overload()
, for instance for the previous exampleI[I
.The text was updated successfully, but these errors were encountered: