From f9cfbd5e0775c69ab433b4a44c5da92fc3676ac1 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Tue, 10 Oct 2023 13:40:22 +0900 Subject: [PATCH] Cleanup: move VINTF fragment into VAPEX Bug: 296524155 Test: m && launch_cvd # usb hal service is running Change-Id: I5aebf03e1f651b8cd2753627ad55022be9eba8d6 --- usb/aidl/default/Android.bp | 6 ++++-- usb/{ => aidl/default}/apex/Android.bp | 2 +- usb/aidl/default/apex/file_contexts | 3 +++ usb/{ => aidl/default}/apex/manifest.json | 0 usb/apex/file_contexts | 5 ----- 5 files changed, 8 insertions(+), 8 deletions(-) rename usb/{ => aidl/default}/apex/Android.bp (95%) create mode 100644 usb/aidl/default/apex/file_contexts rename usb/{ => aidl/default}/apex/manifest.json (100%) delete mode 100644 usb/apex/file_contexts diff --git a/usb/aidl/default/Android.bp b/usb/aidl/default/Android.bp index 472e732d45..2c6ed07d48 100644 --- a/usb/aidl/default/Android.bp +++ b/usb/aidl/default/Android.bp @@ -43,9 +43,11 @@ cc_binary { ], } -filegroup { +prebuilt_etc { name: "android.hardware.usb-service.example.xml", - srcs: ["android.hardware.usb-service.example.xml"], + src: "android.hardware.usb-service.example.xml", + sub_dir: "vintf", + installable: false, } filegroup { diff --git a/usb/apex/Android.bp b/usb/aidl/default/apex/Android.bp similarity index 95% rename from usb/apex/Android.bp rename to usb/aidl/default/apex/Android.bp index 789a3fcdbb..29278dd761 100644 --- a/usb/apex/Android.bp +++ b/usb/aidl/default/apex/Android.bp @@ -30,8 +30,8 @@ apex { "com.android.hardware.usb.rc", // init .rc "android.hardware.usb.accessory.prebuilt.xml", "android.hardware.usb.host.prebuilt.xml", + "android.hardware.usb-service.example.xml", ], - vintf_fragments: [":android.hardware.usb-service.example.xml"], } // Replace the binary path from /vendor/bin to /apex/{name}/bin in the init .rc file diff --git a/usb/aidl/default/apex/file_contexts b/usb/aidl/default/apex/file_contexts new file mode 100644 index 0000000000..53404f760a --- /dev/null +++ b/usb/aidl/default/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\.usb-service\.example u:object_r:hal_usb_default_exec:s0 \ No newline at end of file diff --git a/usb/apex/manifest.json b/usb/aidl/default/apex/manifest.json similarity index 100% rename from usb/apex/manifest.json rename to usb/aidl/default/apex/manifest.json diff --git a/usb/apex/file_contexts b/usb/apex/file_contexts deleted file mode 100644 index f223a56d63..0000000000 --- a/usb/apex/file_contexts +++ /dev/null @@ -1,5 +0,0 @@ -(/.*)? u:object_r:vendor_file:s0 -# Permission XMLs -/etc/permissions(/.*)? u:object_r:vendor_configs_file:s0 -# binary -/bin/hw/android\.hardware\.usb-service\.example u:object_r:hal_usb_default_exec:s0 \ No newline at end of file