aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJooyung Han <jooyung@google.com>2023-11-10 13:25:53 +0900
committerJooyung Han <jooyung@google.com>2023-11-16 11:52:39 +0900
commitc883fd0d6e67b86c62eaf936912f2b1737ef2cc9 (patch)
treec01a5f394dfbe33f77d88b71e01bf378cfcef672
parentab75d8d4c01f80b7871d5517f6c60b4905b86e43 (diff)
downloadgoldfish-opengl-c883fd0d6e67b86c62eaf936912f2b1737ef2cc9.tar.gz
Add com.android.hardware.graphics.composer.ranchu
with android.hardware.graphics.composer3-service.ranchu so that the APEX can be installed instead of the HAL binary. Bug: 205619241 Test: launch CF; see hwcomposer3 is running from apex Change-Id: I5cbff0b4c19dcfe50e25105d5b95502c1810d331
-rw-r--r--system/hwc3/Android.bp40
-rw-r--r--system/hwc3/apex_file_contexts3
-rw-r--r--system/hwc3/apex_manifest.json4
3 files changed, 47 insertions, 0 deletions
diff --git a/system/hwc3/Android.bp b/system/hwc3/Android.bp
index 9243706e..71c8d220 100644
--- a/system/hwc3/Android.bp
+++ b/system/hwc3/Android.bp
@@ -90,4 +90,44 @@ cc_binary {
vintf_fragments: ["hwc3.xml"],
init_rc: ["hwc3.rc"],
+
+}
+
+apex {
+ name: "com.android.hardware.graphics.composer.ranchu",
+ key: "com.android.hardware.key",
+ certificate: ":com.android.hardware.certificate",
+ file_contexts: "apex_file_contexts",
+ manifest: "apex_manifest.json",
+ vendor: true,
+ updatable: false,
+
+ binaries: [
+ "android.hardware.graphics.composer3-service.ranchu",
+ ],
+ prebuilts: [
+ "hwc3.xml",
+ "hwc3-apex.rc",
+ ],
}
+
+prebuilt_etc {
+ name: "hwc3.xml",
+ src: "hwc3.xml",
+ sub_dir: "vintf",
+ installable: false,
+}
+
+prebuilt_etc {
+ name: "hwc3-apex.rc",
+ src: ":gen-hwc3-apex.rc",
+ installable: false,
+}
+
+genrule {
+ name: "gen-hwc3-apex.rc",
+ srcs: ["hwc3.rc"],
+ out: ["hwc3-apex.rc"],
+ cmd: "sed -e 's@/vendor/bin/@/apex/com.android.hardware.graphics.composer.ranchu/bin/@' $(in) > $(out)",
+}
+
diff --git a/system/hwc3/apex_file_contexts b/system/hwc3/apex_file_contexts
new file mode 100644
index 00000000..1af970fc
--- /dev/null
+++ b/system/hwc3/apex_file_contexts
@@ -0,0 +1,3 @@
+(/.*)? u:object_r:vendor_file:s0
+/etc(/.*)? u:object_r:vendor_configs_file:s0
+/bin/hw/android\.hardware\.graphics\.composer3-service\.ranchu u:object_r:hal_graphics_composer_default_exec:s0
diff --git a/system/hwc3/apex_manifest.json b/system/hwc3/apex_manifest.json
new file mode 100644
index 00000000..0f8df7f8
--- /dev/null
+++ b/system/hwc3/apex_manifest.json
@@ -0,0 +1,4 @@
+{
+ "name": "com.android.hardware.graphics.composer.ranchu",
+ "version": 1
+} \ No newline at end of file