1. 程式人生 > >Android系統服務啟動順序

Android系統服務啟動順序

系統服務啟動分為三類
1. startBootstrapServices()
2. startCoreServices()
3. startOtherServices()

startBootstrapServices
1. 啟動Installer服務
2. 啟動ActivityManagerService,Installer服務賦值給AMS
3. 啟動PowerManagerService,AMS initPowerManagement
4. 啟動LightsService
5. SystemService.PHASE_WAIT_FOR_DEFAULT_DISPLAY
6. 啟動PackageManagerService
7. 啟動SensorService

startCoreServices
1. 啟動BatteryService
2. 啟動UsageStatsService
3. AMS setUsageStatsManager

startOtherServices
1. 啟動SchedulingPolicyService
2. 啟動TelecomLoaderService
3. 啟動TelephonyRegistry
4. 啟動CameraService
5. 啟動AccountManagerService
6. 啟動ContentService
7. AMS安裝系統Provider
8. 啟動VibratorService
9. 啟動ConsumerIrService
10. 啟動AlarmManagerService
11. 初始化WatchDog與AMS相關
12. 啟動WindowManagerService
13. 啟動InputManagerService
14. 把WMS賦值給AMS
15. 啟動AccessibilityManagerService
16. 啟動LockSettingsService
17. 啟動DeviceIdleController
18. 啟動StatusBarManagerService
19. 啟動ClipboardService
20. 啟動ConnectivityService
21. 啟動NotificationManagerService
22. 啟動JobSchedulerService
23. 啟動LauncherAppsService

最後啟動SystemUi