WEB开发网
开发学院手机开发Android 开发 Android 启动过程详解 阅读

Android 启动过程详解

 2010-03-11 19:29:00 来源:WEB开发网   
核心提示: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 f
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 dis

patcher.

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

8. Starting Search Service

9. Starting Clipboard Service

10. Starting Checkin Service

11. Starting Wallpaper Service

12. Starting Audio Service

13. Starting HeadsetObserver

14. Starting AdbSettingsObserver

Finally SystemServer::init2 will call ActivityManagerService.systemReady to 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

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

Tags:Android 启动 过程

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