sdm710-common: Start using vendor_overlay

* This lets us override files in /vendor without
  relying on bind mounts ^.^

Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
This commit is contained in:
luk1337 2019-09-20 16:18:41 +02:00 committed by SamarV-121
parent d1373bf796
commit 78c5637be5
11 changed files with 96 additions and 78 deletions

View file

@ -48,6 +48,9 @@ BOARD_CHARGER_ENABLE_SUSPEND := true
# DRM
TARGET_ENABLE_MEDIADRM_64 := true
# Filesystem
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
# FM
BOARD_HAVE_QCOM_FM := true
BOARD_HAS_QCA_FM_SOC := "cherokee"

5
config.fs Normal file
View file

@ -0,0 +1,5 @@
[system/product/vendor_overlay/*/bin/*]
mode: 0755
user: AID_ROOT
group: AID_SHELL
caps: 0

View file

@ -1,31 +0,0 @@
// Copyright (C) 2018 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_binary {
relative_install_path: "hw",
defaults: ["hidl_defaults"],
name: "android.hardware.light@2.0-service.realme_sdm710",
init_rc: ["android.hardware.light@2.0-service.realme_sdm710.rc"],
srcs: ["service.cpp", "Light.cpp"],
shared_libs: [
"android.hardware.light@2.0",
"libbase",
"libhardware",
"libhidlbase",
"libhidltransport",
"libhwbinder",
"liblog",
"libutils",
],
}

42
light/Android.mk Normal file
View file

@ -0,0 +1,42 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.light@2.0-service.realme_sdm710
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/bin
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_STEM := android.hardware.light@2.0-service
LOCAL_SRC_FILES := \
service.cpp \
Light.cpp
LOCAL_REQUIRED_MODULES := \
android.hardware.light@2.0-service.realme_sdm710.rc
LOCAL_SHARED_LIBRARIES := \
libbase \
libhardware \
libhidlbase \
libhidltransport \
liblog \
libhwbinder \
libutils \
android.hardware.light@2.0
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.light@2.0-service.realme_sdm710.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/init
LOCAL_MODULE_STEM := android.hardware.light@2.0-service.rc
LOCAL_SRC_FILES := android.hardware.light@2.0-service.realme_sdm710.rc
include $(BUILD_PREBUILT)

View file

@ -15,7 +15,7 @@ on boot
chmod 660 /sys/class/leds/white/ramp_step_ms
chmod 660 /sys/class/leds/white/start_idx
service vendor.light-hal-2-0 /system/bin/hw/android.hardware.light@2.0-service.realme_sdm710
service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service
interface android.hardware.light@2.0::ILight default
class hal
user system

View file

@ -7,6 +7,8 @@ ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
endif
LOCAL_MODULE := power.qcom
LOCAL_MODULE_PATH_32 := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/lib
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/lib64
LOCAL_INIT_RC := android.hardware.power@1.0-service.rc
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_TAGS := optional

View file

@ -1,6 +1,6 @@
# Audio - from enchilada - PKQ1.180716.001
vendor/lib64/soundfx/libvolumelistener.so:lib64/soundfx/libvolumelistener.so|2dffcd0bde20f5f1830918146c9f40c02bbbae9f
vendor/lib/soundfx/libvolumelistener.so:lib/soundfx/libvolumelistener.so|117f8b7d834b4587dc8c8c5d15fada85b877ed26
vendor/lib64/soundfx/libvolumelistener.so:product/vendor_overlay/29/lib64/soundfx/libvolumelistener.so|2dffcd0bde20f5f1830918146c9f40c02bbbae9f
vendor/lib/soundfx/libvolumelistener.so:product/vendor_overlay/29/lib/soundfx/libvolumelistener.so|117f8b7d834b4587dc8c8c5d15fada85b877ed26
# Bluetooth (aptX) - from crosshatch-user 10 QP1A.190711.020 5800535 release-keys
product/lib64/libaptX_encoder.so|df1c89d7af1bb35808d5fe3496b04ba066c10cbc

View file

@ -1,13 +1,3 @@
on post-fs
mount none /system/etc/audio_policy_configuration.xml /vendor/etc/audio/audio_policy_configuration.xml bind
mount none /system/etc/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml bind
mount none /system/etc/WCNSS_qcom_cfg.ini /vendor/etc/wifi/WCNSS_qcom_cfg.ini bind
mount none /system/lib64/hw/power.qcom.so /vendor/lib64/hw/power.qcom.so bind
mount none /system/lib64/soundfx/libvolumelistener.so /vendor/lib64/soundfx/libvolumelistener.so bind
mount none /system/lib/soundfx/libvolumelistener.so /vendor/lib/soundfx/libvolumelistener.so bind
mount none /system/bin/hw/android.hardware.usb@1.0-service.realme_sdm710 /vendor/bin/hw/android.hardware.usb@1.0-service bind
mount none /system/etc/manifest.xml /vendor/etc/vintf/manifest.xml bind
on boot
# Touchscreen
chown system system /proc/touchpanel/oppo_tp_limit_enable

View file

@ -9,6 +9,9 @@ $(call inherit-product-if-exists, vendor/realme/sdm710-common/sdm710-common-vend
# Enable updating of APEXes
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# VNDK
PRODUCT_TARGET_VNDK_VERSION := 29
# Boot animation
TARGET_SCREEN_HEIGHT := 2244
TARGET_SCREEN_WIDTH := 1080
@ -28,7 +31,8 @@ PRODUCT_PACKAGES += \
audio.a2dp.default
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:system/etc/audio_policy_configuration.xml
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio/audio_policy_configuration.xml \
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio_policy_configuration.xml
# Camera
PRODUCT_PACKAGES += \
@ -69,7 +73,7 @@ PRODUCT_PACKAGES += \
android.hidl.base@1.0
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/manifest.xml:system/etc/manifest.xml
$(LOCAL_PATH)/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/vintf/manifest.xml
# IMS
PRODUCT_PACKAGES += \
@ -128,7 +132,7 @@ PRODUCT_PACKAGES += \
# WiFi
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/wifi/WCNSS_qcom_cfg.ini:system/etc/WCNSS_qcom_cfg.ini
$(LOCAL_PATH)/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/wifi/WCNSS_qcom_cfg.ini
# WiFi Display
PRODUCT_PACKAGES += \

View file

@ -1,31 +0,0 @@
//
// Copyright (C) 2017-2018 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_binary {
name: "android.hardware.usb@1.0-service.realme_sdm710",
relative_install_path: "hw",
init_rc: ["android.hardware.usb@1.0-service.realme_sdm710.rc"],
srcs: ["service.cpp", "Usb.cpp"],
shared_libs: [
"libbase",
"libcutils",
"libhidlbase",
"libhidltransport",
"libhwbinder",
"libutils",
"libhardware",
"android.hardware.usb@1.0",
],
}

34
usb/Android.mk Normal file
View file

@ -0,0 +1,34 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.usb@1.0-service.realme_sdm710
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/bin
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_STEM := android.hardware.usb@1.0-service
LOCAL_REQUIRED_MODULES := android.hardware.usb@1.0-service.realme_sdm710.rc
LOCAL_SRC_FILES := service.cpp Usb.cpp
LOCAL_SHARED_LIBRARIES := \
libbase \
libcutils \
libhidlbase \
libhidltransport \
libhwbinder \
libutils \
libhardware \
android.hardware.usb@1.0
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.usb@1.0-service.realme_sdm710.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/init
LOCAL_MODULE_STEM := android.hardware.usb@1.0-service.rc
LOCAL_SRC_FILES := android.hardware.usb@1.0-service.realme_sdm710.rc
include $(BUILD_PREBUILT)