What is Dalvik Executable

Android Runtime and Dalvik Virtual Machine

Hans-Christian Dirscherl

Let's take a closer look at the heart of Android - namely the runtime and the associated Android virtual machine.

Each Android application runs with its own process (which you can display and exit using a suitable tool such as the process manager in the Astro File Manager) and with its own instance in the Android virtual machine. To put it more simply: each app runs in its own virtual machine. Several instances of the Dalvik VM are always running on an Android smartphone at the same time. Each process also runs under the user who is created for the respective application. If the application is terminated, the process is also terminated.

The Android virtual machine is a Java Virtual Machine (JVM) specially developed for the requirements of the smartphone operating system, called the Dalvik Virtual Machine. Dalvik VM (Dalvik is a town in Iceland where the ancestors of Dan Bornstein, the developer of Dalvik VM, lived) executes files in Dalvik Executable (.dex) format. These are designed in such a way that they take up as little memory as possible. Because memory is scarce in smartphones. To do this, she avoids repetitions as much as possible.

In addition, the Dalvik VM copes well with weak processors, which is also important for use on smartphones. And it is optimized for an operating system that cannot access any SWAP partition (swap partition. Under Windows, it corresponds to the swap file). In addition, the electricity requirement was taken into account with the Dalvik VM, after all, it is used on battery-operated devices.

In addition, Google wants to avoid patent problems with Oracle by using the Dalvik VM and save license costs. As is well known, Oracle bought Sun. Sun invented the Java programming language and continues to develop it to this day. However, the success of Android has awakened Oracle: The database giant, which owns Java, has sued Google for patent infringement: According to Oracle, Google is said to have repeatedly infringed patents relating to Java in the development of its Android mobile operating system. Quote from spokeswoman Karen Tillman: "Google has knowingly, directly and repeatedly violated Oracle's Java-related property rights".

Now the question arises: what exactly does the Dalvik VM do? And how does it differ from a normal Java Virtual Machine on the PC?