title: Print stacktrace using Frida
body: <p>I'm able to sucessfully hook into an Android method using Frida, but I am trying to find out who is calling that method. I can find that out if I can rewrite the method with Frida to print the stacktrace when the method gets called. I've tried a few things, but all of them have had some sort of error. This is the latest thing I have tried.</p>
  
  <pre><code>setImmediate(function() {
      console.log("[*] Starting script");
      Java.perform(function () {
        var Activity = Java.use("com.package.MyClass");
        Activity.getUpdates.overload('boolean', 'java.lang.String', 'java.lang.String').implementation  = function (v1, v2, v3) {
          console.log("v1: " + v1);
          console.log("v2: " + v2);
          console.log("v3: " + v3);
          Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Exception").$new())
        };
      });
  })
  </code></pre>
  
  <p>This is resulting in the following error</p>
  
  <pre><code>Error: Not allowed outside Java.perform() callback
      at d (frida/node_modules/frida-java/index.js:86)
      at frida/node_modules/frida-java/index.js:366
      at [anon] (repl1.js:11)
      at input:1
  </code></pre>
  
  <p>Any idea how I can achieve this?</p>