Search code examples
javaandroidc++java-native-interface

What happens to native code (JNI) when an android app is compiled?


Based on my understanding of Android, it seems that a Java code is first converted into .class files, which are then converted into the proprietary Dalvik byte code format. This can be reverse engineered back to Java source code.

My questions is, what happens to native code (written in C++), which is used in JNI ? Will someone be able to get the c++ source code ? Or will they just get byte code of the C++ ?

EDIT: I don't know what happens to native code, when an app is compiled for android. Can someone explain what happens when you use JNI ?


Solution

  • JNI calls are bound in runtime. The libraries are stored as is. Android is based on linux kernel so no problems to run library compiled for corresponding architecture