java调用native方法流程主要有两步: 1. 找到对应的方法 a) 动态绑定时load本地库时完成映射关系,运行时查找对应方法 native方法中实现JNI_OnLoad,返回JNI的版本号;如果native不实现,则由虚拟机生成默认实现。在加载本地库时调用 b) 静态绑定时,运行时按照特定规则查找对应的方法 2. 参数转换 a) 将java参数类型转换为jni提供的类型,包含:基础类型转换为jint,jlong,jboolean,jbyte等类型;String 转换为jstring类型
Allows you to partly emulate an Android native library. This is an educational project to learn more about the ELF file format and Unicorn. 中文 README Features Emulation of the JNI Invocation API so JNI_OnLoad can be called properly. Emulation of nat