Error: setName(): argument types do not match any of:
.overload('java.lang.String')
at ge (frida/node_modules/frida-java-bridge/lib/class-factory.js:584)
at frida/node_modules/frida-java-bridge/lib/class-factory.js:996
at je (frida/node_modules/frida-java-bridge/lib/class-factory.js:633)
at frida/node_modules/frida-java-bridge/lib/class-factory.js:616
hook代码如下:
//获取所有方法,并Hook
function HookAllMethod() {
var student=Java.use('com.example.encrptiondemo.Person');
var methods=student.class.getDeclaredMethods();
for (var i=0;i<methods.length;i++){
var methodName=methods.getName(); console.log(methodName);
//多个重载
for(var k=0;k<student[methodName].overloads.length;k++){
student[methodName].overloads[k].implementation=function() { console.log("arguments:",JSON.stringify(arguments));
//多个参数
for (var j=0;j<arguments.length;j++){ console.log(arguments[j]);
}