Chapter I.
By reading this chapter, we have a preliminary understanding and understanding of an overall structure of the Android system, including the Linux kernel, C + + code library, Android SDK API, and application layer four. Android system porting and application porting, application porting refers to porting an Android application to a different hardware platform. The code needs to be modified to fit the other hardware. System migration is to adapt the Android system to the CPU architecture of the major hardware vendors, while recognizing the hardware on each platform, the play of which is Linux-driven development and porting. Another is some knowledge about the Linux kernel, learn to use the command Uname–a and cat/proc/version to see the kernel version, as well as the version number of the content represented by each. Then is the general introduction of the driver of some concepts, the advantage of device driver is to enable hardware personnel and software personnel from their own perspective to think about the problem without the need to consider whether or not to be compatible with the other side of the results, the driver is directly related to the hardware to interact with the program, is responsible for the hardware abstraction. Device drivers can be divided into character devices, block devices, and network devices. Character devices are accessed in serial order. Block devices are accessed through the system's buffers, but they are accessed by using the operating interface of the file system. Network devices are completely different from theirs. Whether or not the driver is generic depends on the same kernel version of Linux.
Attach a diagram that looks at the kernel version:
Chapter II
This chapter focuses on configuring the Android development environment under Linux Ubuntu, including installing the JDK under Ubuntu, installing the Android SDK, installing Eclipse, installing the ADT and setting up the AVD, installing the Android NDK, and install the cross-compilation environment Codesourcery, because the development of the PC using the x86 architecture, the use of a complex operation instruction set, but the target of the machine is Android ARM architecture, so need to install a cross-compilation environment to configure, However, the installation configuration of the cross-compilation environment is complex and can be used by someone else's compiled cross-compilation environment. So we used a complete cross-compilation environment that was copied from someone else. Throughout the installation process should be noted that the installation of software programs under the Linux system needs to configure the environment variables to install the JDK, for example, download the JDK, the tar.gz file to the specified path, the decompression after the completion of the terminal to enter the Gedit/etc/profile, Enter export Path=.:jdk/jdk1.8/bin=path in the configuration file. It is also important to note that the add process requires superuser privileges to modify this file. So you need to switch to Superuser before you can perform this operation. The profile file is then reloaded and finished.
Install the JDK for example, the last few pictures
This diagram is a warning that a file has been modified without superuser privileges.
This is the result of executing the modified file and testing the environment variables after the completion path is configured
Chapter III
This chapter has learned some things about git, in the process of installing git, found in the book added to the git extension software can not be installed, the input after the prompt for invalid operation. Then using the man git-checkout command to see the Help Manual on Git, and then start building the repository, you need to switch to the root user to perform this operation. Built a/demo/helloworld-git directory in which git init was built to build a local library. Then in the process of using Git commit–m This command to submit the file to the local library, the system prompts you to configure the user's name and e-mail address, in the form of git config–username "..." and git config–useremail [email protected] again enter the command prompt to submit the file to the local library successfully, and then through the GIT branch to build different branches, They can all be added to the main branch after being approved, and using git checkout newbranch can switch branches for operation. There are some knowledge related to Git-hub, a remote repository that differs from the local library. By using this git-hub you can download many different open source projects using the git clone command.
Fourth Chapter
This chapter focuses on how to download the source code for Android and Linux from Git, as well as the compilation and testing of them, roughly describes the directory structure of the Android source code and the Android source code that is downloaded using repo sync. The downloaded project name needs to precede the path with/platform, and if no Android source code can be generated by using repo init to generate a manifest.xml file, it contains a list of all the projects contained in the Android source code repository. Each of these lines represents a project. Path represents the project's path, and name represents the name of the project. You can also use Git clone to download the Android source code, but you also need the project name. The next step is to compile the Android source code, you need to use the envsetup.sh script to initialize the compilation command, MM needs to be in the specified path to compile, and MMM can be in any level directory by specifying the path name to compile, by using make– JN can use multiple CPUs at the same time to compile the source code of Android, improving the efficiency. Compile the Linux kernel source code using git clone and use git checkout to come to the Linux kernel. Then introduced the download good Linux kernel source code of the entire directory structure, through the installation of the Android kernel compiler environment to compile the Linux kernel source code, need to configure the makefile file, the arch is set to arm, will Cross_ The compile is set to Arm-none-linux-gnueabi. It can be configured by using make config, makes menuconfig, do oldconfig, create xconfig, and then build a zimage file by compiling the Linux kernel, which is directly installed on the board.
Create repo directory, set environment variables
Download Android source code
Should be the reason Google is wall can't download
Download the kernel image is also unable to connect to Google
Android Transplant Reading notes