Android init process

来源:互联网 发布:淘宝 张雅洁 编辑:程序博客网 时间:2024/06/01 22:45

init.c

start services according init.rc.

console/adbd/servicemanager/zygote/media.....

 

ZygoteInit.java    

---- startSystemServer -----Zygote.forkSystemServer [vm/InternalNative.c]

com_android_internal_os_ZygoteInit.cpp

 

SystemServer.java

init1  -------init2

Call init2 function in JAVA class named com.android.server.SystemServer, whose source is in device/java/services/com/android/server. This function is very critical for Android because it start all of Android JAVA services .

Finally SystemServer::init2 will call ActivityManagerService.systemReady to launch the first activity by senting Intent.CATEGORY_HOME intent

 

ref: Android init process

 

-------------------------------------------------

services:

main_mediaserver.cpp 

(meidaserver is behand zygote, for mediaserver will start most of the media componet with java)

use defaultServiceManager to see the who is ues sm  ---  all about media.