WEB开发网
开发学院手机开发Android 开发 Android 启动过程总结 阅读

Android 启动过程总结

 2010-06-01 18:42:00 来源:WEB开发网   
核心提示:e) Call Zygote::forkSystemServer (implemented in device/dalvik/vm/InternalNative.c) to fork a new process. In the new process, call the main function in the JAV

e) Call Zygote::forkSystemServer (implemented in device/dalvik/vm/InternalNative.c) to fork a new process. In the new process, call the main function in the JAVA class named com.android.server.SystemServer, whose source is in device/java/services/com/android/server.

i. Load libandroid_servers.so

ii. Call JNI native init1 function implemented in device/libs/android_servers/com_android_server_SystemServers. It only calls system_init implemented in device/servers/system/library/system_init.cpp.

l If running on simulator, instantiate AudioFlinger, MediaPlayerService and CameraService here.

l 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.

l If not running on simulator, call IPCThreadState::self()- >joinThreadPool() to enter into service dispatcher.

SystemServer::init2 will start a new thread to start all JAVA services as follows:

Core Services:

1. Starting Power Manager

2. Creating Activity Manager

3. Starting Telephony Registry

4. Starting Package Manager

5. Set Activity Manager Service as System Process

6. Starting Context Manager

7. Starting System Context Providers

8. Starting Battery Service

9. Starting Alarm Manager

10. Starting Sensor Service

11. Starting Window Manager

12. Starting Bluetooth Service

13. Starting Mount Service

Other services

1. Starting Status Bar Service

2. Starting Hardware Service

3. Starting NetStat Service

4. Starting Connectivity Service

5. Starting Notification Manager

6. Starting DeviceStorageMonitor Service

7. Starting Location Manager

上一页  3 4 5 6 7 8 9  下一页

Tags:Android 启动 过程

编辑录入:coldstar [复制链接] [打 印]
赞助商链接