Android Power User with Joe Levi
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

Joe graduated from Weber State University with two degrees in Information Systems and Technologies. He has carried mobile devices with him for more than a decade, including Apple’s Newton, Microsoft’s Handheld and Palm Sized PCs, and is Pocketnow’s “Android Guy”.

By day you’ll find Joe coding web pages, tweaking for SEO, and leveraging social media to spread the word. By night you’ll probably find him writing technology and “prepping” articles, as well as shooting video. Read more about Joe Levi here.

You May Also Like
Moto G30 review in hand photo
Moto G30 quick review: a bit of everything
Is the Moto G30 worth buying for $220? Let’s find out!
Google UI Design
Google’s starting to learn about Smartphone User Interface Design
The hamburger button has always been bad user experience design. Google is finally following the data and modifying their apps for improved usability.
Apple’s iPad Pro lineup, the Galaxy Buds Pro and more affordable phones are on sale
We keep on getting great deals from Amazon and Verizon, where you can get a new iPad Pro, Samsung Galaxy Buds and more devices on sale