diff --git a/config.fs b/config.fs deleted file mode 100644 index f966a77..0000000 --- a/config.fs +++ /dev/null @@ -1,5 +0,0 @@ -[system/product/vendor_overlay/*/bin/*] -mode: 0755 -user: AID_ROOT -group: AID_SHELL -caps: 0 diff --git a/device.mk b/device.mk index d6c7578..6655da0 100644 --- a/device.mk +++ b/device.mk @@ -9,10 +9,6 @@ $(call inherit-product-if-exists, vendor/lenovo/kunlun2/kunlun2-vendor.mk) # Enable updating of APEXes $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) -# VNDK -PRODUCT_TARGET_VNDK_VERSION := 29 -PRODUCT_EXTRA_VNDK_VERSIONS := 29 - # Boot animation TARGET_SCREEN_HEIGHT := 2244 TARGET_SCREEN_WIDTH := 1080 @@ -49,7 +45,7 @@ PRODUCT_COPY_FILES += \ # Common init scripts PRODUCT_PACKAGES += \ - init.qcom.rc \ + init.custom.rc \ init.power.rc # Display @@ -75,9 +71,6 @@ PRODUCT_PACKAGES += \ android.hidl.base@1.0 \ libhidltransport -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/vendor_override_manifest.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/vendor_override_manifest.xml - # IMS PRODUCT_PACKAGES += \ ims-ext-common \ diff --git a/libhidl/Android.bp b/libhidl/Android.bp new file mode 100644 index 0000000..fd0b4a7 --- /dev/null +++ b/libhidl/Android.bp @@ -0,0 +1,5 @@ +cc_library { + name: "android.hidl.base@1.0", + shared_libs: ["libhidlbase"], + vendor_available: true, +} diff --git a/libhidl/Android.mk b/libhidl/Android.mk deleted file mode 100644 index 87c4f7d..0000000 --- a/libhidl/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2017 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. - -include $(CLEAR_VARS) -LOCAL_MODULE := android.hidl.base@1.0 -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -include $(BUILD_SHARED_LIBRARY) diff --git a/libplatformconfig/Android.mk b/libplatformconfig/Android.mk deleted file mode 100644 index 03c6b79..0000000 --- a/libplatformconfig/Android.mk +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (C) 2020 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. -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := libplatformconfig -LOCAL_MODULE_TAGS := optional -LOCAL_VENDOR_MODULE := true -include $(BUILD_SHARED_LIBRARY) diff --git a/light/Android.bp b/light/Android.bp new file mode 100644 index 0000000..5e1f72e --- /dev/null +++ b/light/Android.bp @@ -0,0 +1,16 @@ +cc_binary { + relative_install_path: "hw", + defaults: ["hidl_defaults"], + name: "android.hardware.light@2.0-service.lenovo_kunlun2", + init_rc: ["android.hardware.light@2.0-service.lenovo_kunlun2.rc"], + srcs: ["service.cpp", "Light.cpp"], + vendor: true, + shared_libs: [ + "libbase", + "libhardware", + "libhidlbase", + "liblog", + "libutils", + "android.hardware.light@2.0", + ], +} diff --git a/light/Android.mk b/light/Android.mk deleted file mode 100644 index 3b68b1b..0000000 --- a/light/Android.mk +++ /dev/null @@ -1,42 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := android.hardware.light@2.0-service.lenovo_kunlun2 -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.lenovo_kunlun2.rc - -LOCAL_SHARED_LIBRARIES := \ - libhardware \ - libhidlbase \ - liblog \ - android.hardware.light@2.0 - -LOCAL_STATIC_LIBRARIES := \ - libbase \ - libutils - -include $(BUILD_EXECUTABLE) - -include $(CLEAR_VARS) - -LOCAL_MODULE := android.hardware.light@2.0-service.lenovo_kunlun2.rc -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC - -LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init -LOCAL_MODULE_STEM := android.hardware.light@2.0-service.rc - -LOCAL_SRC_FILES := android.hardware.light@2.0-service.lenovo_kunlun2.rc - -include $(BUILD_PREBUILT) diff --git a/light/android.hardware.light@2.0-service.lenovo_kunlun2.rc b/light/android.hardware.light@2.0-service.lenovo_kunlun2.rc index 6c0ee0a..44c20bb 100644 --- a/light/android.hardware.light@2.0-service.lenovo_kunlun2.rc +++ b/light/android.hardware.light@2.0-service.lenovo_kunlun2.rc @@ -54,7 +54,7 @@ on boot chmod 660 /sys/class/leds/green/ramp_step_ms chmod 660 /sys/class/leds/green/start_idx -service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service +service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.lenovo_kunlun2 interface android.hardware.light@2.0::ILight default class hal user system diff --git a/overlay-pe/frameworks/base/core/res/res/values/custom_config.xml b/overlay-pe/frameworks/base/core/res/res/values/custom_config.xml index eeb5567..a1d9542 100644 --- a/overlay-pe/frameworks/base/core/res/res/values/custom_config.xml +++ b/overlay-pe/frameworks/base/core/res/res/values/custom_config.xml @@ -55,12 +55,6 @@ true - - - 308203e1308202c9a0030201020209008048d69df79e3274300d06092a864886f70d01010b0500308186310b300906035504061302434e310b300906035504080c02424a3115301306035504070c0c4265696a696e672056696577310f300d060355040a0c064c454e4f564f310f300d060355040b0c064d6f62696c65310f300d06035504030c064c454e4f564f3120301e06092a864886f70d01090116116c656e6f766f406c656e6f766f2e636f6d301e170d3138303130343031313630365a170d3435303532323031313630365a308186310b300906035504061302434e310b300906035504080c02424a3115301306035504070c0c4265696a696e672056696577310f300d060355040a0c064c454e4f564f310f300d060355040b0c064d6f62696c65310f300d06035504030c064c454e4f564f3120301e06092a864886f70d01090116116c656e6f766f406c656e6f766f2e636f6d30820122300d06092a864886f70d01010105000382010f003082010a0282010100d41b9cff129f6bba58d91de03a10a5b0f386939879c1930a51e1c838d1b8a93ff45afde0faeabfa6c169c44e7b8a23b3891192f930868a3d6dc14df5675cc1554eb25d33f60597092df8a82d27cdf25437001677d574f5685acdff9e85ff9bf21e7440de5b98109492ba5466ebf9fcd814b8d0124bfef998c84c7b3178f3937c6333849dd4036963ce4b27d304d4ccdd90d29d7fa60a254c9a033a5b2f64fc79eab166b1a008a01459874e426368700181d5d611c74ca11064bb20cf5475232579d1d799ffb9d293859562ddb3b70df54cc5762db4414d6a43beacb5d54380189b2dda7a0940189ff9edf74da9c624d62ff8561d90f57eeba060f0c68f4abb210203010001a350304e301d0603551d0e04160414c34a6547eeccafd25ed357ea0ff29beebb5535c0301f0603551d23041830168014c34a6547eeccafd25ed357ea0ff29beebb5535c0300c0603551d13040530030101ff300d06092a864886f70d01010b050003820101009de7d35d241f83b8b3788e0dd664f3cf0d9048a31b6322b5cc3dc0e74392636266a69491315af1cd9e72689cedaa1e7560f668f2658f7e4c51b7280d603a6494b23f2680a43ab8112fc15377fc86de50f999a02daab121605a6ceb8e6abfacb52a766d970fa5dea3fd2aebbc0d48863e2b72b65870f1df25fe1e9671d79decce042d100dc4922b793133c4e16bdaf5be82534e6c2803f5dc92aae2955e1bb97830949e4c4fa9ec42c33e2c4c4e5702c8bb079519587d47b99b8bce2d289e89ef94298568bd8ea235788614a80c41002f65d2a792a6a9377a819fcfaf1c25b282588bc3f67c30e8aee8ab4c7c39b2db58c91a8e5a132d02881b082797ab7dbefe - - true diff --git a/power-libperfmgr/Android.bp b/power-libperfmgr/Android.bp index 3d75495..57e04b1 100644 --- a/power-libperfmgr/Android.bp +++ b/power-libperfmgr/Android.bp @@ -6,6 +6,7 @@ cc_library_headers { cc_library { name: "libdisppower-lenovo", + vendor: true, srcs: [ "disp-power/InteractionHandler.cpp", ], @@ -23,6 +24,7 @@ cc_binary { relative_install_path: "hw", init_rc: ["aidl/android.hardware.power-service.lenovo.rc"], vintf_fragments: ["aidl/android.hardware.power-service.lenovo.xml"], + vendor: true, shared_libs: [ "android.hardware.power-ndk_platform", "libbase", diff --git a/power-libperfmgr/aidl/android.hardware.power-service.lenovo.rc b/power-libperfmgr/aidl/android.hardware.power-service.lenovo.rc index 5f22457..7e8a792 100644 --- a/power-libperfmgr/aidl/android.hardware.power-service.lenovo.rc +++ b/power-libperfmgr/aidl/android.hardware.power-service.lenovo.rc @@ -1,4 +1,4 @@ -service vendor.power-hal-aidl /system/bin/hw/android.hardware.power-service.lenovo +service vendor.power-hal-aidl /vendor/bin/hw/android.hardware.power-service.lenovo class hal user root group system diff --git a/power-libperfmgr/aidl/android.hardware.power-service.lenovo.xml b/power-libperfmgr/aidl/android.hardware.power-service.lenovo.xml index 4c75d15..caf6ea2 100644 --- a/power-libperfmgr/aidl/android.hardware.power-service.lenovo.xml +++ b/power-libperfmgr/aidl/android.hardware.power-service.lenovo.xml @@ -1,4 +1,4 @@ - + android.hardware.power IPower/default diff --git a/power-libperfmgr/aidl/service.cpp b/power-libperfmgr/aidl/service.cpp index 2a7ce9a..4db1c30 100644 --- a/power-libperfmgr/aidl/service.cpp +++ b/power-libperfmgr/aidl/service.cpp @@ -30,7 +30,7 @@ using aidl::google::hardware::power::impl::pixel::Power; using aidl::google::hardware::power::impl::pixel::PowerExt; using ::android::perfmgr::HintManager; -constexpr char kPowerHalConfigPath[] = "/system/etc/powerhint.json"; +constexpr char kPowerHalConfigPath[] = "/vendor/etc/powerhint.json"; constexpr char kPowerHalInitProp[] = "vendor.powerhal.init"; int main() { diff --git a/proprietary-files.txt b/proprietary-files.txt index 58ac7fb..e3debe9 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1,8 +1,8 @@ # All unpinned blobs below are extracted from ZUI 11.5.117 # Audio - from enchilada - QKQ1.190716.003 -vendor/lib64/soundfx/libvolumelistener.so:product/vendor_overlay/29/lib64/soundfx/libvolumelistener.so|5ea2812a582c76f7db3a7e5e4fb4cc33bbca3d9b -vendor/lib/soundfx/libvolumelistener.so:product/vendor_overlay/29/lib/soundfx/libvolumelistener.so|776906b3f70c7764245e8b394fd23333aa811bfd +vendor/lib64/soundfx/libvolumelistener.so|5ea2812a582c76f7db3a7e5e4fb4cc33bbca3d9b +vendor/lib/soundfx/libvolumelistener.so|776906b3f70c7764245e8b394fd23333aa811bfd # Bluetooth (aptX) - from crosshatch - QP1A.190711.020 product/lib64/libaptX_encoder.so|df1c89d7af1bb35808d5fe3496b04ba066c10cbc diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 14b9b15..31b1ada 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -1,10 +1,10 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.rc +LOCAL_MODULE := init.custom.rc LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.rc +LOCAL_SRC_FILES := etc/init.custom.rc LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init include $(BUILD_PREBUILT) diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.custom.rc similarity index 78% rename from rootdir/etc/init.qcom.rc rename to rootdir/etc/init.custom.rc index 983f042..d152c3d 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.custom.rc @@ -41,13 +41,6 @@ on init write /sys/block/zram0/comp_algorithm lz4 write /proc/sys/vm/page-cluster 0 - mount none /system/etc/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml bind - mount none /system/etc/thermal-engine.conf /vendor/etc/thermal-engine.conf bind - mount none /system/etc/wifi/WCNSS_qcom_cfg.ini /vendor/etc/wifi/WCNSS_qcom_cfg.ini bind - mount none /system/etc/init/android.hardware.light@2.0-service.rc /vendor/etc/init/android.hardware.light@2.0-service.rc bind - mount none /vendor/lost+found /vendor/overlay bind - mount none /system/etc/vendor_override_manifest.xml /vendor/etc/vintf/manifest/android.hardware.atrace@1.0-service.xml bind - # set default schedTune value for foreground/top-app # Set default values for foreground and top-app stune write /dev/stune/foreground/schedtune.prefer_idle 1 @@ -85,15 +78,3 @@ service charger /system/bin/charger group system graphics input capabilities SYS_BOOT seclabel u:r:charger:s0 - -service cvphalservice /system/bin/true - disabled - -service vendor.power-hal-1-0 /system/bin/true - disabled - -service iop-hal-2-0 /system/bin/true - disabled - -service perf-hal-2-0 /system/bin/true - disabled diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index 591fc79..32fe4ce 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -13,7 +13,7 @@ # HALs /system/bin/hw/android\.hardware\.power-service\.lenovo u:object_r:hal_power_pixel_exec:s0 /system/bin/hw/lineage\.livedisplay@2\.0-service-sdm u:object_r:shal_livedisplay_default_exec:s0 -/(product|system/product)/vendor_overlay/[0-9]+/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_default_exec:s0 +/(system|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_default_exec:s0 # IMS /vendor/bin/imsdatadaemon u:object_r:ims_exec:s0 @@ -23,7 +23,3 @@ # Touch /sys/class/touch/tp_dev/gesture_on u:object_r:sysfs_tp:s0 - -# Vendor overlay -/(product|system/product)/vendor_overlay/[0-9]+/lib(64)?/hw u:object_r:vendor_hal_file:s0 -/(product|system/product)/vendor_overlay/[0-9]+/lib(64)?/soundfx u:object_r:vendor_hal_file:s0 diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te index 68fa0b8..1cdd012 100644 --- a/sepolicy/private/init.te +++ b/sepolicy/private/init.te @@ -5,9 +5,6 @@ allow init proc_touchpanel:file { write setattr open}; allow init vendor_configs_file:dir mounton; allow init vendor_configs_file:file mounton; -# Allow init to mount vendor overlay -allow init vendor_overlay_file:dir mounton; - allow init self:netlink_generic_socket read; allow init sysfs_tp:file setattr; diff --git a/vendor_override_manifest.xml b/vendor_override_manifest.xml deleted file mode 100644 index 60a4c35..0000000 --- a/vendor_override_manifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - android.hardware.atrace - hwbinder - 1.0 - - IAtraceDevice - default - - - - android.hardware.power - hwbinder - - - vendor.qti.hardware.perf - hwbinder - -