简体   繁体   English

无需 ART/Dalvik 参与 Android 即可运行代码

[英]Run code without ART/Dalvik involvement in Android

I have a couple of questions about the Android operating system's runtime environment.我有几个关于 Android 操作系统运行时环境的问题。

  1. Are Android libraries (eg, OpenGL, SSL, etc.) compiled to bytecodes and executed by ART/Dalvik? Android 库(例如 OpenGL、SSL 等)是否编译为字节码并由 ART/Dalvik 执行?
  2. How does Android run cpp codes (pure cpp not hybrid java code with cpp calls)? Android 如何运行 cpp 代码(纯 cpp 不是带有 cpp 调用的混合 java 代码)? Does it convert them to bytecodes and run them on ART/Dalvik or does it run them directly as user processes?它是将它们转换为字节码并在 ART/Dalvik 上运行它们还是直接作为用户进程运行它们? If it runs them on ART/Dalvik, is there a way to manually bypass ART/Dalvik and run the code directly as a user process?如果它在 ART/Dalvik 上运行它们,有没有办法手动绕过 ART/Dalvik 并直接作为用户进程运行代码? If so, does this need root access?如果是这样,这是否需要root访问权限?
  3. What about Python codes? Python代码呢?

Android (native) libraries, such as OpenSSl, are run as native code, not bytecode. Android(本机)库,例如 OpenSSl,作为本机代码而不是字节码运行。

Android runs C++ as native code, not bytecode. Android 将 C++ 作为本机代码运行,而不是字节码。

Android runs Python through the Python interpreter, which is (by convention) usually C. However, Python can be implemented in Java; Android 通过 Python 解释器运行 Python,Python 解释器(按照惯例)通常是 C。但是,Python 可以用 Java 实现; see Jython .Jython

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM