Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

SurfaceFlinger is essential in Android graphics rendering. I ve researched and found some code about surfaceflinger. This is its main: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/main_surfaceflinger.cpp

I couldnt find anything related to starting surfaceflinger on init.rc: https://android.googlesource.com/platform/system/core/+/refs/tags/android-11.0.0_r28/rootdir/init.rc

I ve found here: https://proandroiddev.com/how-android-boot-up-9864376d911c that surfaceflinger is started by SystemServer. So I found SystemServer source code here: https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-11.0.0_r28/services/java/com/android/server/SystemServer.java but I saw no mention of SurfaceFlinger/surfaceflinger or Surface Flinger

There is a surfaceflinger.rc file in the Surface Flinger directory but I couldn t find any file that includes it: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/surfaceflinger.rc

Where is the surfaceflinger service started in Android?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.8k views
Welcome To Ask or Share your Answers For Others

1 Answer

There is a surfaceflinger.rc file in the Surface Flinger directory but I couldn t find any file that includes it: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/surfaceflinger.rc

It is here: https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-11.0.0_r28/services/surfaceflinger/Android.bp#253 init_rc:["surfaceflinger.rc"]:

cc_binary {
    name: "surfaceflinger",
    defaults: ["libsurfaceflinger_binary"],
    init_rc: ["surfaceflinger.rc"],
    srcs: [":surfaceflinger_binary_sources"],
    shared_libs: [
        "libsurfaceflinger",
        "libSurfaceFlingerProp",
    ],
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...