Android 启动过程汇总
2010-07-04 23:52:00 来源:WEB开发网核心提示:launch the first activity by senting Intent.CATEGORY_HOME intent.There is another way to start system server, which is through a program named system_server who
launch the first activity by senting Intent.CATEGORY_HOME intent.
There is another way to start system server, which is through a program named system_server whose source is device/servers/system/system_main.cpp. It also calls system_init to start system services. So there is a question: why does Android have two methods to start system services? My guess is that directly start system_server may have synchronous problem with zygote because system_server will call JNI to start SystemServer::init2, while at that time zygote may not start JAVA VM yet. So Android uses another method. After zynote is initialized, fork a new process to start system services.
更多精彩
赞助商链接