_01_android history and system architecture of 01_android application development environment

Source: Internet
Author: User

1.1 Android History and status

Andy Rubin was founded 22 months later → (2005) Google acquired.

Patrick Brady on Google I/O speech "Anatomy & Physiology of an Android" and presented the Android HAL architecture diagram.

Android Version upgrade
The Android system will continue to upgrade every half-yearly, in the summer and year-end, respectively. Each generation of Android will be named after the food, such as the 1.5 version called Cupcake (cupcakes), 1.6 for Donut (donut), then Eclair (French Cream sandwich dessert) and flan (Fruit pie). Donut will focus on social networking functions as an upgrade, adding social networking elements to the "various experiences of mobile phones".
1.5 (cupcake)
Based on the Linux Kernel 2.6.27 April 30, 2009, the official 1.5 version (cupcake) of Android was released. The main updates are as follows:
Capture/Replay videos and support uploading to YouTube
Supports stereo bluetooth headset while improving auto-pairing performance
Latest browser with WebKit technology, support for copy/paste and search on page
GPS performance is greatly improved
On-screen virtual keyboard
The main screen adds music player and photo frame widgets
Apps automatically rotate with your phone
SMS, gmail, calendar, browser user interface greatly improved, such as Gmail can now bulk delete mail
Camera starts faster and pictures can be uploaded directly to Picasa
Call Photo Display
1.6 (Donut)
Based on the Linux Kernel 2.6.29 September 15, 2009, the 1.6 (donut) version of the SDK was released. The main updates are as follows:
Completely redesigned Android Market
Gesture Support
Support for CDMA networks
Text To Speech system (Txt-2-speech)
Quick Search Box
New Photo-screen
Application Power Consumption view
VPN support
Support for more screen resolutions
Supports OpenCore2 media engine
New ease-of-use plugin for people with visual or auditory difficulties
2.0/2.0.1/2.1 (Eclair)
Based on the Linux Kernel 2.6.29 October 26, 2009, the 2.0 (Eclair) version of the SDK was released. The main updates are as follows:
Optimize hardware speed
"Car Home" program
Support for more screen resolutions
Reorganization interface
The new browser's user interface and support HTML5
List of new contact persons
Better white/black background ratio
Improve Google Maps 3.1.2
Support for Microsoft Exchange
Built-in camera flash support
Digital zoom
Improved virtual keyboard
Bluetooth 2.1
The Android code sequence will be sorted by the first English letter (C, D, E, F) in the dessert name.
The next version of Android will be named Froyo (frozen Yogurt, based on Linux Kernel 2.6.32). Froyo later versions of Android will be named Gingerbread (Gingerbread, based on Linux Kernel 2.6.33/34).

Android version

Release date


Android 1.1

Android 1.5

April 30, 2009

Cupcake (paper cup cake)

Android 1.6

September 15, 2009

Donut (Fried noodles)

Android 2.0/2.1

October 26, 2009

Eclair (Long Muffin)

Android 2.2

May 20, 2010

Froyo (Frozen Yogurt)

Android 2.3

December 6, 2010

Gingerbread (ginger cake)

Android 3.0/3.1/3.2

February 22, 2011

Honeycomb (Honeycomb)

Android 4.0

October 19, 2011

Ice Cream Sandwich (ice cream sandwich)

Android 4.1

June 28, 2012

Jelly Bean (Jelly Bean)

Android 4.2

October 8, 2012

Jelly Bean (Jelly Bean)



Lime pie (Lime pie)

Architecture and features of the 1.2 Android system

1.2.1 Android system architecture

The bottom of the Android system is built on a Linux system, which is built using the software stack (software stack). So that the layer and layer are separated from each other, clear the division of the layers. This division of labor guarantees a low fornication between layers, and when the underlying changes, there is no need for the upper-level application to make any changes.

System architecture diagram for Android system:

The Android system is divided into four tiers: the application layer (application), the Application framework layer (application framework), the System Runtime Layer (Libraries), and the Linux kernel layer (Linux Kernel).

The Android operating system can be divided into 5 sections on four main levels:

1. Application Layer (application)

The Android system includes a range of core applications, including e-mail, sms SMS, calendars, dialer, maps, browsers, contacts, and more. These applications are written in the Java language. This book focuses on how to write an application running on an Android system, layered on a program, and at the level of a system's core application.

2. Application Framework layer (application framework)

The Android application framework provides a number of APIs for developers to use, and the development of Android applications is to invoke these APIs to implement functionality as required.

The application framework is the foundation of your application. For the reuse of software, any application can develop the functional modules of the Android system, which can be used by other applications as long as they are published in accordance with the specifications of the application framework.

3. System Runtime Layer (Libraries)

The Android system runtime is written in C + + language and is a set of libraries of functions that are used by different components. In general, Android app developers cannot invoke this library directly, and they are called through the API provided by the application framework on top of it.

Here is a brief introduction to some of the core libraries:

LIBC: a standard C system library derived from the BSD system, which is based on a special adjustment for portable Linux systems.

medio Framework: Packetview-based Opencore, this library supports playback and recording of hard disk and video format files, and can view static images.

Surface Manager: manages the interaction between the display and access operations while executing multiple applications, and is responsible for the display compositing of 2D drawings and 3D drawings.

WebKit: Web browser engine that provides support for Android browsers.

SGL: The underlying 2D image engine.

3D Libraries: based on OpenGL ES 1.0API, provides the ability to use hardware and software to achieve 3D acceleration.

FreeType: provides support for bitmap and vector fonts.

SQLite: a lightweight relational database.

4. Android Runtime

The Android runtime is done in two parts: the Android Core library and the Dalvik virtual machine. The core library set provides most of the functionality that the Java language Core library can use, and the Dalvik virtual machine is responsible for running Android applications.

While Android applications are written in the Java language, each Java program runs within the Java Virtual Machine JVM, but Android is running on a mobile device, due to hardware limitations, Instead of using Java's virtual machine JVM to run programs, Android applications use their own standalone virtual machine Dalvik VMS, which are optimized for multiple simultaneous, efficient virtual machines. Each Android application runs within a single Dalvik virtual machine, so the Android system can easily isolate the application.

5. Linux kernel

The Android system is based on the operating system built on Linux2.6, its Linux kernel provides security, memory management, process management, network protocol stack, drive model and other core system services for Android system. The Linux kernel helps the Android system achieve abstraction between the underlying hardware and the upper software.

1.2.2 Dalvik vm and JVM differences

The JVM (Java Virtual machine) is a fictional runtime that runs Java programs by simulating the implementation of various computer functions on a real computer. It has a perfect hardware architecture (such as processor, stack, register, etc.), also has the corresponding instruction system, the use of the JVM is to make Java program support and operating system independent. Theoretically, in any operating system, a Java program can be run as long as there is a corresponding JVM.

Dalvik VMs are virtual machines that run Android programs on Android, with instruction sets that are based on the register architecture and perform unique file format-dex bytecode to accomplish important functions such as Object Lifecycle management, stack management, thread management, security exception management, garbage collection, and more.

Because the Android application development programming language is Java, and the Java program runs on the JVM (Java Virtual machine), so some people will confuse Android's virtual machine DALVIKVM and JVM, but in fact Dalvik does not obey the JVM specification, And both are incompatible.

From the compilation process of the Dalvik VM and JVM, the compilation process is as follows:


Dalvik Vm:.java→.class→.dex

As you can see from their compilation process, the JVM is running the Java bytecode of the. class file, but the Dalvik VM is running its converted Dex (Dalvik executable) file. The JVM bytes load bytecode from the. class file or jar and run, and the Dalvik VM cannot load bytecode directly from the. class file or jar package, which requires the DX tool to compile all of the application's. class files into a. dex file, Dalvik The VM runs the. dex file.

Shows the difference between the Dalvik VM and the JVM compilation process:

As you can see, the Dalvik VM compiles the. java file into a. class, reconstructs the. class, consolidates the basic elements (constant pool, class definition, data segment), and finally compresses it into a. dex file. The constant pool describes all the constants, including references, method names, numeric constants, and so on; The class definition includes access to the identity, the class name, and other basic information; The data segment contains various method codes specified by the VM, as well as information and instance variables about the classes and methods. This method of consolidating multiple. class files greatly improves the speed of the Android program, for example: multiple classes in the application define string constant tags, and in the JVM, they are compiled into multiple. class files, each of which contains the tag constant in a constant pool of. class files, but Dalvik After the VM is translated into a. dex file, there is only one tag constant in its constant pool.

A very important difference between the JVM and the Dalvik VM is that it is based on a different architecture. The JVM is a stack-based architecture, and the Dalvik VM is a register-based architecture. In contrast to stack-based JVMs, a register-based Dalvik VM implementation sacrifices some hardware versatility, but it is more efficient in executing code. In general, the time to interpret instructions in a VM is mainly spent in the following three areas:

Distribution directives;

access to operational arithmetic;

Perform operations;

The distribution of instructions in this link has the greatest impact on performance. In register-based Dalvik VMS, it is more efficient to reduce the distribution of redundant instructions and to reduce read and write access to memory.

From the difference between the JVM and the Dalvik vm, the Dalvik VM is optimized for the Android embedded operating system, making it more power-saving, more memory-efficient, and more operational, but sacrificing some of the JVM's platform-agnostic features. In fact, the Dalvik VM was designed for Android, regardless of other platform issues. Here are just two important differences between the JVM and the Dalvik VM, after all, this book is not about the Android kernel, this is just the characteristics of the Dalvik VM, readers of this part of the content.

1.2.3 The advantages of the Android system platform

The Android system has the following advantages over other operating systems:

1. Openness

The first is the openness of the Android system, its development platform allows any mobile terminal manufacturers to join the Android Alliance, reducing the development threshold, so that it has more developers, as users and applications are increasingly rich, will also promote the maturity of Android system. At the same time, openness facilitates the popularity of Android devices and market competitiveness, which helps consumers buy lower-priced Android devices.

2. Rich Hardware Selection

Also due to the openness of Android, many hardware vendors can launch a variety of devices equipped with Android systems. Today, Android is not just running on mobile phones, more and more devices are starting to support Android, such as TVs, wearable devices, digital cameras, etc.

3. Easy to develop

Google has opened the Android system source code, provides the developer a free development environment, does not have to be bound by the various rules and regulations.

4. Support for Google services

Google, as a service company, provides services such as maps, mail, search, and so on, which the Android system can seamlessly combine.

_01_android history and system architecture of 01_android application development environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.