We are reader supported. External links may earn us a commission.


Android Power User: What are the Dalvik VM and Dalvik Cache? (Video)

By Joe Levi September 19, 2012, 3:09 pm
Android Power User with Joe Levi

In today's episode of Android Power User we're going to learn about the Dalvik VM and Dalvik Cache, why they're named the way they are, what they do, and how they do it.

"Dalvik", it's a word that gets thrown around when you're talking about custom ROMs, particularly when flashing a new ROM and the need to "Wipe the Cache". Today you'll find out what that means (just in case you didn't already know).

In our last episode we talked about JIT, or "Just In Time", which is the compiler built into newer versions of Android. We sort of put the cart before the horse with that one, but it helped open the discussion about one of the most powerful aspects of Android: Dalvik.


What's a VM?

Computers run on physical hardware (like desktops or laptops). These "machines" have components inside them and drivers that allow software to talk to the hardware. But hardware doesn't have to be physical, it can be virtual. In this case, a "virtual machine" or "VM" looks like it's a real computer, but it's not. This allows users a lot of flexibility and even added security.

In Android, apps are run in the Dalvik Virtual Machine.

Dalvik? What kind of name is that?!

Dalvik is open-source software that was originally written by Dan Bornstein. He reportedly had ancestors who lived in a fishing village called Dalvík in Eyjafjörður, Iceland.

Android apps are written in Java, compiled to bytecode, then converted from Java Virtual Machine (JVM)-compatible .class files to Dalvik-compatible .dex (Dalvik Executable) files before they're installed on your Android. The Dalvik Executable format is compact and designed to for systems that have limited memory and processor speeds.

What about the Cache?

When your smartphone or tablet starts, the Dalvik VM inspects all your apps and creates a tree of dependencies which is stored in something called the Dalvik Cache. This enables your apps to run more optimized and is why your phone takes longer to boot up after you just flashed a new ROM or update — it's rebuilding the cache.

Does this have anything to do with ODEX and De-ODEX?

Yes, yes it does! But that's a topic for another episode of Android Power User!

Sources: ddsystems, Wikipedia


Latest Articles


Here's how the Apple iPod changed the world in 21 years

iPod was an industry-changing device at its time, and it had a massive impact on modern smartphones, and the way we listen to music. We take a last look at the now-discontinued Apple iPod and the history it leaves behind.

By Roland Udvarlaki May 11, 2022, 10:00 am

How to use Mic Modes in VOIP and FaceTime Calls

This guide will go over the steps you need to follow to activate one of the available Mic Mode settings on Apple Devices to begin using the feature and improve your calling experience.

By Aryan Suren May 10, 2022, 10:00 am

This iPhone 14 feature might urge users to upgrade

Until now, it appeared that iPhone 14 would only be a minor upgrade over the iPhone 13 series. However, a new leak suggests that the iPhone 14 will come with one feature that might urge users to upgrade.

By Sanuj Bhatia May 9, 2022, 5:00 am