title: How to print variable from hooked native function in Android using Frida
body: <p>I have an android app which loads a <code>mylib.so</code>. This library has a function called <code>decryptChar</code> which I want to hook and print a string variable calculated in there. I am using <a href="https://www.frida.re/" rel="nofollow noreferrer">frida</a> for this purpose. I have made some attempts but given my inexperience in this everything is a fail. I would like to print the variable <code>Key</code> just before leaving the function so I could get the final value of it.   </p>
  
  <p>A code I have used is the following</p>
  
  <pre><code>Interceptor.attach(Module.findExportByName("mylib.so", "decryptChar"), {
      onEnter: function (args) {
          console.log(this.Key.value);
      }
  });
  </code></pre>
  
  <p>What is a proper way of doing this?</p>