RM6785: Move symlink generation to soong
- also drop unwanted symlinks
Change-Id: I66d957386f0fe33c23a762c474f01ca4ebe4f191
diff --git a/Android.bp b/Android.bp
index 329f40f..2f18423 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5,3 +5,31 @@
"vendor/realme/RM6785-common",
],
}
+
+install_symlink {
+ name: "kmsetkey_symlink",
+ installed_location: "lib64/hw/kmsetkey.default.so",
+ symlink_target: "kmsetkey.trustonic.so",
+ vendor: true,
+}
+
+install_symlink {
+ name: "libGLES_mali_symlink",
+ installed_location: "lib64/hw/vulkan.mt6785.so",
+ symlink_target: "../egl/libGLES_mali.so",
+ vendor: true,
+}
+
+install_symlink {
+ name: "libMcGatekeeper_symlink",
+ installed_location: "lib64/hw/gatekeeper.mt6785.so",
+ symlink_target: "../libMcGatekeeper",
+ vendor: true,
+}
+
+install_symlink {
+ name: "libSoftGatekeeper_symlink",
+ installed_location: "lib64/hw/gatekeeper.default.so",
+ symlink_target: "../libSoftGatekeeper",
+ vendor: true,
+}
diff --git a/Android.mk b/Android.mk
index 1f4af8c..af53642 100644
--- a/Android.mk
+++ b/Android.mk
@@ -11,24 +11,6 @@
$(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
include $(CLEAR_VARS)
-VENDOR_SYMLINKS := \
- $(TARGET_OUT_VENDOR)/lib/hw \
- $(TARGET_OUT_VENDOR)/lib64/hw
-
-$(VENDOR_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
- $(hide) echo "Making vendor symlinks"
- @mkdir -p $(TARGET_OUT_VENDOR)/lib/hw
- @mkdir -p $(TARGET_OUT_VENDOR)/lib64/hw
- @ln -sf libSoftGatekeeper.so $(TARGET_OUT_VENDOR)/lib64/hw/gatekeeper.default.so
- @ln -sf libMcGatekeeper.so $(TARGET_OUT_VENDOR)/lib64/hw/gatekeeper.mt6785.so
- @ln -sf libMcGatekeeper.so $(TARGET_OUT_VENDOR)/lib64/hw/gatekeeper.oppo6785.so
- @ln -sf kmsetkey.trustonic.so $(TARGET_OUT_VENDOR)/lib64/hw/kmsetkey.default.so
- @ln -sf /vendor/lib/egl/libGLES_mali.so $(TARGET_OUT_VENDOR)/lib/hw/vulkan.mt6785.so
- @ln -sf /vendor/lib64/egl/libGLES_mali.so $(TARGET_OUT_VENDOR)/lib64/hw/vulkan.mt6785.so
- $(hide) touch $@
-
-ALL_DEFAULT_INSTALLED_MODULES += $(VENDOR_SYMLINKS)
-
include external/wpa_supplicant_8/hostapd/Android.mk
endif
diff --git a/RM6785.mk b/RM6785.mk
index 6c632d0..cd31c3b 100644
--- a/RM6785.mk
+++ b/RM6785.mk
@@ -304,6 +304,13 @@
PRODUCT_PACKAGES += \
android.hardware.soundtrigger@2.3-impl:32
+# Symlinks
+PRODUCT_PACKAGES += \
+ kmsetkey_symlink \
+ libGLES_mali_symlink \
+ libMcGatekeeper_symlink \
+ libSoftGatekeeper_symlink
+
# Telephony
PRODUCT_BOOT_JARS += \
mediatek-common \