[英]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. 根据我对Android的理解,似乎首先将Java代码转换为.class文件,然后将其转换为专有的Dalvik字节码格式。 This can be reverse engineered back to Java source code. 可以将其反向工程回Java源代码。
My questions is, what happens to native code (written in C++), which is used in JNI ? 我的问题是,在JNI中使用的本机代码(用C ++编写)会怎样? Will someone be able to get the c++ source code ? 有人可以获取c ++源代码吗? Or will they just get byte code of the C++ ? 还是只是获取C ++的字节码?
EDIT: I don't know what happens to native code, when an app is compiled for android. 编辑:当为Android编译应用程序时,我不知道本地代码会发生什么。 Can someone explain what happens when you use JNI ? 有人可以解释使用JNI时会发生什么情况吗?
JNI calls are bound in runtime. JNI调用在运行时绑定。 The libraries are stored as is. 库按原样存储。 Android is based on linux kernel so no problems to run library compiled for corresponding architecture Android基于linux内核,因此可以正常运行针对相应架构编译的库
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.