when decompile one apk file, I found there are two java functions with same name and args, but they have different retval, for example:
`
public void temp(String a){
Log.d("void","void");
}
public int temp(String a){
Log.d("int","int");
return 0;
}
`
when hook the "temp" function, frida tell me that choose from ".overload('java.lang.String')" and ".overload('java.lang.String')", to implement overload, but these two function looks like no difference, so, how to hook when meeting this situation?
This occurred to me many times when using frida to hook android.
Maybe you can try to execute it to determine the address of each function, then remember it somewhere.
Iterate the method's overloads property, and hook each of them.
Most helpful comment
Iterate the method's
overloadsproperty, and hook each of them.