Background correlation and system architecture analysis


1.Android background and current situation

The Android system was created by Andy Rubin and was later acquired by Google; the earliest version is: Android version 1.1 The latest version is 5.28 this year, Android M launched at the Google I/O conference. Interestingly, the names of the Android systems are all named after snacks. The following table shows the 15 Android version names, corresponding API numbers and releases. time!

##Android 2.2/2.2.1: Froyo: Frozen Yogurt82010.5.20Android 2.3: Gingerbread: Gingerbread92010.12.7Android 3.0: Honeycomb: Honeycomb112011.2.2Android 3.1: Honeycomb: Honeycomb122011.5.11Android 3.2: Honeycomb: Honeycomb132011.7.13Android 4.0: Ice Cream Sandwich:ice cream sandwich142011.10.19##Android 4.1:Jelly Bean:jelly beanAndroid 4.2: Jelly Bean:Jelly BeanAndroid 4.3: Jelly Bean: Jelly Bean##Android 4.4: KitKat: Kit Kat Chocolate192013.11.01Android 5.0: Lollipop: Lollipop212014.10.16Android M: Preview222015.5.28
System version nameAPI version numberRelease time
Android 1.5: Cupcake: Cupcake32009.4.30
Android 1.6: Donut: Donut42009.9.15
Android 2.0/2.0.1/2.1: Eclair: Muffin5/6/72009.10.26
16 2012.6.28
172012.10.30
182013.7.25
##

Okay, in addition to the above public versions, there are of course some other versions. As of 2015.1, the market shares of each version are as follows:


Android系统份额分布图(截止2015年1月)

Look After reading the above information, we may have this question: There are so many system versions, which version should we target when developing? This is the "fragmentation" problem of Android that an Android must face, and this problem is divided into two: ① System fragmentation: When we develop apps, we may need to be compatible with lower versions, for example, the minimum compatibility is version 2.3; due to the prevalence of various Rom customizations, Chinese people like to make some changes to the native system, which leads to the Problems that are feasible, but not feasible on custom Rom, such as camera calls~ ②Screen fragmentation: There are mobile phones with various screen sizes on the market, 4.3 inches, 4.5 inches, 4.7 inches, 5.0 inches, 5.3 inches... etc. In addition to mobile phones, there are also Android tablets, so we may To deal with this screen adaptation problem, of course, we don’t need to consider these complicated things when we first learn it. We will delve into it in the subsequent actual development!

2.Android system features and platform architecture

System features:

  • The application framework supports the reuse and replacement of components (The app complies with the conventions of the framework when it is released, and other apps can also use this module)

  • DalvikVirtual machine: specially optimized for mobile devices -Integrated browser: Open source WebKit engine

  • SQLiteStructured data storage

  • Optimized graphics library, multimedia support, GSM phone technology, Bluetooth, etc.

  • Built using software overlay method

Platform architecture diagram:

Android平台架构图

Simple understanding of the architecture:

  1. Application(Application Program layer)We generally say that the development of the application layer is carried out at this level, which of course includes a set of applications built into the system, using the Java language

  2. Application Framework(Application Framework Layer)Whether it is built into the system or the App we write ourselves, we need to use this layer. For example, if we want to blacklist incoming calls and automatically hang up the phone, we need to use the phone Management(TelephonyManager) Through this layer, we can easily implement the hang-up operation without worrying about the underlying implementation

  3. Libraries (library) + Android Runtime (Android runtime)Android provides us with a set of C/C++ libraries that are used by different components of the platform, such as the media framework ; The Android Runtime is composed of the Android core library set + Dalvik virtual machine. The Dalvik virtual machine is a virtual machine for mobile devices. Its characteristics: it does not require fast CPU computing speed and a large amount of memory space; and each App Each app runs separately in a separate Dalvik virtual machine for a Dalvik process) and his simple running process is as follows: Dalvik的运行流程

  4. Linux kernelHere It is about things involving the underlying driver, some system services, such as security, memory management and process management, etc.

3. Summary of this section:

This In this section, we understand the historical background and current situation of Android, and then briefly analyze the system characteristics and system architecture of Android. We only need to understand these conceptual things, and in the next section we will start building the Android environment!