Android Source Anatomy of the framework layer base version

Source: Internet
Author: User



This article is from http://blog.csdn.net/liuxian13183/ , the citation must be noted!


about the framework, is the application layer under the control layer, from the application layer recently, always want to find a chance to write Windowmangerservice and Activitymanagerservice (note non-control, It refers to a kind of service) and some other things that make a more comprehensive understanding of the underlying. Long ago, I wrote an article outlining the Android system-" Android Advanced System Introduction ", Also today we will review the system in terms of the framework layer, which is a basic introduction to this section.


We will explain each article further (note that most of them involve relationships, and few are related, please treat them differently). Since the Android system is Linux based, the Linux Foundation is the first, and the file system usually has 3 features:

1, composed of files and directories, occupy a certain amount of storage space

2, with Read, write, execute permission, can copy and move

3, multiple file systems can be tied, and the type can be different, such as FAT16 and NTFS

The main file directories are in the following categories-analogy with Android systems:

1, bin, storage user-level binary tools-equivalent to the Android system acct Directory

2, boot, kernel image file, loaded by bootloader-firmware

3, Dev, various file systems such as printers, etc.- equivalent to the Android system's dev directory +storage+mnt/sdcard

4. etc, config file area-equivalent to the Config directory of the android system

5, home, user working directory-data/user

6, LIB, System runtime library storage location-data/app-lib

7, OPT, storage System program-data/app-private

8, Proc, system level such as kernel and process files-proc directory

9, root, Administrator working directory-root directory

10, Sbin, Administrator's binary tools-sbin directory

11, sys, drive the corresponding system files such as firmware, kernel, power, etc.-sys directory +system directory

12. USR, application installation area-data/app

13, Var, debugging information, such as-data/anr

So from the above to see, in fact, the operating system is composed of files, plus some hardware induction equipment. But the above description is still not comprehensive, because Android is a layer of layers, the resources are the overall consistent, largely decentralized structure. At the same time, the above will involve the process PID, the value of 100 is the system process, 1000 is the root process, more than 1000 is the user process. After we finish the catalogue, we'll talk about the order:

1, man, query the meaning of an order

2, LS, lists all the file and folder information in the current directory

3. Find, search for file information by name

4. grep, querying the string information in the file

5. Cat, open File

6, chmod, specify the permissions, Ugo refers to the user (itself), group (groups), Other (others), permissions have R (read 1) w (write 2) x (execution 4), there are two ways to specify permissions, such as Chmod ug+x (give the current user and a group to execute the rights), chmod 777 (Give all three permissions for the reason, see one line)

7, PS and Kill,ps list all current processes, kill kills a process

8, export, used to set variables acting on the global

9. Mount and unmount, loading and unloading file systems

Fortunately, after working with the Linux operating system for a period of time, to later do Android development, played a great help, described above are some common commands, interested can install a Linux system to use, before a colleague using Ubuntu to compile so, And I used to be little Red Riding Hood rethat.

The following is a simple Linux boot process, in fact, Dalvik virtual machine is similar




Android Source Anatomy of the framework layer base version

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.