Reference

Dalvik Cache

The Dalvik cache is where Android stores ahead-of-time compiled, machine-optimized versions of an app's bytecode (.odex/.oat/.art files) so the app launches fast without recompiling. It lives in system-managed storage and is rebuilt automatically if cleared.

Android developmentAndroid

Dalvik Cache

Also known as: dalvik-cache android, odex cache, art cache, android dalvik cache

The Dalvik cache is where Android stores ahead-of-time compiled, machine-optimized versions of an app's bytecode (.odex/.oat/.art files) so the app launches fast without recompiling. It lives in system-managed storage and is rebuilt automatically if cleared.

  • Stores ahead-of-time compiled app code (.oat/.art/.vdex), historically in /data/dalvik-cache.
  • Managed by the ART runtime and the background dexopt job; rebuilt automatically if deleted.
  • Counts toward System data in Settings, not an app's own cache, so it isn't user-clearable per app.

What it is and how it's built

When you install an APK, Android doesn't run the raw DEX bytecode directly. The ART runtime (which replaced the legacy Dalvik VM in Android 5.0) compiles that bytecode into a more optimized form and stores the result so future launches are faster. Historically these compiled artifacts were written to a folder called /data/dalvik-cache, and the name stuck even though modern Android uses ART.

On current Android, compilation produces .oat (compiled native code), .art (preloaded heap image), and .vdex (verified DEX) files. Some of this lives next to the app in its /data/app/<package>/oat/ directory, and shared/boot-class artifacts still live under /data/dalvik-cache/. Together this is the compiled-code cache the system maintains on your behalf.

When it changes and why you see it as system data

Modern ART uses profile-guided compilation: rather than compiling everything up front, it interprets and JIT-compiles at runtime, records which methods are hot, and then recompiles those methods during device idle/charging via the background dexopt job. That means the size of an app's compiled code grows and shifts over the first days of use.

Because this data is generated and owned by the OS, it is counted under System data (or System / Android OS in Settings), not under the app's own cache. You generally cannot clear it directly from an app's storage screen; the system rebuilds it as needed. After a major OS update you may see a one-time "Optimizing apps" pass that regenerates these artifacts for every installed app.

Related terms

Keep reading the reference.

Act on it

Guides and tools for this topic.