33

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?

Mike
  • 2,132
  • 3
  • 20
  • 33
Snowcat8436
  • 331
  • 1
  • 3
  • 4
  • I'm searching this meaning too, but all i can find it's just a file that stores c++ code and other informations like that, but no one give a meaning for this word. – Ivan Verges Feb 10 '15 at 15:55
  • Thanks @IvanVerges Just wait google official docs... – Snowcat8436 Feb 17 '15 at 05:05
  • Any news here? Google uses the short form in its documentation only and I'm still looking for the real meaning, too. Can we assume the long version is "Ahead of Time files" for OAT files maybe?? – Nils Jan 30 '16 at 12:55
  • OAT and ODEX (optimized dalvik executable) both are the same. It's just 2 names to confuse people. Is created like this: dex2oatd64 --dex-file=DeskClock.jar --dex-location=DeskClock.apk --oat-file=package.odex – Zbigniew Mazur Mar 22 '23 at 11:22

7 Answers7

70

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.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
Jesse Wilson
  • 39,078
  • 8
  • 121
  • 128
  • 4
    Hah. Now I'll have to add a "dequakerize" alias for the "deodex" command in baksmali. – JesusFreke Oct 03 '17 at 23:00
  • 9
    Can anyone please explain what's actually funny? I suppose it's some double meaning, but as not native speaker I'm totally can't understand it. – AlexanderShirshov Jan 26 '20 at 14:55
  • 5
    @AlexanderShirshov https://en.wikipedia.org/wiki/Quaker_Oats_Company – Chao Zhang Apr 23 '20 at 16:18
  • 3
    @AlexanderShirshov Quaker is the name of a company that produces oats, hence the process of converting .dex files to .oat (AOT) files was internally joked about as "quakerizing". Joke wouldn't have worked if they appropriately named .oat files .aot files instead. – M.Ed Jun 24 '22 at 10:20
  • Hah, interesting. – zwh Aug 26 '22 at 07:52
21

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

Community
  • 1
  • 1
apricot
  • 3,599
  • 3
  • 19
  • 20
3

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.

B-GangsteR
  • 2,534
  • 22
  • 34
2

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

0

Oat and odex (optimized dalvik executable) is the same. It's just 2 names to confuse people. Is created for DeskClock in build time like this:

dex2oatd64 --dex-file=DeskClock.jar --dex-location=DeskClock.apk --oat-file=package.odex (remaining params are hidden to simplify this post, you will get it from out/verbose.log.gz when compiling deskclock with clean out/.soong/..intermediates )

So dex to oat creates *.odex, not *.oat.

Zbigniew Mazur
  • 653
  • 7
  • 11
-1

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.

Mike
  • 2,132
  • 3
  • 20
  • 33
  • 4
    Why was this downvoted? Downvoters should always give reasons for their actions. If the answer is wrong, it would help the people on this community. – Shailen Aug 19 '15 at 12:55
  • 6
    The answer explains what OAT is and not what OAT, the acronym, stands for, which is what the question desires. Thus, it does not answer it. – Jake Wharton May 03 '17 at 13:38
-3

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

Ivan Verges
  • 595
  • 3
  • 10
  • 25