title: Android JNI under the hood
body: <p>I cannot find any references to a detailed explanation about how JNI works on Android in detail, so:</p>
  
  <ol>
  <li><p>Since every Android application runs in its own process, with its own instance of the Dalvik/ART virtual machine, I think that the native code will be executed in the same process, am I right? </p></li>
  <li><p>I read that when the VM invokes a function, it passes a JNIEnv pointer, a jobject pointer, and any Java arguments declared by the Java method.
  But how is this made at assembly level (under the hood)?</p></li>
  <li><p>I read that you can instantiate objects, call methods, and so on, like Reflection, using the functions provided by the JNIEnv. Therefore, my question is: have I a "direct" memory access to the VM or I have always to use the JNIEnv's functions?</p></li>
  </ol>