Add log to find issue with missing hwservicemanager easier
Without a log, the fail case for an upgrading device that still requires
HIDL services can be very hard to determine. This warning log will help
determine when this is the case.
Test: launch_cvd without hwservicemanager
Bug: 275622588
Change-Id: I4237939e362962d2a426a2dfa7645dd585ebdc82
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index a5ad23e..78c1e96 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -324,6 +324,11 @@
if (!isHwServiceManagerInstalled()) {
// hwservicemanager is not available on this device.
+ LOG(WARNING)
+ << "hwservicemanager is not installed on the device. If HIDL support "
+ << "is still needed, hwservicemanager and android.hidl.allocator@1.0-service "
+ << "need to be added to the device's PRODUCT_PACKAGES and the kernel config "
+ << "needs to have 'hwbinder' in CONFIG_ANDROID_BINDER_DEVICES.";
gDefaultServiceManager = sp<NoHwServiceManager>::make();
return gDefaultServiceManager;
}