What does OAT mean?

余生颓废 提交于 2019-11-30 11:03:32

问题


We know that Dalvik uses APK, DEX, and ODEX files. And we know this abbreviation means via AOSP source or Developers site.

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

  • DEX means Dalvik EXcutable file.
  • ODEX means Optimized Dalvik EXcutable file.
  • APK means Android PacKage.

ART (Android RunTime) uses OAT and ART, but they do not explain the meaning anywhere.

Does anyone know the meaning of these shortened words?


回答1:


It’s Of Ahead Time, a silly reordering of Ahead Of Time. 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.




回答2:


OAT is a file format produced by compiling a DEX file with ahead-of-time compilation (AOT).

Before AOT came to Android, dexopt was used to optimize DEX to ODEX (optimized DEX) which contains the optimized bytecode.

With AOT, dex2oat is used to optimize and compile DEX into an OAT file which may contain machine code in the ELF format.

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




回答3:


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. The *.oat file stores native C++ code of application designed for new Android RunTime (ART) available in Android 4.4 and higher.

Android RunTime is successor of Dalvik process virtual machine used by older versions of Android.




回答4:


As dexopt produces ODEX - Optimized Dalvik EXecutable, which contains the optimized bytecode, dex2oat produces OAT, and my guess that it should stand for Optimized Ahead of Time.




回答5:


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)

.oat - found at least three explanation where the best imho is "Optimized Android file Type" (and the idea came from here).

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).




回答6:


Reading some comparison between ART and Dalvik, i found that AOT refers to Ahead Of Time, you can read more about it Here



来源:https://stackoverflow.com/questions/28435860/what-does-oat-mean

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!