What does OAT mean?

2019-02-01 22:56发布

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?

6条回答
男人必须洒脱
2楼-- · 2019-02-01 23:09

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.

查看更多
Bombasti
3楼-- · 2019-02-01 23:13

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.

查看更多
Anthone
4楼-- · 2019-02-01 23:19

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

查看更多
对你真心纯属浪费
5楼-- · 2019-02-01 23:29

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.

查看更多
太酷不给撩
6楼-- · 2019-02-01 23:32

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

查看更多
祖国的老花朵
7楼-- · 2019-02-01 23:34

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

查看更多
登录 后发表回答