title: Modify how Frida hooks to the native functions
body: <h3>Problem description</h3>
  <p>I am working on modifying how Frida is hooking to the native Android functions. I am trying this on emulated Android 10.0 (x86 architecture)</p>
  <p>When I run <code>Intercept.attach(pointer, {callbacks})</code>, Frida hooks the function it inserts short jump instruction at the beginning of the function like <code>E9 FF E7 B7 FC</code>. This jump redirects function flow to Frida instrumentation and then jumps back and proceeds with normal function flow. Differences can be seen below:</p>
  <pre><code>Without Frida attached
  
  0:  53                      push   ebx
  1:  51                      push   ecx
  2:  52                      push   edx
  3:  e8 c8 3d fb ff          call   0xfffb3dd0
  8:  50                      push   eax
  9:  8b 5c 24 14             mov    ebx,DWORD PTR [esp+0x14]
  </code></pre>
  <pre><code>With Frida attached
  
  0:  e9 ff e7 b7 fc          jmp    0xfcb7e804
  5:  90                      nop
  6:  90                      nop
  7:  90                      nop
  8:  50                      push   eax
  9:  8b 5c 24 14             mov    ebx,DWORD PTR [esp+0x14]
  
  </code></pre>
  <h3>What I want to achieve</h3>
  <p>I want to achieve that Frida would inject other types of jumps as for example long-jump <code>EA</code>. I couldn't find any reference in official documentation and I am wondering is it possible to do without modifying (rebuilding) Frida? But if I need to modify Frida source code, do you know where I should look for <code>Intercept.attach</code> implementation?</p>