Brief analysis of framework initiation process

Source: Internet
Author: User

Simple summary of the framework to start the approximate process

Overall

Android Bottom is a Linux system, so at boot time is still running bully process Inti, read init.rc to create the first Dalvik process zygote, the following is a framework to start the overall diagram



1. Init process

Linux system Bully process, in our eyes the Flying Android system in Linux is just a Linux application, just start a user-level program init way to complete the boot process. Init is always the first process. Need to read the configuration file

Init.rc

Init.marvell.rc

Then go to create zygote (fertilized egg)

2, Zygote

The first Dalvik virtual machine program zygote (fertilized egg), and then all of the Dalvik virtual machine processes are hatched by it, and he created it mainly by doing 2 things

(1) Socket server: Accept the command to start a new Dalvik process

(2) Framework shared classes and shared resources: The zygote process starts with some shared classes and resources loaded so that the new Dalvik process does not need to be loaded again

Then start hatching the first Dalvik process Systemsever

When Zygote is started, it is summed up in 5 parts for ease of understanding



3, Systemsever

all Android service loop frameworks are built on [email protected] (Systemserver.java). The loop structure is not visible in Systemserver.java, but you can see that the INIT2 implementation functions are established, a lot of services are established, and AddService to service Manager. One of the most important services is Activitymanagersever (AMS), really Systemready () started after the call, mainly related to the management activity startup, summarized as follows

4. Start activity

When the AMS constructs an activity object into the Mmainstack queue, the first actviity to run is the activity

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Brief analysis of framework initiation process

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.