Android Deep Exploration

Source: Internet
Author: User

Deep Exploration (Volume I)HAL and driver development very reluctant in the Yue teacher's "bullying inducements", finally hastily read the four chapters, is finished his initial task, heard to write feelings, the amount, can do, then write Bai, why is the hasty, this is because the name of Deep Exploration, But in fact is swallowed, but fortunately, this is the persecution of personal feeling or very effective, haha, feel good cheap ah, do not want others to smoke a few whips to move, hey, since talk about the feelings that talk Bai.

Chapter One Android system porting and driving overview

This chapter let me knowAndroidnative code does not support many devices, so you want to run flawlessly on your deviceAndroid, you need to develop some other programs that makeAndroidyou can identify the hardware in the appropriate device. This is customized for specific devicesAndroidprocess is called "porting." And this kernel in computer science, also known as the core, is the most basic part of the operating system, is mainly responsible for the management system resources, it is for many applications to provide secure access to computer hardware part of the software, this access is limited, and the kernel determines when a program at a certain part of the hardware operation for how long. Because direct hardware manipulation is very complex, the kernel typically provides a hardware abstraction to accomplish these operations. Through inter-process communication mechanisms and system calls, the application process can indirectly control the required hardware resources (especially the processor andIOdevice). Among them,Androidporting is divided into two parts: application porting and system porting. AndroidDivision of the system: the first layer,Linuxkernel (mainly includes drivers and programs that manage resources such as memory, process, power, etc.), the second layer,C + +code base (mainly includingLinuxof the. sofiles and embedding them inAPI(in the programNDKcode), third layer,Android SDK API(direct application-orientedJava APKlayer Fourth, application (directly for end-userJavaapplication). andAndroidmain tasks of the transplant:1, transplantLinuxDrive;2, transplantHAL. LinuxThe kernel version now has three main maintenance:Linux2.4,Linux2.6and thelinux3.x.

ViewLinuxkernel version of the system: inLinuxTerminal Executionuname-aorcat/proc/version. Which/procis not an ordinary file system, but the image of the system kernel, that is, the files in this directory are stored in the system memory, it as a file system to access the system kernel data operation to provide an interface. LinuxThe kernel version number consists of the following parts:1, version main number;2, minor version number;3, revision version number;4, fine-tuning version number;5, for a specificLinuxdescription of the System special tuning. The most effective way to reduce the coupling between objects and objects is to abstract the class through an interface, which means that the higher the abstraction, the lower the coupling. A driver is a kind of program that interacts directly with hardware and is responsible for abstracting the hardware. LinuxDivide the memory and peripherals into3Large class: Character devices, block devices, and network devices. LinuxDrive programming. LinuxDrive only withLinuxkernel-related, with user-usedLinuxSystem-Independent.

Chapter II Building an Android Development Environment

This chapter mainly introduces how to buildAndroidthe environment for the underlying development, mainly includingAndroidapplication development environment,Android NDKdevelopment Environment and cross-compilation environment. Androidthe underlying development requires not only a cross-compilation environment, but also developmentAndroidthe environment for the application. Development testing and debuggingLinuxDrive,HALwhich tools are required for the library:1,JDK6or the above version;2,Eclipse 3.4or the above version;3,ADT(for developmentAndroidapplications);4,CDT (for DevelopmentAndroid NDKprogram);5,Android SDK;6,Android NDK;7, cross-compiling environment;8,Linuxkernel source code;9,Androidsource code;Ten, a serial tool for debugging the Development Board:minicom. This chapter mainly introduces theUbuntu Linuxunder the EnvironmentAndroidConfiguration of the development environment. The whole chapter Basic no notes, basically through the "fool-type" with the completion of the reading, the operation is very strong, involving a little command and the proper noun needs memory. Look at this chapter, the impulse is that my computer is notLinuxsystem, but also feel that the system is very strong, feel their own use ofWindowsIt's like a princess, and it's the real king. Well, this is the feeling, the whole chapter of the sense of being strong, let me withLinuxstick close to contact, deeply attracted by its strong.

Chapter III Getting started with Git

Just see this time I think this is what command or function, but I was wrong, it is actually a powerful source code management software (haha, please allow me this is not the beginning of the person outA bit). This is also the open sourceLinuxthe product under the system can be said to be a ladder for people to progress, since there is a ladder, and so what, not to hurry down to climb, so resistant to read down, from the installationGitto viewGitdocument and then to the large source of the submission and acquisition, finally finished, a whole chapter is in the showGitbasic usage of the. As the author says, thoughGitnot studyAndroidPorting andLinuxthe technologies that the kernel and driver development must master. But for readers who want to delve deeper into these low-level technologies,Gitwill be an essential tool in the learning process. The best way to learn a new technology is not to read technical books, or to view articles written by others online, but to read the source code of interest directly. After all, the source code is the most able to reflect the real idea of the software author. It's like learning .Linuxkernel Development, just looking for a few of the so-called "authoritative" books to see, and can not really understandLinuxCore design concept of the kernel. And the only thing that canLinuxthe kernel enters a little, even intoLinuxthe kernel way is to read directlyLinuxthe source code of the kernel. While it was hard to understand the code that was obscure to the poet's collapse at first, with the constant experimentation and support of some kernel theory, the once obscure source codes would be opened like Pandora's Box. From2005yearsGitsince its inception, with its powerful features near-perfect concept and very high performance gradually conquered the hearts of the vast number of technical staff, now there are more and more open source projects by other version management tools moved toGiton. These open source projects are undoubtedly huge treasures for developers, and this key isGit. BecauseLinuxthe kernel is completely usingGitmanage, not master.Git, is simply impossible. This is part of the author's sentiment, and some of the message. But I can only perceive the fur, more stay in: Oh,GitThis software is very powerful. Other seems to have no feeling, how can have feelings, even the code did not have a good knock for a few days of my, once again to belittle themselves.

Fourth chapter source code download and compile

The main introduction is how to download and compileAndroidSource code andLinuxKernel source code. The steps are clear, or the same as before the feeling of such a time can only as a silent follower, followed by the author indefinitely, seems to be reading down, a kind of want to take these command steps really and the computer as the impulse to save into the head, but can not, but in the course of reading will encounter some of their familiar commands, At this point will be a little happy, the original oneself is not what do not understand, in fact, is self-comforting, a little consolation, step by step self-powerful, hope is so. HereAndroidThe transplant is mainlyLinuxporting of the kernel. andLinuxkernel porting is primarilyLinux-driven porting. So in order to develop and testLinuxDrive. Need to beUbuntu Linuxbuild two sets of development environment:Androidapplication development environment andLinuxKernel development environment. WhichLinuxThe kernel development environment is the focus of this chapter, and in this chapter, we also introduce how to build two development environments, with emphasis on the practice.

This whole is the author of the general content of the first article out of the Development Board that chapter, barely considered the Android Drive before the development of the preparation of reading, the above is I read the four chapters of the content of some of the mental process, which contains a few content summaries, as well as the internal fluctuations in reading time, The overall feeling of the book is not white read, the beginning of the teacher such a full-time to eat up the idea of wiping away.

Android Deep Exploration

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.