Move default HAL libraries to vendor
Libraries under /hardware/libhardware/modules should go to /vendor/.
These are conventionl HALs for default implementations, most of them
are not used.
Camera and thermal are already moved in other CLs.
Bug: 35907904
Test: Compiled and checked install path. Verified on Sailfish with
$ lsof | grep default.
Change-Id: Ibde574001c01cbfea014a20a0fbbb3265e6cdc8a
diff --git a/modules/README.android b/modules/README.android
index 57abb72..7ffc0f4 100644
--- a/modules/README.android
+++ b/modules/README.android
@@ -4,13 +4,13 @@
libhardware.so eventually should contain *just* the HAL hub
(hardware.c), everything in it should be rewritten as modules.
-Modules are .so in /system/libs/hw/ and have a well defined naming
+Modules are .so in /vendor/lib/hw/ and have a well defined naming
convention:
- /system/libs/hw/<*_HARDWARE_MODULE_ID>.<ro.product.board>.so
- /system/libs/hw/<*_HARDWARE_MODULE_ID>.<ro.board.platform>.so
- /system/libs/hw/<*_HARDWARE_MODULE_ID>.<ro.arch>.so
- /system/libs/hw/<*_HARDWARE_MODULE_ID>.default.so
+ /vendor/lib/hw/<*_HARDWARE_MODULE_ID>.<ro.product.board>.so
+ /vendor/lib/hw/<*_HARDWARE_MODULE_ID>.<ro.board.platform>.so
+ /vendor/lib/hw/<*_HARDWARE_MODULE_ID>.<ro.arch>.so
+ /vendor/lib/hw/<*_HARDWARE_MODULE_ID>.default.so
They also have a well defined interface which lives in include/hardware/.
diff --git a/modules/audio/Android.bp b/modules/audio/Android.bp
index 69e99f9..bd23b03 100644
--- a/modules/audio/Android.bp
+++ b/modules/audio/Android.bp
@@ -21,6 +21,7 @@
cc_library_shared {
name: "audio.primary.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
@@ -38,6 +39,7 @@
cc_library_shared {
name: "audio.stub.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["audio_hw.c"],
shared_libs: [
"liblog",
@@ -51,6 +53,7 @@
cc_library_shared {
name: "audio_policy.stub",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["audio_policy.c"],
shared_libs: [
"liblog",
diff --git a/modules/audio_remote_submix/Android.mk b/modules/audio_remote_submix/Android.mk
index d0c8ffc..c9e851f 100644
--- a/modules/audio_remote_submix/Android.mk
+++ b/modules/audio_remote_submix/Android.mk
@@ -18,6 +18,7 @@
LOCAL_MODULE := audio.r_submix.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := \
audio_hw.cpp
LOCAL_C_INCLUDES += \
diff --git a/modules/consumerir/Android.bp b/modules/consumerir/Android.bp
index bbce6b1..2bbdc04 100644
--- a/modules/consumerir/Android.bp
+++ b/modules/consumerir/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "consumerir.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["consumerir.c"],
shared_libs: [
"liblog",
diff --git a/modules/fingerprint/Android.bp b/modules/fingerprint/Android.bp
index a66f9f9..ba749e4 100644
--- a/modules/fingerprint/Android.bp
+++ b/modules/fingerprint/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "fingerprint.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["fingerprint.c"],
shared_libs: ["liblog"],
}
diff --git a/modules/gralloc/Android.mk b/modules/gralloc/Android.mk
index 092e851..cdd8d07 100644
--- a/modules/gralloc/Android.mk
+++ b/modules/gralloc/Android.mk
@@ -20,6 +20,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_SRC_FILES := \
diff --git a/modules/hwcomposer/Android.mk b/modules/hwcomposer/Android.mk
index 35c0fae..da0f6db 100644
--- a/modules/hwcomposer/Android.mk
+++ b/modules/hwcomposer/Android.mk
@@ -20,6 +20,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SHARED_LIBRARIES := liblog libEGL
LOCAL_SRC_FILES := hwcomposer.cpp
LOCAL_MODULE := hwcomposer.default
diff --git a/modules/input/evdev/Android.mk b/modules/input/evdev/Android.mk
index 9a5d092..be4db6b 100644
--- a/modules/input/evdev/Android.mk
+++ b/modules/input/evdev/Android.mk
@@ -45,6 +45,7 @@
LOCAL_MODULE := input.evdev.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := \
EvdevModule.cpp
diff --git a/modules/local_time/Android.bp b/modules/local_time/Android.bp
index df32325..643afa5 100644
--- a/modules/local_time/Android.bp
+++ b/modules/local_time/Android.bp
@@ -24,6 +24,7 @@
cc_library_shared {
name: "local_time.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["local_time_hw.c"],
shared_libs: [
"liblog",
diff --git a/modules/nfc-nci/Android.bp b/modules/nfc-nci/Android.bp
index fc73761..90d2a28 100644
--- a/modules/nfc-nci/Android.bp
+++ b/modules/nfc-nci/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "nfc_nci.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["nfc_nci_example.c"],
shared_libs: [
"liblog",
diff --git a/modules/nfc/Android.bp b/modules/nfc/Android.bp
index bd93bb5..5f174f4 100644
--- a/modules/nfc/Android.bp
+++ b/modules/nfc/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "nfc.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["nfc_pn544_example.c"],
shared_libs: [
"liblog",
diff --git a/modules/power/Android.bp b/modules/power/Android.bp
index 2b86c8b..f4c74ce 100644
--- a/modules/power/Android.bp
+++ b/modules/power/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "power.default",
relative_install_path: "hw",
+ proprietary: true,
srcs: ["power.c"],
shared_libs: ["liblog"],
}
diff --git a/modules/radio/Android.mk b/modules/radio/Android.mk
index 221424f..6f11169 100644
--- a/modules/radio/Android.mk
+++ b/modules/radio/Android.mk
@@ -21,6 +21,7 @@
LOCAL_MODULE := radio.fm.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := radio_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils libradio_metadata
LOCAL_MODULE_TAGS := optional
diff --git a/modules/sensors/Android.mk b/modules/sensors/Android.mk
index 534e6e9..ca277e6 100644
--- a/modules/sensors/Android.mk
+++ b/modules/sensors/Android.mk
@@ -23,6 +23,7 @@
LOCAL_MODULE := sensors.$(TARGET_DEVICE)
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_CFLAGS := -DLOG_TAG=\"MultiHal\"
diff --git a/modules/soundtrigger/Android.mk b/modules/soundtrigger/Android.mk
index bb58053..8250f9b 100644
--- a/modules/soundtrigger/Android.mk
+++ b/modules/soundtrigger/Android.mk
@@ -19,6 +19,7 @@
LOCAL_MODULE := sound_trigger.stub.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := sound_trigger_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
diff --git a/modules/tv_input/Android.bp b/modules/tv_input/Android.bp
index beac132..509198d 100644
--- a/modules/tv_input/Android.bp
+++ b/modules/tv_input/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "tv_input.default",
relative_install_path: "hw",
+ proprietary: true,
shared_libs: [
"libcutils",
"liblog",
diff --git a/modules/usbaudio/Android.mk b/modules/usbaudio/Android.mk
index 9df1e79..b36bf9f 100644
--- a/modules/usbaudio/Android.mk
+++ b/modules/usbaudio/Android.mk
@@ -18,6 +18,7 @@
LOCAL_MODULE := audio.usb.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := \
audio_hal.c
LOCAL_C_INCLUDES += \
diff --git a/modules/vehicle/Android.mk b/modules/vehicle/Android.mk
index a666bc6..9fd49da 100644
--- a/modules/vehicle/Android.mk
+++ b/modules/vehicle/Android.mk
@@ -19,6 +19,7 @@
LOCAL_MODULE := vehicle.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_C_INCLUDES := hardware/libhardware
LOCAL_SRC_FILES := vehicle.c timeUtil.cpp
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils
diff --git a/modules/vibrator/Android.bp b/modules/vibrator/Android.bp
index f9afd45..3c4aebf 100644
--- a/modules/vibrator/Android.bp
+++ b/modules/vibrator/Android.bp
@@ -18,6 +18,7 @@
// HAL module implementation stored in
// hw/<VIBRATOR_HARDWARE_MODULE_ID>.default.so
relative_install_path: "hw",
+ proprietary: true,
include_dirs: ["hardware/libhardware"],
srcs: ["vibrator.c"],
shared_libs: ["liblog"],
diff --git a/modules/vr/Android.mk b/modules/vr/Android.mk
index 43c8e92..e04c0da 100644
--- a/modules/vr/Android.mk
+++ b/modules/vr/Android.mk
@@ -18,6 +18,7 @@
LOCAL_MODULE := vr.default
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_SRC_FILES := vr.c
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MODULE_TAGS := optional
diff --git a/tests/vehicle/README b/tests/vehicle/README
index b8fc7d4..42d2210 100644
--- a/tests/vehicle/README
+++ b/tests/vehicle/README
@@ -49,13 +49,13 @@
$ mmm hardware/libhardware
This will generate the following binaries that we care about:
-i) out/target/product/XXX/system/lib/hw/vehicle.default.so
+i) out/target/product/XXX/vendor/lib/hw/vehicle.default.so
ii) out/target/product/XXX/data/nativetest/vehicle_tests
iii) out/target/product/XXX/system/bin/vehicle-hal-tool
The location for the first shared library would be:
-$ adb push out/target/product/XXX/system/lib/hw/vehicle.default.so
-/system/lib/hw
+$ adb push out/target/product/XXX/vendor/lib/hw/vehicle.default.so
+/vendor/lib/hw
You can also use 'adb sync' if you like, although this is the easiest least
hassle way of putting it in place.