Execution environment and structure of Android

Android runs on the android runtime called DVM(Dalvik Virtual Machine), which is built on top of the Linux kernel. Android running on DVM has major components that are divided into separate areas.

  • Applications

    The application area contains applications developed in Java. It includes applications such as email clients, SMS programs, calendars, maps, browsers, address books, and other custom applications developed in Java.

  • Application Framework

    The application framework provides the various APIs needed to develop applications. You can use the various APIs in this area to represent buttons, text, and so on, or to use data from other applications such as address books. It also manages the lifecycle of an application by accessing multiple data, such as images or strings, or through the API.

  • Libraries

    The library provides a variety of C/C++ libraries available on Android. All of the libraries in this area are available to developers through the application framework.

    The library has a standard C system library based on BSD, modified for embedded Linux based devices. It also includes Media Library based on PacketVideo’s OpenCore, which can support files such as MPEG4, H.264, MP3, AAC, AMR, JPG and PNG.

    The Surface Manager library supports 2D and 3D graphics, and the WebKit library supports browser functionality. In the library area also provides SQLite, a database engine developed for embedded use.

  • Android Runtime

    The Android runtime runs on Java but uses the Dalvik Virtual Machine(DVM) instead of the Java Virtual Machine(JVM).

    DVM converts the source code(.java) written in Java into a class file(.class) through the Java compiler. And the class file is converted to Dakvik byte code by the DX compiler.

    In other words, the Java source code is stored as an executable(.dex, Dalvik Executable) and an optimized executable(.odex, Optimized Dalvik Executable), which runs on your Android device.

    Android 4.4(KitKat) Previously it was based on Dalvik, but ART(Android Run Time) was introduced from 4.4 version. Since Android 5.0(Lollipop) has been changed to work based on ART.

    ART(Android Run Time) has the following advantages and uses the same bytecode as Dalvik for backward compatibility.

    • AOT(Ahead-of-time) Compile
    • Improved garbage collection
    • Improved debugging support

    Dalvik uses a just-in-time(JIT) compilation method that changes the bytecode to machine code each time the app is run. The JIT compilation method requires additional memory to convert the bytecode to machine code.

    The Ahead-of-time(AOT) method converts DEX bytecode to machine code when the app is installed, without converting the code when the app is run. This method has the disadvantage of lengthening the installation time but it has the advantage of shortening the execution time.

  • Linux Kernel

    Android is based on Linux kernel 3.0.1(Android 4.0) and provides various drivers such as security, memory management, process management, and network stack.

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Post

  • Mastering the daily conversation in 4 languagesBasic sentences expressing my mood – I’m
  • 8 things you need to think about for work-life balance
    View on Youtube Image: juliezhuo.com who works as a design VP for Facebook, presented 8 ways for work and life balance in her article “The
  • 10 special abilities of Smartphone
    View on Youtube No matter where you go or what you do, your smartphone is always with us. We use the internet with a smartphone,
  • Java: abstract class, abstract method
    An abstract class in Java is a class that declares an abstract function to be implemented in a subclass as an abstract method. An abstract
  • Java: inheritance and constructors
    When an object is created from an inherited class, the constructor of the superclass is performed before the constructor of the subclass. That is, when
  • Java reserved words: super, final
    super is a Java reserved word that is used to access member variables or methods of a superclass that is obscured by a subclass. Access
  • Java: finalize method and garbage collection
    The Java Virtual Machine(JVM) automatically performs garbage collection for objects that are no longer needed for efficient system operation. At this point, the JVM calls
  • Java: Method overloading
    Method overloading is the same concept as constructor overloading. That is, you can use methods of the same name in the same class, but methods
  • Java final variable
    You can specify an end variable using the reserved word final. The final variable represents a constant value that can not be changed. Typically, final
  • Java class variables
    Class variables are declared with static and have the concept of global variables. Class variables are used for the following purposes. Object references and object