1

I am hooking an app now i m founding this error i have already tried many solutions one of which is following:

Java.perform(function() {
 
var main;
    Java.choose('ca.c.edu.char.g', {
                onMatch: function(instance) {
                    main = instance;
                },
                onComplete: function() {console.log(main.Key);}
            });

});
 

  

Here Key is a method i found after decompiling it with jadx-gui but it is not working ..Any help??

in the function Java.choose char is package and its class is g

Hacker111
  • 65
  • 1
  • 5
  • Please describe what you mean by "not working". Do you gen an error, is your code triggered at all or what is the actual problem? – Robert Jan 25 '21 at 07:54
  • I mean that after decompiling i found that there is method named as key now i got this type of error **ReferenceError: 'g' is not defined** here **g** is class name – Hacker111 Jan 25 '21 at 08:21
  • If the name of the method `Key` or `key`? Java is case sensitive, hence there is a difference between both methods. Also make sure there is only one method of this name (method overloading same name but different parameter types) otherwise use `overload` definition of Frida as shown here: https://codeshare.frida.re/@dzonerzy/stringcompare/ – Robert Jan 25 '21 at 08:28
  • What are you trying to log? Why not use Java.use() and overload the function or init? – MitchHS Feb 04 '21 at 00:57

0 Answers0