Android Start-up process

Source: Internet
Author: User

Android Start-up process

1. System Boot Bootloader
1) Source: bootable/bootloader/*
2) Description: After power-up, the CPU will execute the bootloader program first, there are three kinds of options
A) power-on press camera+power boot to FastBoot, that is, command or SD card Burn-write mode, do not load the kernel and file system, here can be burned in the Factory mode
b) Boot press Home+power to boot to recovery mode, load recovery.img,recovery.img contains kernel, basic file system, burn write for engineering mode
c) Boot press power, normal boot system, load boot.img,boot.img contains kernel, basic file system, used for normal start of the phone (the following only analysis of normal startup situation) 2. Kernel kernel
1) Source: kernel/*
2) Description: Kernel loaded by bootloader 3. File system and Application init
1) Source: system/core/init/*
2) configuration file: System/rootdir/init.rc,
3) Description: Init is a kernel-initiated user-level process that executes according to the settings in Init.rc: Start the service (the service here refers to the Linux underlying service, such as ADBD provides ADB support, Vold provides SD card mount, etc.), executes the command and executes the corresponding function according to the configuration statement 4. Important Background Program Zygote
1) Source: frameworks/base/cmds/app_main.cpp, etc.
2) Description: Zygote is a service that is specified to start in init.rc, the command that corresponds to the service is/system/bin/app_process
A) Create a Java Runtime, set up a virtual machine
b) Set up a socket receive Activitymanangerservice request for Fork application C) to start the system Server
5. Systems Services System Server
1) Source: Frameworks/base/services/java/com/android/server/systemserver.java
2) Description: Was zygote initiated by the System Manager to manage the Android service (here the service refers to the services under Frameworks/base/services, such as satellite location services, clipboard services, etc.) 6. Desktop Launcher
1) Source: Activitymanagerservice.java for the entrance, packages/apps/launcher* realization
2) Description: After the system started successfully systemserver use Xxx.systemready () to notify each service, the system is ready, desktop program home is in the Activitymanagerservice.systemready () Notification is established during the process, and the final call () is launcher 7. Unlock
1) Source code:
frameworks/policies/base/phone/com/android/internal/policy/impl/*lock*
2) Description: After the system starts successfully systemserver calls Wm.systemready () notification Windowmanagerservice, and then calls Phonewindowmanager, Finally through the Lockpatternkeyguardview display unlock interface, the tracking code can see the unlocking interface is not an activity, it is just to a specific layer of drawing, its code is stored in a special location 8. Third-party applications that are powered on from the start

Android Start-up 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.