<Android development> Android kernel system development - system process that manages the running state of Activity and components----ActivityManagerServer(AMS)

<Android development> Android kernel system development - system process that manages the running state of Activity and components----ActivityManagerServer(AMS)

Preface
Activity Manager Service (AMS) is a system process provided by Android to manage the running state of Activity (and other components), and it is also the most frequently used system service when we write APK applications. The startup process of AMS on Android 10 has been modified. It should be noted that the source code used by the author here is the Qualcomm 8155 supporting baseline code LA.1.1. The Android version of this baseline is 10, so the process of AMS is on Android 10 and later versions. . For the old version of the AMS process, readers can refer to other materials to learn if necessary.
The detailed flow chart and electronic document of this article are at: Document link , which can be downloaded.

1 AMS function overview
Although developers often use some functions provided by Activity Manager Service (AMS), they may rarely have the opportunity to organize and analyze it uniformly. Therefore, we first give an overall overview of the functions of AMS, so as to lay the foundation for the subsequent analysis of its internal implementation.

1.1 AMS startup analysis
Like WMS (WindowManagerService), Activity Manager Service (AMS) is also parasitic in SystemServer. It creates a thread at system startup to process client requests in a loop. It should be noted that the Activity Manager Service (AMS) will register a variety of Binder Servers with ServiceManager, such as "activity", "meminfo", "cpuinfo", etc., but only the first "

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324493558&siteId=291194637