Android Runtime (ART): What it is and how it works

  • ART replaces Dalvik on Android, improving performance and efficiency.
  • Use Ahead-Of-Time (AOT) compilation instead of Just-In-Time (JIT).
  • Reduces battery consumption and improves application performance.
  • It is an upgradeable module in recent versions of Android.

Android Runtime ART

Android Runtime (ART) is a key execution environment in the Android ecosystem, responsible for running applications on mobile devices. Since its introduction in Android 4.4 KitKat as an experimental alternative to Dalvik, ART has revolutionized the way applications are processed and executed, improving system performance and efficiency. If you want to better understand how to optimize the performance of your Android device, you can consult This article about optimizing Android devices.

In this article, we'll take an in-depth look at what ART is, how it differs from Dalvik, its main advantages, and how it has evolved across different Android versions. We'll also analyze its impact on battery consumption, resource optimization, and app compatibility.

What is Android Runtime (ART)?

Android Runtime (ART) is the virtual machine that runs applications on Android.. In simple terms, ART is responsible for converting application source code into executable code capable of interacting with the device's hardware. It replaced Dalvik in Android 5.0 Lollipop and has continued to evolve in subsequent versions. Additionally, you can learn how to scan a QR code in an image on Android to facilitate interaction with applications through This tutorial is useful.

Unlike Dalvik, which used a compilation-based execution model Just-In-Time (JIT), ART employs an approach of Ahead-Of-Time (AOT) compilation. Instead of compiling code every time an application is run, ART pre-compiles the code at installation time. This improves performance and reduces battery consumption.

Main differences between ART and Dalvik

Dalvik was the original Android virtual machine, used from the earliest versions of the operating system up to Android 4.4 KitKat. Below, we explain the main differences between Dalvik and ART:

  • Compilation: Dalvik used JIT, which meant that the code was compiled every time an application was run. Instead, ART uses AUGUST, compiling all code at installation time.
  • Battery consumption: Thanks to the AOT compilation, ART reduces processor usage while running applications, which results in lower battery consumption.
  • Execution time: Applications in ART launch faster because they don't need to be compiled on every run.
  • Memory usage: Applications may take up more storage space due to precompilation, but this is offset by a better overall performance.

Advantages of ART

The implementation of ART in Android has brought with it several significant improvements:

  • Greater energy efficiency: By reducing the processor workload, ART enables a better energy management.
  • Fewer pauses in garbage collection: Thanks to an optimization in the garbage collector, applications experience fewer interruptions.
  • Backward compatibility: ART can run the same bytecode as Dalvik, which facilitates the transition.
  • Best overall performance: Applications run more smoothly fluid and fast compared to Dalvik.

Optimizing Performance with ART

ART introduces mechanisms that optimize application performance:

  • AOT compilation: Converts Java code into executable code at installation time, allowing for easy faster execution.
  • Improved garbage collection: Reduces fragmentation and improves the memory management.
  • JNI support: ART introduces a stricter implementation of the Java Native Interface (JNI), improving the security and stability.

Compatibility and migration to ART

When ART was introduced in Android 4.4 KitKat, developers were required to verify that their apps were compatible. Starting with Android 5.0 Lollipop, ART became the only available runtime, effectively eliminating Dalvik. If you need information on how to remove a custom ROM on Android and restore the stock ROM, I recommend visiting This detailed article.

To ensure compatibility, developers have had to adjust certain practices, such as:

  • Avoid using JNI references that can cause memory errors.
  • Optimize compilation and debugging to take better advantage of ART improvements.

ART in recent versions of Android

Since Android 8.0 Oreo, ART has been optimized with new features:

  • Execution profiling: It allows to improve the AOT compilation efficiency.
  • Modular upgrades: In recent versions, ART has become a upgradeable module from Google Play.
  • Security improvements: Improvements have been implemented to optimize application execution without compromising system security.

Google continues to evolve ART with each new version of Android. One of the most significant changes has been the introduction of Project Mainline, which allows you to update ART without depending on operating system updates. In this regard, you might find our comparison interesting. about Android Auto and Android Automotive.

With ART as a standalone module, users can benefit from performance and security improvements without having to wait for a new version of Android.

Optimization of the execution code and the reduction of resource consumption make ART a key part of the evolution of Android, ensuring a smoother and more efficient user experience.

What is TARE function The Android Resource Economy-0
Related article:
Android TARE: resource optimization and autonomy