Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the Android system service like?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

It is believed that many inexperienced people have no idea about what the Android system service is like. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

System_Server process

There are many services running in the system server process, which is the basis of the whole android framework.

Native service

SurfaceFlinger

This is a framebuffer composite service that synthesizes logical window image data (surface) from various applications and applications into a physical window display (framebuffer) service.

Java Service:

Most of the services in this part have a manager class for the application process, which is a RPC call. By calling the method of xxxManager, the user is actually migrated to the corresponding method in the xxxManagerService in the system_server process by Binder, and the result is brought back through binder.

1. EntropyService

Entropy service, loading and saving random information periodically. The main reason is that the status of / dev/random may be predictable after linux is powered on, so some applications that need random information may have problems. There is no need to provide an application program interface.

2. PowerManagerService-> PowerManager

The power management of Android is also a very important part. For example, turn off unused devices when standby, turn off the backlight of screen and keyboard when standby, how many devices should be turned on when users operate, and so on.

3. ActivityManagerService- > ActivityManager

This is the core service in the whole Android framework framework, which manages the core implementation of tasks, process management, Intent parsing and so on. Although Manager Service is called Activity, it governs not only Activity, but also the other three major components and the processes in which they are located. In other words, he is responsible for the life management of user applications.

4. TelephonyRegistry- > TelephonyManager

Phone registration, management service module, you can obtain the phone link status, signal strength and so on.

5. PackageManagerService-> PackageManager

Including the unpacking, verification, installation and upgrade of the software package, etc., for the problem that we can not install the .so file, we should start with this section to analyze the reason.

6. AccountManagerService-> AccountManager

A system service that provides account, password, and authtoken management for all accounts on the device .

7. ContentService-> ContentResolver

Content services, mainly databases and other services that provide solutions.

8. BatteryService

A service that monitors battery charging and status, and broadcasts Intent when the status changes

9. HardwareService

Usually the service program of ring and vibrate

10. SensorService-> SensorManager

Manage services for Sensor devices, responsible for registering client devices and activating Sensor when client needs to use sensor

11. WindowManagerService-> WindowManager-> PhoneWindowManager

And ActivityManagerService highly cohesive window management, where the core is the distribution and management of input events.

12. AlarmManagerService-> AlarmManager

Alarm clock service program

13. BluetoothService-> BluetoothDevice

Background Management and Service Program of Bluetooth

14. StatusBarService-> StatusBarManager

Responsible for the update of icons on statusBar, animation and so on, the service is not large.

15. ClipboardService-> ClipboardManager

Similar to clipBoard services in other systems, it provides copy and paste advantages and disadvantages.

16. InputMethodManagerService-> InputMethodManager

The management service program of the input method, including when to enable the input method, switching input method and so on.

17. NetStatService

Mobile network service

18. ConnectivityService-> ConnectivityManager

Network connection status service, which can be queried by other applications, and can also be broadcast when the network state changes.

19. AccessibilityManagerService- > AccessibilityManager

This piece may want to take a closer look, mainly some View to get clicks, focus, text change and other events of the distribution management, the entire system debugging, problem positioning, etc., also need the most careful review of this service.

20. NotificationManagerService-> NotificationManager

Responsible for managing and notifying the occurrence of background events, etc., which is glued to statusbar and usually adds a response icon on statusbar. Users can use this to know what is going on in the background of the system.

21. MountService

Disk loading service program, which generally works with a linux daemon program such as vold/mountd, is mainly responsible for listening and broadcasting events such as mount/unmount/bad removal of device.

22. DeviceStorageMonitorService

A service that monitors disk space and warns users when disk space is less than 10%.

23. LocationManagerService-> LocationManager

To join the GPS service, you need to take a closer look at this part. Now the navigation in the application is not responding, so you can take a look at it here.

24. SearchManagerService-> SearchManager

The search manager service handles the search UI, and maintains a registry of searchable activities.

25. CheckinService (FallbackCheckinService)

It seems that checkin service is a package provided by google. There is no source code, but only fallbackCheckinService source code.

26. WallpaperManagerService-> WallpaperManager

Management of desktop background services, deeply customized desktop systems, need to understand and expand this part

27. AudioService-> AudioManager

The upper management package of AudioFlinger, mainly the management of volume, sound effect, sound channel and ringtone, etc.

28. HeadsetObserver

Monitoring cycle of headphone plugging and unplugging events

29. DockObserver

If the system has a seat, when the phone is installed or unplugged, it will be managed by him.

30. BackupManagerService-> BackupManager

Backup service

31. AppWidgetService-> AppWidgetManager

Android allows user-written programs to be placed on the desktop in the form of widget, which is the interface of this set of management and services.

32. StatusBarPolicy

Policy that manages which icon should be displayed on the status bar.

MediaServer service process

MediaServer services are basically native's services,mediaServer process also started in init.rc, it is not a daemon process, which is easy to get confused. It is also a system service process similar to the systemserver process, where the real service code that provides RPC calls to the application process runs. Its services are all related to media recording and playback, and there are three main services:

AudioFlinger

Sound recording and playback services, including audio mixing, etc.

MediaPlayerService

To provide media playback service, opencore is the core module of this block, and the interface to the Java side is located in mediaplayer.java

CameraService

Provide services with camera recording, preview and other functions

AudioPolicyService

The main functions are to check the connection status of the input and output devices and the switching of the audio strategy of the system.

After reading the above, have you mastered the method of Android system service? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report