The first chapter is mainly about LinuxDrive andAndroidhalthe basic knowledge. First, we introduceAndroidThe system architecture is divided into four layers,LinuxKernel,C + +code Base,Android SDK API, applications. Understand that these four layers areAndroidthe premise of system transplant,Androidsystem porting refers to theAndroidthe operating system runs on a particular hardware platform. andLinuxThere is a great advantage, that isLinuxthe kernel itself supports many commonCPUarchitecture, therefore, theAndroidin a differentCPUporting between architectures without making too many changes. During the transplant, in addition to migratingCPUbeyond the framework, the most important is to transplantLinuxDrive. HALthe words are located inAndroidThe second layer of the system architecture is the normalLinuxProgram Library,Android SDKthroughHALAccessLinuxthe driver, that is, is not able to directly access. Androidthe transplant is, to a large extent,Linuxporting of the kernel. Linuxkernel porting is porting the driver. In the case of different versions, the source code needs to be re-modified, and the newLinuxthe kernel is recompiled before it can be run, even ifAndroidversions are different, as long asLinuxThe kernel version is the same,Linuxdrivers can be replaced with each other. ViewLinuxThe kernel version number can beuname-a,cat/proc/version, and other orders to produce the look. And it also requires major/procThe image of the kernel of the 20 system is not an ordinary file system, that is, the files in this directory are placed in the system memory.
Android Deep Exploration--the first chapter