简体   繁体   English

OAT是什么意思?

[英]What does OAT mean?

We know that Dalvik uses APK, DEX, and ODEX files.我们知道 Dalvik 使用 APK、DEX 和 ODEX 文件。 And we know this abbreviation means via AOSP source or Developers site.我们知道这个缩写的意思是通过 AOSP 来源或开发者网站。

(like this - https://source.android.com/devices/tech/dalvik/dex-format.html ) (像这样 - https://source.android.com/devices/tech/dalvik/dex-format.html

  • DEX means Dalvik EXcutable file. DEX 表示 Dalvik EXcutable 文件。
  • ODEX means Optimized Dalvik EXcutable file. ODEX 表示优化的 Dalvik EXcutable 文件。
  • APK means Android PacKage. APK 是指 Android 包。

ART (Android RunTime) uses OAT and ART, but they do not explain the meaning anywhere. ART (Android RunTime) 使用了 OAT 和 ART,但它们并没有在任何地方解释含义。

Does anyone know the meaning of these shortened words?有谁知道这些缩写词的意思?

It's O f A head T ime, a silly reordering of A head O f T ime.它是为O F A最前面的t IME,AØF T IME一个愚蠢的重新排序。 We went with that because then we say that process of converting .dex files to .oat files would be called quakerizing and that would be really funny.我们这样做是因为我们说将.dex文件转换为.oat文件的过程将被称为quakerizing ,这真的很有趣。

OAT is a file format produced by compiling a DEX file with ahead-of-time compilation (AOT). OAT 是通过提前编译 (AOT) 编译 DEX 文件生成的文件格式。

Before AOT came to Android, dexopt was used to optimize DEX to ODEX (optimized DEX) which contains the optimized bytecode .在 AOT 到 Android 之前, dexopt用于将 DEX 优化为包含优化字节码的ODEX(优化 DEX)。

With AOT, dex2oat is used to optimize and compile DEX into an OAT file which may contain machine code in the ELF format.使用 AOT, dex2oat用于将 DEX 优化并编译成 OAT 文件,该文件可能包含 ELF 格式的机器代码

Reference: https://stackoverflow.com/a/26263071/2872712参考: https : //stackoverflow.com/a/26263071/2872712

Even those file formats are available for a while, there is still no off doc with an explanation about meaning (at least I didn't find).即使这些文件格式可以使用一段时间,仍然没有关于含义的解释(至少我没有找到)。 So for myself, I figured out the next meaning:所以就我自己而言,我想出了下一个含义:

.art - stands for AndroidRunTime ( here on page 12 it's pointed that the format is proprietary, and used by "only one file" in ART, so that's why I think in this way) .ART -代表AndroidRunTime( 这里12页它指出,该格式是专有的,并通过ART“只有一个文件”使用,所以这就是为什么我觉得这种方式)

.oat - found at least three explanation where the best imho is " O ptimized A ndroid file T ype" (and the idea came from here ). .oat -发现至少有三个解释,其中最好的是恕我直言“ptimized款A ndroid文件牛逼YPE”(和想法来自这里)。

Other possible variants of .oat I had is: "Optimized Application file Type" or just easy AOT->OAT (as .oat produced from ahead-of-time compilation process).我拥有的 .oat 的其他可能变体是:“优化的应用程序文件类型”或简单的 AOT->OAT(如提前编译过程中生成的 .oat)。

作为dexopt产生ODEX - Øptimized d奥尔维克EX ecutable,其中包含了优化代码, dex2oat产生OAT,我的猜测,它应该代表O ptimized定时头部。

Some searching found this page , which says:一些搜索找到了这个页面,它说:

The OAT file extension is associated with applications developed for Google Android operating system that is used on various portable devices. OAT 文件扩展名与为各种便携式设备上使用的 Google Android 操作系统开发的应用程序相关联。 The *.oat file stores native C++ code of application designed for new Android RunTime (ART) available in Android 4.4 and higher. *.oat 文件存储为 Android 4.4 及更高版本中可用的新 Android RunTime (ART) 设计的应用程序的本机 C++ 代码。

Android RunTime is successor of Dalvik process virtual machine used by older versions of Android. Android RunTime 是旧版 Android 使用的 Dalvik 进程虚拟机的后继者。

阅读 ART 和 Dalvik 之间的一些比较,我发现AOT指的是Ahead Of Time ,您可以在这里阅读更多相关信息

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

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