hwservicemanager and the allocator are moved to system_ext
We want to remove these by default from Android U+ devices and still
allow some devices to add them back. So they are moved to system_ext.
Test: m && launch_cvd # check for hwservicemanager running
Bug: 218588089
Change-Id: Ia6f7b41a7b37057518a28aea1ec43e3f87e7fa30
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index 637e74b..a5ad23e 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -210,7 +210,8 @@
fqName == IServiceManager1_2::descriptor;
}
static bool isHwServiceManagerInstalled() {
- return access("/system/bin/hwservicemanager", F_OK) == 0;
+ return access("/system_ext/bin/hwservicemanager", F_OK) == 0 ||
+ access("/system/system_ext/bin/hwservicemanager", F_OK) == 0;
}
/*
diff --git a/transport/allocator/1.0/default/Android.bp b/transport/allocator/1.0/default/Android.bp
index 42abe9c..d739cd8 100644
--- a/transport/allocator/1.0/default/Android.bp
+++ b/transport/allocator/1.0/default/Android.bp
@@ -31,6 +31,7 @@
],
init_rc: ["android.hidl.allocator@1.0-service.rc"],
vintf_fragments: ["android.hidl.allocator@1.0-service.xml"],
+ system_ext_specific: true,
shared_libs: [
"android.hidl.allocator@1.0",
diff --git a/transport/allocator/1.0/default/android.hidl.allocator@1.0-service.rc b/transport/allocator/1.0/default/android.hidl.allocator@1.0-service.rc
index 4f05523..c648aff 100644
--- a/transport/allocator/1.0/default/android.hidl.allocator@1.0-service.rc
+++ b/transport/allocator/1.0/default/android.hidl.allocator@1.0-service.rc
@@ -1,4 +1,4 @@
-service hidl_memory /system/bin/hw/android.hidl.allocator@1.0-service
+service hidl_memory /system/system_ext/bin/hw/android.hidl.allocator@1.0-service
class hal
user system
group system