I am trying to learn Frida and have experimented with a little so far. Things have mostly worked as thankfully I could find enough examples and tutorials to help me through. However, at this point in time, I am stuck with a very specific task at hand.
So let's say below is the Frida hook I am referring to:
Java.perform(() => {
const TestClass = Java.use(
'com.test.TestClass',
);
TestClass.testStaticMethod.overload('java.lang.String', 'java.util.Map').implementation = function (
str,
map,
) {
console.log('intercept!');
return this.b(str, map);
};
const testStr = Java.use('java.lang.String').$new('test');
const testMap = Java.use('java.util.HashMap').$new();
});
//wait (sleep) 10-15 secs
Java.perform(() => {
// test it!
TestClass.testStaticMethod(testStr, testMap);
});
it does NOT output 'intercept!' What could be the reason?