diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index faa2e5a..7fd4ee8 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -4,18 +4,33 @@ # SPDX-License-Identifier: Apache-2.0 # -COMMON_PATH := device/samsung/sm8550-common +COMMON_PATH := device/samsung/sm8750-common # Architecture TARGET_ARCH := arm64 -TARGET_ARCH_VARIANT := armv9-a +TARGET_ARCH_VARIANT := armv8-a TARGET_CPU_ABI := arm64-v8a -TARGET_CPU_ABI2 := +TARGET_CPU_ABI2 := TARGET_CPU_VARIANT := generic -TARGET_CPU_VARIANT_RUNTIME := kryo300 +TARGET_CPU_VARIANT_RUNTIME := oryon # A/B -AB_OTA_UPDATER := false +AB_OTA_UPDATER := true +AB_OTA_PARTITIONS += \ + init_boot \ + vendor \ + vbmeta \ + system \ + odm \ + vbmeta_system \ + boot \ + product \ + dtbo \ + system_ext \ + vendor_dlkm \ + vendor_boot \ + system_dlkm +BOARD_USES_RECOVERY_AS_BOOT := true # Audio AUDIO_FEATURE_ENABLED_DLKM := true @@ -42,7 +57,7 @@ BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) BOARD_RAMDISK_USE_LZ4 := true # Bootloader -TARGET_BOOTLOADER_BOARD_NAME := kalama +TARGET_BOOTLOADER_BOARD_NAME := sun # DTB / DTBO BOARD_INCLUDE_DTB_IN_BOOTIMG := true @@ -60,25 +75,34 @@ BOARD_MKBOOTIMG_INIT_ARGS += --header_version $(BOARD_INIT_BOOT_HEADER_VERSION) BOARD_BOOTCONFIG := \ androidboot.hardware=qcom \ androidboot.memcg=1 \ - androidboot.usbcontroller=a600000.dwc3 + androidboot.usbcontroller=a600000.dwc3 \ + androidboot.load_modules_parallel=false \ + androidboot.hypervisor.protected_vm.supported=true \ + androidboot.selinux=permissive BOARD_KERNEL_CMDLINE := \ androidboot.hardware=qcom \ androidboot.memcg=1 \ androidboot.usbcontroller=a600000.dwc3 \ + androidboot.load_modules_parallel=false \ + androidboot.hypervisor.protected_vm.supported=true \ + androidboot.selinux=permissive \ + bpp=32 \ printk.devkmsg=on \ firmware_class.path=/vendor/firmware_mnt/image \ - video=vfb:640x400,bpp=32,memsize=3072000 + bootconfig \ + video=vfb:640x400,bpp=32,memsize=3072000 \ + loop.max_part=7 BOARD_KERNEL_BASE := 0x00000000 BOARD_KERNEL_IMAGE_NAME := Image BOARD_KERNEL_PAGESIZE := 4096 BOARD_USES_GENERIC_KERNEL_IMAGE := true -TARGET_KERNEL_SOURCE := kernel/samsung/sm8550 +TARGET_KERNEL_SOURCE := kernel/samsung/sm8750 # Kernel modules -TARGET_KERNEL_EXT_MODULE_ROOT := kernel/samsung/sm8550-modules +TARGET_KERNEL_EXT_MODULE_ROOT := kernel/samsung/sm8750-modules # Metadata BOARD_USES_METADATA_PARTITION := true @@ -87,14 +111,14 @@ BOARD_USES_METADATA_PARTITION := true -include vendor/lineage/config/BoardConfigReservedSize.mk BOARD_PRODUCTIMAGE_MINIMAL_PARTITION_RESERVED_SIZE := false -BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 +BOARD_BOOTIMAGE_PARTITION_SIZE := 101122048 BOARD_CACHEIMAGE_PARTITION_SIZE := 629145600 -BOARD_DTBOIMG_PARTITION_SIZE := 16777216 +BOARD_DTBOIMG_PARTITION_SIZE := 20971520 BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE := 8388608 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 109051904 -BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296 +BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 134217728 -BOARD_SUPER_PARTITION_SIZE ?= 12100567040 +BOARD_SUPER_PARTITION_SIZE ?= 19398656000 BOARD_SUPER_PARTITION_GROUPS := samsung_dynamic_partitions BOARD_SAMSUNG_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_dlkm system_ext vendor vendor_dlkm BOARD_SAMSUNG_DYNAMIC_PARTITIONS_SIZE := $(shell echo $$(($(BOARD_SUPER_PARTITION_SIZE) - 4194304))) # (BOARD_SUPER_PARTITION_SIZE - "reasonable overhead of 4 MiB") @@ -122,7 +146,7 @@ BOARD_ROOT_EXTRA_FOLDERS := \ # Platform BOARD_USES_QCOM_HARDWARE := true -TARGET_BOARD_PLATFORM := kalama +TARGET_BOARD_PLATFORM := sun TARGET_KERNEL_ADDITIONAL_FLAGS += TARGET_BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) # Properties @@ -148,7 +172,7 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH) ENABLE_VENDOR_RIL_SERVICE := true # Security -BOOT_SECURITY_PATCH := 2025-06-01 +BOOT_SECURITY_PATCH := 2025-07-01 VENDOR_SECURITY_PATCH := $(BOOT_SECURITY_PATCH) # SEPolicy @@ -185,7 +209,7 @@ DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ DEVICE_MANIFEST_FILE := \ $(AUDIO_HAL_DIR)/configs/common/manifest_non_qmaa.xml \ $(AUDIO_HAL_DIR)/configs/common/manifest_non_qmaa_extn.xml \ - $(COMMON_PATH)/vintf/manifest_kalama.xml \ + $(COMMON_PATH)/vintf/manifest_sun.xml \ $(COMMON_PATH)/vintf/manifest_samsung.xml \ $(COMMON_PATH)/vintf/radio_manifest.xml @@ -207,4 +231,4 @@ WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true WPA_SUPPLICANT_VERSION := VER_0_8_X # Include the proprietary files BoardConfig. -include vendor/samsung/sm8550-common/BoardConfigVendor.mk +include vendor/samsung/sm8750-common/BoardConfigVendor.mk diff --git a/audio/impl/Android.bp b/audio/impl/Android.bp index 82677f3..6b14e99 100644 --- a/audio/impl/Android.bp +++ b/audio/impl/Android.bp @@ -1,5 +1,5 @@ filegroup { - name: "android.hardware.audio-impl_samsung-sm8550_srcs", + name: "android.hardware.audio-impl_samsung-sm8750_srcs", srcs: [ "Device.cpp", "DevicesFactory.cpp", @@ -12,18 +12,18 @@ filegroup { } cc_library_headers { - name: "android.hardware.audio-impl_samsung-sm8550_headers", + name: "android.hardware.audio-impl_samsung-sm8750_headers", proprietary: true, vendor: true, export_include_dirs: ["include"], } cc_defaults { - name: "android.hardware.audio-impl_samsung-sm8550", + name: "android.hardware.audio-impl_samsung-sm8750", relative_install_path: "hw", proprietary: true, vendor: true, - srcs: [":android.hardware.audio-impl_samsung-sm8550_srcs"], + srcs: [":android.hardware.audio-impl_samsung-sm8750_srcs"], defaults: ["hidl_defaults"], @@ -46,7 +46,7 @@ cc_defaults { ], header_libs: [ - "android.hardware.audio-impl_samsung-sm8550_headers", + "android.hardware.audio-impl_samsung-sm8750_headers", "android.hardware.audio.common.util@all-versions", "libaudioutils_headers", "libaudio_system_headers", @@ -56,13 +56,13 @@ cc_defaults { ], export_header_lib_headers: [ - "android.hardware.audio-impl_samsung-sm8550_headers", + "android.hardware.audio-impl_samsung-sm8750_headers", ], } cc_library_shared { - name: "android.hardware.audio@2.0-impl.samsung-sm8550", - defaults: ["android.hardware.audio-impl_samsung-sm8550"], + name: "android.hardware.audio@2.0-impl.samsung-sm8750", + defaults: ["android.hardware.audio-impl_samsung-sm8750"], shared_libs: [ "android.hardware.audio@2.0", "android.hardware.audio@2.0-util", @@ -78,8 +78,8 @@ cc_library_shared { } cc_library_shared { - name: "android.hardware.audio@4.0-impl.samsung-sm8550", - defaults: ["android.hardware.audio-impl_samsung-sm8550"], + name: "android.hardware.audio@4.0-impl.samsung-sm8750", + defaults: ["android.hardware.audio-impl_samsung-sm8750"], shared_libs: [ "android.hardware.audio@4.0", @@ -96,8 +96,8 @@ cc_library_shared { } cc_library_shared { - name: "android.hardware.audio@5.0-impl.samsung-sm8550", - defaults: ["android.hardware.audio-impl_samsung-sm8550"], + name: "android.hardware.audio@5.0-impl.samsung-sm8750", + defaults: ["android.hardware.audio-impl_samsung-sm8750"], shared_libs: [ "android.hardware.audio@5.0", "android.hardware.audio@5.0-util", @@ -113,8 +113,8 @@ cc_library_shared { } cc_library_shared { - name: "android.hardware.audio@6.0-impl.samsung-sm8550", - defaults: ["android.hardware.audio-impl_samsung-sm8550"], + name: "android.hardware.audio@6.0-impl.samsung-sm8750", + defaults: ["android.hardware.audio-impl_samsung-sm8750"], shared_libs: [ "android.hardware.audio@6.0", "android.hardware.audio@6.0-util", @@ -130,8 +130,8 @@ cc_library_shared { } cc_library_shared { - name: "android.hardware.audio@7.0-impl.samsung-sm8550", - defaults: ["android.hardware.audio-impl_samsung-sm8550"], + name: "android.hardware.audio@7.0-impl.samsung-sm8750", + defaults: ["android.hardware.audio-impl_samsung-sm8750"], shared_libs: [ "android.hardware.audio@7.0", "android.hardware.audio@7.0-util", @@ -149,8 +149,8 @@ cc_library_shared { } cc_library_shared { - name: "android.hardware.audio@7.1-impl.samsung-sm8550", - defaults: ["android.hardware.audio-impl_samsung-sm8550"], + name: "android.hardware.audio@7.1-impl.samsung-sm8750", + defaults: ["android.hardware.audio-impl_samsung-sm8750"], shared_libs: [ "android.hardware.audio@7.0", "android.hardware.audio@7.1", diff --git a/common.mk b/common.mk index adb0609..3b520e5 100644 --- a/common.mk +++ b/common.mk @@ -14,15 +14,46 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk) # Enforce generic ramdisk allow list $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) -# Non_ab_device -$(call inherit-product, $(SRC_TARGET_DIR)/product/non_ab_device.mk) +# Enable updating of APEXes +$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) + +# A/B +$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk) # Setup dalvik vm configs $(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk) +# Boot Control +PRODUCT_PACKAGES += \ + android.hardware.boot@1.2-impl \ + android.hardware.boot@1.2-impl.recovery \ + android.hardware.boot@1.2-service + +# A/B +PRODUCT_PACKAGES += \ + update_engine \ + update_engine_sideload \ + update_verifier + +AB_OTA_POSTINSTALL_CONFIG += \ + RUN_POSTINSTALL_system=true \ + POSTINSTALL_PATH_system=system/bin/otapreopt_script \ + FILESYSTEM_TYPE_system=erofs \ + POSTINSTALL_OPTIONAL_system=true + +AB_OTA_POSTINSTALL_CONFIG += \ + RUN_POSTINSTALL_vendor=true \ + POSTINSTALL_PATH_vendor=bin/checkpoint_gc \ + FILESYSTEM_TYPE_vendor=erofs \ + POSTINSTALL_OPTIONAL_vendor=true + +PRODUCT_PACKAGES += \ + checkpoint_gc \ + otapreopt_script + # Audio PRODUCT_PACKAGES += \ - android.hardware.audio@7.1-impl.samsung-sm8550 \ + android.hardware.audio@7.1-impl.samsung-sm8750 \ android.hardware.audio.effect@7.0-impl \ android.hardware.audio.service \ android.hardware.bluetooth.audio-impl \ @@ -42,23 +73,23 @@ PRODUCT_PACKAGES += \ libqcomvisualizer \ libqcomvoiceprocessing \ libvolumelistener \ - sound_trigger.primary.kalama \ + sound_trigger.primary.sun \ vendor.qti.hardware.AGMIPC@1.0-impl -AUDIO_HAL_DIR := hardware/qcom-caf/sm8550/audio/primary-hal -CONFIG_HAL_SRC_DIR := $(AUDIO_HAL_DIR)/configs/kalama -CONFIG_PAL_SRC_DIR := $(AUDIO_HAL_DIR)/../pal/configs/kalama +AUDIO_HAL_DIR := hardware/qcom-caf/sm8750/audio/primary-hal +CONFIG_HAL_SRC_DIR := $(AUDIO_HAL_DIR)/configs/sun +CONFIG_PAL_SRC_DIR := $(AUDIO_HAL_DIR)/../pal/configs/sun PRODUCT_COPY_FILES += \ $(AUDIO_HAL_DIR)/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ - $(CONFIG_HAL_SRC_DIR)/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_kalama/audio_effects.conf \ - $(CONFIG_HAL_SRC_DIR)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_kalama/audio_effects.xml \ + $(CONFIG_HAL_SRC_DIR)/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_sun/audio_effects.conf \ + $(CONFIG_HAL_SRC_DIR)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_sun/audio_effects.xml \ $(CONFIG_PAL_SRC_DIR)/card-defs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/card-defs.xml \ $(CONFIG_HAL_SRC_DIR)/microphone_characteristics.xml:$(TARGET_COPY_OUT_VENDOR)/etc/microphone_characteristics.xml \ $(CONFIG_PAL_SRC_DIR)/usecaseKvManager.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usecaseKvManager.xml PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_kalama_qssi/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_sun_qssi/audio_policy_configuration.xml \ $(LOCAL_PATH)/audio/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml PRODUCT_COPY_FILES += \ @@ -243,8 +274,8 @@ PRODUCT_SOONG_NAMESPACES += \ hardware/lineage/interfaces/power-libperfmgr \ hardware/qcom-caf/common/libqti-perfd-client \ hardware/samsung \ - kernel/samsung/sm8550 \ - kernel/samsung/sm8550-modules + kernel/samsung/sm8750 \ + kernel/samsung/sm8750-modules # Overlays PRODUCT_ENFORCE_RRO_TARGETS := * @@ -315,7 +346,7 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml # Shipping API -BOARD_SHIPPING_API_LEVEL := 33 +BOARD_SHIPPING_API_LEVEL := 35 PRODUCT_SHIPPING_API_LEVEL := $(BOARD_SHIPPING_API_LEVEL) # Telephony @@ -385,4 +416,4 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf # Inherit from the proprietary files makefile. -$(call inherit-product, vendor/samsung/sm8550-common/sm8550-common-vendor.mk) +$(call inherit-product, vendor/samsung/sm8750-common/sm8750-common-vendor.mk) diff --git a/configs/config.fs b/configs/config.fs index 199dcd4..707dde0 100644 --- a/configs/config.fs +++ b/configs/config.fs @@ -88,6 +88,12 @@ user: AID_BLUETOOTH group: AID_BLUETOOTH caps: BLOCK_SUSPEND NET_ADMIN +[vendor/bin/hw/android.hardware.bluetooth-service-qti] +mode: 0755 +user: AID_BLUETOOTH +group: AID_BLUETOOTH +caps: BLOCK_SUSPEND NET_ADMIN + [system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] mode: 0755 user: AID_SYSTEM diff --git a/configs/powerhint.json b/configs/powerhint.json index 2667edd..1e9598e 100644 --- a/configs/powerhint.json +++ b/configs/powerhint.json @@ -2,26 +2,48 @@ "Nodes": [ { "Name": "CPULittleClusterMaxFreq", - "Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", + "Path": "/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq", "Values": [ - "9999999", - "1344000", - "1555200", - "1670400", - "1785600" + 384000, + 556800, + 748800, + 960000, + 1152000, + 1363200, + 1555200, + 1785600, + 1996800, + 2227200, + 2400000, + 2745600, + 2918400, + 3072000, + 3321600, + 3532800 ], "DefaultIndex": 0, "ResetOnInit": true }, { "Name": "CPULittleClusterMinFreq", - "Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", + "Path": "/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq", "Values": [ - "9999999", - "1555200", - "1459200", - "1017600", - "672000" + 384000, + 556800, + 748800, + 960000, + 1152000, + 1363200, + 1555200, + 1785600, + 1996800, + 2227200, + 2400000, + 2745600, + 2918400, + 3072000, + 3321600, + 3532800 ], "ResetOnInit": true }, @@ -45,26 +67,48 @@ }, { "Name": "CPUBigClusterMaxFreq", - "Path": "/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq", + "Path": "/sys/devices/system/cpu/cpufreq/policy6/scaling_max_freq", "Values": [ - "9999999", - "1651200", - "2054400", - "2323200", - "2592000" + 1017600, + 1209600, + 1401600, + 1689600, + 1958400, + 2246400, + 2438400, + 2649600, + 2841600, + 3072000, + 3283200, + 3513600, + 3840000, + 4089600, + 4281600, + 4473600 ], "DefaultIndex": 0, "ResetOnInit": true }, { "Name": "CPUBigClusterMinFreq", - "Path": "/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq", + "Path": "/sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq", "Values": [ - "9999999", - "1651200", - "1536000", - "1401600", - "729600" + 1017600, + 1209600, + 1401600, + 1689600, + 1958400, + 2246400, + 2438400, + 2649600, + 2841600, + 3072000, + 3283200, + 3513600, + 3840000, + 4089600, + 4281600, + 4473600 ], "ResetOnInit": true }, @@ -88,26 +132,48 @@ }, { "Name": "CPUBigPlusClusterMaxFreq", - "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", + "Path": "/sys/devices/system/cpu/cpufreq/policy6/scaling_max_freq", "Values": [ - "9999999", - "1708800", - "2227200", - "2726400", - "2956800" + 1017600, + 1209600, + 1401600, + 1689600, + 1958400, + 2246400, + 2438400, + 2649600, + 2841600, + 3072000, + 3283200, + 3513600, + 3840000, + 4089600, + 4281600, + 4473600 ], "DefaultIndex": 0, "ResetOnInit": true }, { "Name": "CPUBigPlusClusterMinFreq", - "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq", + "Path": "/sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq", "Values": [ - "9999999", - "1708800", - "1593600", - "1363200", - "998400" + 1017600, + 1209600, + 1401600, + 1689600, + 1958400, + 2246400, + 2438400, + 2649600, + 2841600, + 3072000, + 3283200, + 3513600, + 3840000, + 4089600, + 4281600, + 4473600 ], "ResetOnInit": true }, @@ -210,9 +276,21 @@ "Name": "GPUMaxFreq", "Path": "/sys/class/kgsl/kgsl-3d0/devfreq/max_freq", "Values": [ - "680000000", - "615000000", - "550000000" + 1200000000, + 1100000000, + 1050000000, + 967000000, + 900000000, + 832000000, + 734000000, + 660000000, + 607000000, + 525000000, + 443000000, + 389000000, + 342000000, + 222000000, + 160000000 ], "DefaultIndex": 0, "ResetOnInit": true @@ -221,9 +299,21 @@ "Name": "GPUMinFreq", "Path": "/sys/class/kgsl/kgsl-3d0/devfreq/min_freq", "Values": [ - "550000000", - "401000000", - "220000000" + 1200000000, + 1100000000, + 1050000000, + 967000000, + 900000000, + 832000000, + 734000000, + 660000000, + 607000000, + 525000000, + 443000000, + 389000000, + 342000000, + 222000000, + 160000000 ], "ResetOnInit": true }, @@ -256,10 +346,10 @@ }, { "Name": "TouchscreenEnable", - "Path": "/sys/class/sec/tsp/input/enabled", + "Path": "/sys/class/sec/tsp/enabled", "Values": [ - "1", - "0" + "1", + "0" ], "ResetOnInit": true }, @@ -267,8 +357,8 @@ "Name": "DoubleTapToWakeEnable", "Path": "/sys/class/sec/tsp/cmd", "Values": [ - "aot_enable,0", - "aot_enable,1" + "aot_enable,0", + "aot_enable,1" ], "DefaultIndex": 0 }, @@ -392,19 +482,19 @@ "PowerHint": "SUSTAINED_PERFORMANCE", "Node": "CPUBigClusterMaxFreq", "Duration": 0, - "Value": "1651200" + "Value": "1689600" }, { "PowerHint": "SUSTAINED_PERFORMANCE", "Node": "CPUBigPlusClusterMaxFreq", "Duration": 0, - "Value": "1708800" + "Value": "1689600" }, { "PowerHint": "SUSTAINED_PERFORMANCE", "Node": "GPUMaxFreq", "Duration": 0, - "Value": "680000000" + "Value": "660000000" }, { "PowerHint": "INTERACTION", @@ -548,19 +638,19 @@ "PowerHint": "LAUNCH", "Node": "CPUBigPlusClusterMinFreq", "Duration": 3000, - "Value": "9999999" + "Value": "4473600" }, { "PowerHint": "LAUNCH", "Node": "CPUBigClusterMinFreq", "Duration": 3000, - "Value": "9999999" + "Value": "4473600" }, { "PowerHint": "LAUNCH", "Node": "CPULittleClusterMinFreq", "Duration": 3000, - "Value": "9999999" + "Value": "3532800" }, { "PowerHint": "LAUNCH", @@ -656,7 +746,7 @@ "PowerHint": "EXPENSIVE_RENDERING", "Node": "GPUMinFreq", "Duration": 0, - "Value": "550000000" + "Value": "525000000" }, { "PowerHint": "INTERACTIVE", @@ -680,13 +770,13 @@ "PowerHint": "Flipendo", "Node": "CPUBigClusterMaxFreq", "Duration": 0, - "Value": "1651200" + "Value": "1689600" }, { "PowerHint": "Flipendo", "Node": "CPUBigPlusClusterMaxFreq", "Duration": 0, - "Value": "1708800" + "Value": "1689600" } ] } diff --git a/extract-files.py b/extract-files.py index e844773..2bcbfe7 100755 --- a/extract-files.py +++ b/extract-files.py @@ -19,8 +19,8 @@ from extract_utils.main import ( ) namespace_imports = [ - 'device/samsung/sm8550-common', - 'hardware/qcom-caf/sm8550', + 'device/samsung/sm8750-common', + 'hardware/qcom-caf/sm8750', 'hardware/qcom-caf/wlan', 'hardware/samsung', 'vendor/qcom/opensource/commonsys-intf/display', @@ -66,7 +66,7 @@ blob_fixups: blob_fixups_user_type = { .regex_replace('default0', 'software'), 'vendor/etc/init/vendor.qti.media.c2audio@1.0-service.rc': blob_fixup() .regex_replace('.*disabled.*\n', ''), - ('vendor/etc/media_codecs_kalama.xml', 'vendor/etc/media_codecs_kalama_vendor.xml'): blob_fixup() + ('vendor/etc/media_codecs_sun.xml', 'vendor/etc/media_codecs_sun_vendor.xml'): blob_fixup() .regex_replace('.*media_codecs_(google_audio|google_c2|google_telephony|google_video|vendor_audio).*\n', ''), 'vendor/lib64/libqcodec2_core.so': blob_fixup() .add_needed('libcodec2_shim.so'), @@ -79,7 +79,7 @@ blob_fixups: blob_fixups_user_type = { } # fmt: skip module = ExtractUtilsModule( - 'sm8550-common', + 'sm8750-common', 'samsung', blob_fixups=blob_fixups, lib_fixups=lib_fixups, diff --git a/init/fstab.qcom b/init/fstab.qcom index 7386898..16dd9ae 100644 --- a/init/fstab.qcom +++ b/init/fstab.qcom @@ -1,72 +1,32 @@ -# Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted (subject to the limitations in the -# disclaimer below) provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Android fstab file. -# The filesystem that contains the filesystem checker binary (typically /system) cannot -# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK - -# -system /system ext4 ro avb=vbmeta_system,wait,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey:/avb/t-gsi.avbpubkey -system_ext /system_ext ext4 ro avb=vbmeta_system,wait,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey:/avb/t-gsi.avbpubkey -product /product ext4 ro avb,wait,logical,first_stage_mount -vendor /vendor ext4 ro avb,wait,logical,first_stage_mount -vendor_dlkm /vendor_dlkm ext4 ro avb,wait,logical,first_stage_mount -system_dlkm /system_dlkm ext4 ro avb,wait,logical,first_stage_mount -odm /odm ext4 ro avb,wait,logical,first_stage_mount -/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults -/dev/block/bootdevice/by-name/init_boot /init_boot emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/vendor_boot /vendor_boot emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults -/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,sync wait,check,formattable,wrappedkey,first_stage_mount -/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,usrquota,grpquota,fsync_mode=nobarrier,reserve_root=32768,resgid=5678,whint_mode=fs-based,inlinecrypt latemount,wait,check,formattable,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs,fscompress,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,metadata_encryption=aes-256-xts:wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption -/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check -/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check -/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/apnhlos /vendor/firmware_mnt vfat ro,context=u:object_r:firmware_file:s0,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337 wait -/dev/block/bootdevice/by-name/modem /vendor/firmware-modem vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait -/dev/block/bootdevice/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check -/dev/block/bootdevice/by-name/sec_efs /efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check -/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait -/dev/block/bootdevice/by-name/carrier /carrier ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic defaults,nofail,check -/dev/block/bootdevice/by-name/abl /abl emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/tz /tz emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/hyp /hyp emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/xbl /xbl emmc defaults defaults,first_stage_mount -/dev/block/bootdevice/by-name/vm-bootsys /vendor/vm-system ext4 ro,nosuid,nodev,barrier=1 wait -/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait - -/devices/platform/soc/*.ssusb/*.dwc3/xhci-hcd.*.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto -/devices/platform/soc/8804000.sdhci/mmc_host* auto vfat defaults voldmanaged=sdcard:auto - -#CSC -/dev/block/platform/soc/1d84000.ufshc/by-name/prism /prism ext4 ro,barrier=1 avb,nofail,first_stage_mount -/dev/block/platform/soc/1d84000.ufshc/by-name/optics /optics ext4 ro,barrier=1 avb,nofail,first_stage_mount +system /system erofs ro avb=vbmeta_system,wait,slotselect,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey:/avb/t-gsi.avbpubkey:/avb/u-gsi.avbpubkey:/avb/v-gsi.avbpubkey +system /system f2fs ro avb=vbmeta_system,wait,slotselect,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey:/avb/t-gsi.avbpubkey:/avb/u-gsi.avbpubkey:/avb/v-gsi.avbpubkey +system /system ext4 ro avb=vbmeta_system,wait,slotselect,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey:/avb/t-gsi.avbpubkey:/avb/u-gsi.avbpubkey:/avb/v-gsi.avbpubkey +system_ext /system_ext erofs ro avb=vbmeta_system,wait,slotselect,logical,first_stage_mount +product /product erofs ro avb,wait,slotselect,logical,first_stage_mount +vendor /vendor erofs ro avb,wait,slotselect,logical,first_stage_mount +vendor_dlkm /vendor_dlkm erofs ro avb,wait,slotselect,logical,first_stage_mount +system_dlkm /system_dlkm erofs ro avb,wait,slotselect,logical,first_stage_mount +system_dlkm /system_dlkm f2fs ro avb,wait,slotselect,logical,first_stage_mount +system_dlkm /system_dlkm ext4 ro avb,wait,slotselect,logical,first_stage_mount +odm /odm erofs ro avb,wait,slotselect,logical,first_stage_mount +/dev/block/by-name/boot /boot emmc defaults slotselect,first_stage_mount,formattable,avb=vbmeta +/dev/block/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount,formattable,avb +/dev/block/by-name/vbmeta_system /vbmeta_system emmc defaults slotselect,first_stage_mount,formattable,avb +/dev/block/by-name/dtbo /dtbo emmc defaults slotselect,first_stage_mount,formattable,avb +/dev/block/by-name/metadata /metadata f2fs noatime,nosuid,nodev,discard,sync,fsync_mode=strict,data_flush wait,check,formattable,wrappedkey,first_stage_mount +/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,usrquota,grpquota,fsync_mode=nobarrier,reserve_root=32768,resgid=5678,inlinecrypt latemount,wait,check,,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs,fscompress,ddp,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,metadata_encryption=aes-256-xts:wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption +/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults,first_stage_mount +/dev/block/bootdevice/by-name/apnhlos /vendor/firmware_mnt vfat ro,context=u:object_r:firmware_file:s0,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337 wait,slotselect +/dev/block/bootdevice/by-name/modem /vendor/firmware-modem vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect +/dev/block/bootdevice/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check +/dev/block/bootdevice/by-name/sec_efs /efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check +/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect +/dev/block/bootdevice/by-name/vendor_boot /vendor_boot emmc defaults defaults,slotselect,first_stage_mount +/dev/block/bootdevice/by-name/init_boot /init_boot emmc defaults defaults,slotselect,first_stage_mount +/dev/block/bootdevice/by-name/vm-bootsys /product/vm-system ext4 ro,nosuid,nodev,barrier=1 defaults,slotselect +/dev/block/by-name/prism /prism ext4 ro,barrier=1 avb,slotselect,nofail,first_stage_mount +/dev/block/by-name/optics /optics ext4 ro,barrier=1 avb,slotselect,nofail,first_stage_mount +/devices/platform/soc/*.ssusb/*.dwc3/xhci-hcd.*.auto* auto vfat default voldmanaged=usb:auto +/devices/platform/soc/8804000.sdhci/mmc_host* auto auto default voldmanaged=sdcard:auto +/dev/block/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check diff --git a/init/fstab.ramplus b/init/fstab.ramplus index 32ccba7..565f200 100644 --- a/init/fstab.ramplus +++ b/init/fstab.ramplus @@ -3,5 +3,5 @@ # The filesystem that contains the filesystem checker binary (typically /system) cannot # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -# SWAP +# RAM Plus /dev/block/zram0 none swap defaults zramsize=2147483648,auto_configure diff --git a/init/init.class_main.sh b/init/init.class_main.sh index c8a9ecd..8df721e 100644 --- a/init/init.class_main.sh +++ b/init/init.class_main.sh @@ -26,14 +26,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # - -# -# start ril-daemon only for targets on which radio is present -# # Changes from Qualcomm Innovation Center, Inc. are provided under the following license: # Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause-Clear +# +# start ril-daemon only for targets on which radio is present +# baseband=`getprop ro.baseband` datamode=`getprop persist.vendor.data.mode` low_ram=`getprop ro.config.low_ram` @@ -44,19 +43,20 @@ case "$baseband" in esac case "$baseband" in - "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6") - + "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6") case "$datamode" in "tethered") - start vendor.dataqti +# This daemon was also disabled in sm8450 as a qualcomm tethering interface. +# start vendor.dataqti if [ "$low_ram" != "true" ]; then - start vendor.dataadpl + start vendor.dataadpl fi ;; "concurrent") - start vendor.dataqti +# This daemon was also disabled in sm8450 as a qualcomm tethering interface. +# start vendor.dataqti if [ "$low_ram" != "true" ]; then - start vendor.dataadpl + start vendor.dataadpl fi ;; *) diff --git a/init/init.fingerprint.rc b/init/init.fingerprint.rc index f214181..eabac78 100644 --- a/init/init.fingerprint.rc +++ b/init/init.fingerprint.rc @@ -1,6 +1,4 @@ on boot - write /sys/class/sec/tsp/cmd "fod_enable,1,1,0" - # Fingerprint sensor chmod 0660 /dev/esfp0 chown system system /dev/esfp0 @@ -36,4 +34,4 @@ on boot mkdir /data/vendor/biometrics 0770 system system mkdir /data/vendor/fpSnrTest 0770 system system mkdir /efs/biometrics 0770 system system - mkdir /efs/biometrics/meta 0770 system system + mkdir /efs/biometrics/meta 0770 system system \ No newline at end of file diff --git a/init/init.mdm.sh b/init/init.mdm.sh index 2de0964..3ed7ed5 100644 --- a/init/init.mdm.sh +++ b/init/init.mdm.sh @@ -31,3 +31,4 @@ baseband=`getprop ro.baseband` if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then start vendor.mdm_helper fi + diff --git a/init/init.qcom.post_boot.sh b/init/init.qcom.post_boot.sh index 8ca3a21..1da9da8 100644 --- a/init/init.qcom.post_boot.sh +++ b/init/init.qcom.post_boot.sh @@ -709,10 +709,10 @@ low_ram=`getprop ro.config.low_ram` if [ "$ProductName" == "msmnile" ] || [ "$ProductName" == "kona" ] || [ "$ProductName" == "sdmshrike_au" ]; then # Enable ZRAM - # configure_zram_parameters + configure_zram_parameters configure_read_ahead_kb_values echo 0 > /proc/sys/vm/page-cluster - # echo 100 > /proc/sys/vm/swappiness + echo 100 > /proc/sys/vm/swappiness else arch_type=`uname -m` @@ -817,13 +817,13 @@ else # Set allocstall_threshold to 0 for all targets. # Set swappiness to 100 for all targets echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold - # echo 100 > /proc/sys/vm/swappiness + echo 100 > /proc/sys/vm/swappiness # Disable wsf for all targets beacause we are using efk. # wsf Range : 1..1000 So set to bare minimum value 1. echo 1 > /proc/sys/vm/watermark_scale_factor - # configure_zram_parameters + configure_zram_parameters configure_read_ahead_kb_values @@ -856,9 +856,8 @@ function start_hbtp() fi } - case "$target" in - "kalama") + "pineapple") if [ -f /sys/devices/soc0/chip_family ]; then chip_family_id=`cat /sys/devices/soc0/chip_family` else @@ -868,44 +867,16 @@ case "$target" in echo "adsprpc : chip_family_id : $chip_faily_id" > /dev/kmsg case "$chip_family_id" in - "0x7f") - if [ -f /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status ]; then - fastrpc_cdsp_status=`cat /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status` + "0x8a") + if [ -f /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_nsp_status ]; then + fastrpc_nsp_status=`cat /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_nsp_status` else - fastrpc_cdsp_status=-1 + fastrpc_nsp_status=-1 fi - echo "adsprpc : fastrpc_cdsp_status : $fastrpc_cdsp_status" > /dev/kmsg + echo "adsprpc : fastrpc_nsp_status : $fastrpc_nsp_status" > /dev/kmsg - if [ $fastrpc_cdsp_status -eq 0 ]; then - setprop vendor.fastrpc.disable.cdsprpcd.daemon 1 - echo "adsprpc : Disabled cdsp daemon" > /dev/kmsg - fi - esac - ;; -esac - -case "$target" in - "crow") - if [ -f /sys/devices/soc0/chip_family ]; then - chip_family_id=`cat /sys/devices/soc0/chip_family` - else - chip_family_id=-1 - fi - - echo "adsprpc : chip_family_id : $chip_faily_id" > /dev/kmsg - - case "$chip_family_id" in - "0x92") - if [ -f /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status ]; then - fastrpc_cdsp_status=`cat /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status` - else - fastrpc_cdsp_status=-1 - fi - - echo "adsprpc : fastrpc_cdsp_status : $fastrpc_cdsp_status" > /dev/kmsg - - if [ $fastrpc_cdsp_status -eq 0 ]; then + if [ $fastrpc_nsp_status -eq 0 ]; then setprop vendor.fastrpc.disable.cdsprpcd.daemon 1 echo "adsprpc : Disabled cdsp daemon" > /dev/kmsg fi @@ -4293,7 +4264,7 @@ case "$target" in # Turn on sleep modes. echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - # echo 100 > /proc/sys/vm/swappiness + echo 100 > /proc/sys/vm/swappiness ;; esac ;; @@ -4689,6 +4660,8 @@ case "$target" in echo N > /sys/module/lpm_levels/parameters/sleep_disabled fi echo N > /sys/module/lpm_levels/parameters/sleep_disabled + # Starting io prefetcher service + start iop # Set Memory parameters configure_memory_parameters @@ -4847,7 +4820,7 @@ case "$target" in echo N > /sys/module/lpm_levels/L3/l3-dyn-ret/idle_enabled # Turn on sleep modes. echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled - # echo 100 > /proc/sys/vm/swappiness + echo 100 > /proc/sys/vm/swappiness echo 120 > /proc/sys/vm/watermark_scale_factor ;; esac @@ -5451,6 +5424,7 @@ case "$target" in echo 5 > /proc/sys/kernel/sched_spill_nr_run echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker + start iop # disable thermal bcl hotplug to switch governor echo 0 > /sys/module/msm_thermal/core_control/enabled diff --git a/init/init.qcom.rc b/init/init.qcom.rc index 31fbee7..18ac66e 100644 --- a/init/init.qcom.rc +++ b/init/init.qcom.rc @@ -86,6 +86,8 @@ on early-init chown root system /dev/kmsg chmod 0620 /dev/kmsg + # Load WIGIG platform driver + exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy on init @@ -154,6 +156,18 @@ on boot chmod 0660 /sys/class/rfkill/rfkill0/device/extldo chown media audio /sys/kernel/snd_card/card_state + # for BT MAC address + mkdir /mnt/vendor/efs/bluetooth 0770 system bluetooth + # if already exist + chown system bluetooth /mnt/vendor/efs/bluetooth + chown system bluetooth /mnt/vendor/efs/bluetooth/bt_addr + chmod 0770 /mnt/vendor/efs/bluetooth + chmod 0660 /mnt/vendor/efs/bluetooth/bt_addr + + # permissions for bluetooth. + setprop ro.bt.bdaddr_path "/mnt/vendor/efs/bluetooth/bt_addr" + chown bluetooth bluetooth ro.bt.bdaddr_path + # This location is used by QCRIL to host UNIX domain # socket files used for internal IPC within QCRIL # modules @@ -168,6 +182,9 @@ on boot mkdir /mnt/vendor/persist/iar_db 0770 system system mkdir /mnt/vendor/spunvm 0770 system system + #Create WIGIG socket area + mkdir /dev/socket/wigig 0770 wifi wifi + setprop wifi.interface wlan0 setprop ro.telephony.call_ring.multiple false @@ -194,7 +211,9 @@ on boot # bond0 used by FST Manager chown wifi wifi /sys/class/net/bond0/bonding/queue_id - # Allow access to dload sysfs node + # Allow access to emmc rawdump block partition and dload sysfs node + chown root system /dev/block/bootdevice/by-name/rawdump + chmod 0660 /dev/block/bootdevice/by-name/rawdump chown root system /sys/kernel/dload/emmc_dload chmod 0660 /sys/kernel/dload/emmc_dload chown root system /dev/block/bootdevice/by-name/ramdump @@ -241,6 +260,8 @@ on boot # Create vpp directory mkdir /mnt/vendor/persist/vpp 0770 media media + # Create hexlp directory + mkdir /mnt/vendor/persist/hexlp 0770 media media # Create hvdcp_opti directory mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system @@ -258,6 +279,12 @@ on post-fs-data # Create directory used by display clients mkdir /data/vendor/display 0770 system graphics + # Change lm related dirs + mkdir /data/vendor/lm 0700 root root + + # Create directory used by powermodule + mkdir /data/vendor/pwr 0700 root root + # Create directory used by media clients mkdir /data/vendor/media 0770 mediacodec media @@ -267,13 +294,10 @@ on post-fs-data # Create directory for apps access via QTEEConnector mkdir /data/vendor/qtee 0770 system system - # Create folder of camera - #mkdir /data/vendor/camera 0770 camera camera - - # SAMSUNG_CAMERA + #Create folder of camera mkdir /data/vendor/camera 0770 camera system mkdir /data/vendor/camera/logdump 0770 camera system - chmod 0771 /data/vendor/camera/camxoverridesettings.txt + chmod 0664 /data/vendor/camera/camxoverridesettings.txt #Create directory for tftp mkdir /data/vendor/tombstones 0771 system system @@ -289,9 +313,13 @@ on post-fs-data mkdir /data/vendor/wifi/hostapd 0770 wifi wifi mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi + mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi mkdir /data/vendor/wifi/wpa 0770 wifi wifi mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi + # Create the directories used by WiGig Sensing + mkdir /data/vendor/sensing 0770 system wifi + # Create the directories used by CnE subsystem mkdir /data/vendor/connectivity 0771 radio radio chown radio radio /data/vendor/connectivity @@ -357,10 +385,18 @@ on post-fs-data mkdir /data/vendor/fm 0770 system system chmod 0770 /data/vendor/fm + #Create PERFD deamon related dirs + mkdir /data/vendor/perfd 0770 root system + chmod 2770 /data/vendor/perfd + rm /data/vendor/perfd/default_values + mkdir /data/vendor/secure_element 0777 system system mkdir /data/vendor/nfc 0770 nfc nfc + #Create IOP deamon related dirs + mkdir /data/vendor/iop 0700 root system + # Mark the copy complete flag to not completed write /data/vendor/radio/copy_complete 0 chown radio radio /data/vendor/radio/copy_complete @@ -403,6 +439,9 @@ on post-fs-data # Create vpp directory mkdir /data/vendor/vpp 0770 media media + # Create hexlp directory + mkdir /data/vendor/hexlp 0770 media media + #Create dir for TUI mkdir /data/vendor/tui 0700 system drmrpc @@ -412,6 +451,29 @@ service nqnfcinfo /system/vendor/bin/nqnfcinfo user system oneshot +service iop /system/vendor/bin/iop + class main + user root + group root + disabled + socket iop seqpacket 0666 root system + +service qcomsysd /system/vendor/bin/qcom-system-daemon + class main + user root + group root diag oem_2901 + disabled + +# Not launch qcomsysd process in USER BUILD +on property:persist.vendor.qcomsysd.enabled=1 && property:ro.build.type=userdebug + enable qcomsysd + +on property:persist.vendor.qcomsysd.enabled=1 && property:ro.build.type=eng + enable qcomsysd + +on property:persist.vendor.qcomsysd.enabled=0 + stop qcomsysd + service vendor.ssr_setup /system/vendor/bin/ssr_setup oneshot disabled @@ -423,6 +485,12 @@ service vendor.ss_ramdump /system/vendor/bin/subsystem_ramdump ioprio rt 4 disabled +service qti-ss-ramdump /vendor/bin/sh /vendor/etc/init/hw/init.qti.ss-ramdump.sh ${persist.vendor.ssr.enable_ramdumps} + class core + user root + oneshot + #seclabel u:r:vendor-qti-testscripts:s0 + on property:ro.vendor.iocgrp.config=1 mkdir /dev/blkio mount cgroup none /dev/blkio blkio @@ -453,13 +521,15 @@ on property:persist.vendor.ssr.restart_level=* on property:persist.vendor.ssr.enable_ramdumps=1 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1 write /sys/module/qcom_ramdump/parameters/enable_dump_collection 1 + start qti-ss-ramdump mkdir /data/vendor/ramdump_ssr 770 system system start vendor.ss_ramdump on property:persist.vendor.ssr.enable_ramdumps=0 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 write /sys/module/qcom_ramdump/parameters/enable_dump_collection 0 - + start qti-ss-ramdump + on property:persist.vendor.sys.rawdump_copy=1 write /sys/kernel/dload/emmc_dload 1 @@ -529,6 +599,21 @@ service qmiproxy /system/bin/qmiproxy group radio diag disabled +service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \ + -iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \ + -m/data/vendor/wifi/wigig_p2p_supplicant.conf \ + -O/data/vendor/wifi/wigig_sockets -dd \ + -e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0 \ + -S wigigsvc + # we will start as root and wpa_supplicant will switch to user wifi + # after setting up the capabilities required for WEXT + # user wifi + # group wifi inet keystore + class main + socket wigig/wpa_wigig0 dgram 660 wifi wifi + disabled + oneshot + # Data Migration service vendor.move_wifi_data /system/bin/move_wifi_data.sh class main @@ -537,6 +622,65 @@ service vendor.move_wifi_data /system/bin/move_wifi_data.sh disabled oneshot +service wigignpt /vendor/bin/wigignpt + interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default + class hal + socket wigig/wigignpt stream 660 system wifi + user system + group wifi + capabilities NET_ADMIN + disabled + +on property:persist.vendor.wigig.npt.enable=1 + start wigignpt + +service vendor.sensingdaemon /vendor/bin/sensingdaemon + class hal + socket wigig/sensingdaemon stream 660 system wifi + user system + group wifi + disabled + +service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG + class late_start + disabled + oneshot + +service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG + class late_start + disabled + oneshot + +service dhcpcd_p2p /system/bin/dhcpcd -ABKLG + class late_start + disabled + oneshot + +service dhcpcd_wigig0 /system/bin/dhcpcd -ABKLG + class late_start + disabled + oneshot + +service iprenew_wlan0 /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service iprenew_bond0 /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service iprenew_p2p /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service iprenew_wigig0 /system/bin/dhcpcd -n + class late_start + disabled + oneshot + service ptt_socket_app /system/vendor/bin/ptt_socket_app -d class main user wifi @@ -550,6 +694,16 @@ service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d disabled oneshot +service wifi_ftmd /system/vendor/bin/wifi_ftmd + user system + group system inet net_admin + socket wififtmd_server dgram 0660 system system + disabled + oneshot + +on property:vendor.wifi.ftmd.load=true + insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5 + service cnss-daemon /system/vendor/bin/cnss-daemon -n -l class late_start user system @@ -560,7 +714,17 @@ on property:sys.shutdown.requested=* write /sys/kernel/shutdown_wlan/shutdown 1 stop cnss-daemon -service ssgqmigd /vendor/bin/ssgqmigd64 +service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG + class late_start + disabled + oneshot + +service iprenew_bt-pan /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service ssgqmigd /vendor/bin/ssgqmigd class late_start user radio group radio gps system @@ -595,6 +759,13 @@ service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh disabled oneshot +#service qti-testscripts /system/bin/sh /product/etc/init.qcom.testscripts.sh +# class late_start +# user root +# disabled +# oneshot +# seclabel u:r:qti-testscripts:s0 + service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh class late_start group wifi inet @@ -609,6 +780,7 @@ service wifi-crda /vendor/bin/init.crda.sh on property:sys.boot_completed=1 start qcom-post-boot +# start qti-testscripts on property:ro.vendor.ril.mbn_copy_completed=1 write /data/vendor/radio/copy_complete 1 @@ -752,13 +924,13 @@ service poweroffhandler /system/vendor/bin/poweroffhandler disabled oneshot -#service time_daemon /vendor/bin/time_daemon -# class main -# user system -# group system -# capabilities SYS_TIME +service time_daemon /vendor/bin/time_daemon + class main + user system + group system + capabilities SYS_TIME -#Mixed HWC versions among targets +# Mixed HWC versions among targets on property:init.svc.surfaceflinger=restarting stop vendor.qti.hardware.display.composer start vendor.qti.hardware.display.composer @@ -793,6 +965,14 @@ service vendor.hbtp /vendor/bin/hbtp_daemon #on property:vendor.chre.enabled=0 # stop chre +on property:sys.factory.running_pretest=true + write /sys/class/sensors/accelerometer_sensor/lowpassfilter 2 + write /sys/class/sensors/sub_accelerometer_sensor/lowpassfilter 2 + +on property:sys.factory.running_pretest=false + write /sys/class/sensors/accelerometer_sensor/lowpassfilter 1 + write /sys/class/sensors/sub_accelerometer_sensor/lowpassfilter 1 + service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport class main disabled diff --git a/init/init.qcom.sh b/init/init.qcom.sh index 5ad44d9..5fcc108 100644 --- a/init/init.qcom.sh +++ b/init/init.qcom.sh @@ -481,6 +481,25 @@ chmod 660 /sys/devices/platform/soc/soc:modem_diag/coresight-modem-diag/enable_s chown -h root.oem_2902 /sys/bus/coresight/reset_source_sink chmod 660 /sys/bus/coresight/reset_source_sink +# qcom case +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etf/curr_sink +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etf/enable_sink +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etr/curr_sink +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etr/enable_sink +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etr/out_mode +chown -h system.system /sys/bus/coresight/devices/coresight-tpiu/curr_sink +chown -h system.system /sys/bus/coresight/devices/coresight-tpiu/out_mode +chown -h system.system /sys/bus/coresight/devices/coresight-stm/enable +chown -h system.system /sys/bus/coresight/devices/coresight-stm/enable_source +chown -h system.system /sys/bus/coresight/devices/coresight-hwevent/enable +chown -h system.system /sys/bus/coresight/devices/coresight-stm/hwevent_enable +chown -h system.system /sys/bus/coresight/devices/coresight-hwevent/setreg +chown -h system.system /sys/bus/coresight/devices/coresight-swao-csr/timestamp +chown -h system.system /sys/bus/coresight/devices/coresight-modem-diag/enable_source +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etr1/enable_sink +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etr1/out_mode +chown -h system.system /sys/bus/coresight/devices/coresight-tmc-etr1/curr_sink + # qcom case 05386569 mkdir /config/stp-policy/coresight-stm:p_ost.policy chmod 660 /config/stp-policy/coresight-stm:p_ost.policy diff --git a/init/init.ramplus.rc b/init/init.ramplus.rc index deea903..78cf1dc 100644 --- a/init/init.ramplus.rc +++ b/init/init.ramplus.rc @@ -1,3 +1,3 @@ -# KERNEL CORE MEMORY +# RAM Plus on property:sys.boot_completed=1 swapon_all /vendor/etc/fstab.ramplus diff --git a/init/init.samsung.bsp.rc b/init/init.samsung.bsp.rc index 1312a13..4ba4bd8 100644 --- a/init/init.samsung.bsp.rc +++ b/init/init.samsung.bsp.rc @@ -28,6 +28,8 @@ # on early-init + write /sys/class/firmware/timeout 10 + # sec_debug.ko - 1st stage chown system system /sys/module/sec_debug/parameters/dump_sink chmod 0640 /sys/module/sec_debug/parameters/dump_sink @@ -108,3 +110,5 @@ on shutdown # service definition # on property triggers +on property:vendor.all.modules.ready=1 + write /sys/module/kernel/parameters/stop_on_panic N diff --git a/init/init.samsung.display.rc b/init/init.samsung.display.rc index 3c46051..f6cc312 100644 --- a/init/init.samsung.display.rc +++ b/init/init.samsung.display.rc @@ -91,6 +91,12 @@ on post-fs-data chmod 0660 /sys/class/mdnie/mdnie/light_notification chown system system /sys/class/mdnie/mdnie/afc chmod 0660 /sys/class/mdnie/mdnie/afc + chown system system /sys/class/mdnie/mdnie/anti_glare + chmod 0660 /sys/class/mdnie/mdnie/anti_glare + chown system system /sys/class/mdnie/mdnie/extra_dim + chmod 0660 /sys/class/mdnie/mdnie/extra_dim + chown system system /sys/class/mdnie/mdnie/vividness + chmod 0660 /sys/class/mdnie/mdnie/vividness chown system system /sys/class/mdnie/mdnie1/lcdtype chown system system /sys/class/mdnie/mdnie1/lcd_power @@ -122,6 +128,12 @@ on post-fs-data chmod 0660 /sys/class/mdnie/mdnie1/light_notification chown system system /sys/class/mdnie/mdnie1/afc chmod 0660 /sys/class/mdnie/mdnie1/afc + chown system system /sys/class/mdnie/mdnie1/anti_glare + chmod 0660 /sys/class/mdnie/mdnie1/anti_glare + chown system system /sys/class/mdnie/mdnie1/extra_dim + chmod 0660 /sys/class/mdnie/mdnie1/extra_dim + chown system system /sys/class/mdnie/mdnie1/vividness + chmod 0660 /sys/class/mdnie/mdnie1/vividness mkdir /efs/afc 0700 system system chmod 700 /efs/afc @@ -156,6 +168,13 @@ on post-fs-data chown system system /sys/class/lcd/panel1/alpm chmod 0660 /sys/class/lcd/panel1/alpm +# HLPM Mode + chown system system /sys/class/lcd/panel/hlpm_mode + chmod 0660 /sys/class/lcd/panel/hlpm_mode + + chown system system /sys/class/lcd/panel1/hlpm_mode + chmod 0660 /sys/class/lcd/panel1/hlpm_mode + # Active Clock in AOD chown system system /dev/act_clk chmod 0660 /dev/act_clk @@ -187,6 +206,13 @@ on post-fs-data chown system system /sys/class/lcd/panel1/mafpc_check chmod 0660 /sys/class/lcd/panel1/mafpc_check +# AIQE + chown system system /sys/class/drm/card0-sde-crtc-0/aiqe_license_status + chmod 0444 /sys/class/drm/card0-sde-crtc-0/aiqe_license_status + + chown system system /sys/class/drm/card0-sde-crtc-1/aiqe_license_status + chmod 0444 /sys/class/drm/card0-sde-crtc-1/aiqe_license_status + # POC mkdir /efs/etc/poc 0700 system system chmod 700 /efs/etc/poc @@ -285,6 +311,13 @@ on post-fs-data chown system system /sys/class/lcd/panel1/hw_cursor chmod 0660 /sys/class/lcd/panel1/hw_cursor +# PANEL AGING + chown system system /sys/class/lcd/panel/panel_aging + chmod 0660 /sys/class/lcd/panel/panel_aging + + chown system system /sys/class/lcd/panel1/panel_aging + chmod 0660 /sys/class/lcd/panel1/panel_aging + # DSC CRC chown system system /sys/class/lcd/panel/dsc_crc chmod 0660 /sys/class/lcd/panel/dsc_crc @@ -373,6 +406,7 @@ on post-fs-data chown radio system /sys/class/lcd/panel/temperature chown radio system /sys/class/lcd/panel/tuning chown radio system /sys/class/lcd/panel/lux + chown system system /sys/class/lcd/panel/smooth_dim chown radio system /sys/class/lcd/panel/partial_disp chmod 0660 /sys/class/lcd/panel/partial_disp chown radio system /sys/class/lcd/panel/cover_control @@ -380,6 +414,10 @@ on post-fs-data chown system system /sys/class/lcd/panel/ldu_correction chmod 0660 /sys/class/lcd/panel/ldu_correction chown radio system /sys/class/lcd/panel/force_flip + chown radio system /sys/class/lcd/panel/cell_id + chmod 0440 /sys/class/lcd/panel/cell_id + chown system system /sys/class/lcd/panel/w_coordinate + chmod 0440 /sys/class/lcd/panel/w_coordinate chown system system /sys/class/lcd/panel1/window_type chown radio system /sys/class/lcd/panel1/power_reduce @@ -387,6 +425,7 @@ on post-fs-data chown radio system /sys/class/lcd/panel1/temperature chown radio system /sys/class/lcd/panel1/tuning chown radio system /sys/class/lcd/panel1/lux + chown system system /sys/class/lcd/panel1/smooth_dim chown radio system /sys/class/lcd/panel1/partial_disp chmod 0660 /sys/class/lcd/panel1/partial_disp chown radio system /sys/class/lcd/panel1/cover_control @@ -394,6 +433,10 @@ on post-fs-data chown system system /sys/class/lcd/panel1/ldu_correction chmod 0660 /sys/class/lcd/panel1/ldu_correction chown radio system /sys/class/lcd/panel1/force_flip + chown radio system /sys/class/lcd/panel1/cell_id + chmod 0440 /sys/class/lcd/panel1/cell_id + chown system system /sys/class/lcd/panel1/w_coordinate + chmod 0440 /sys/class/lcd/panel1/w_coordinate # COPR chown system system /sys/class/lcd/panel/copr_roi @@ -560,11 +603,12 @@ on post-fs-data chown system system /sys/class/lcd/panel1/tcon_pe chmod 0660 /sys/class/lcd/panel1/tcon_pe -# vendor graphics trace points - perfetto-trace - chmod 0660 /sys/kernel/debug/tracing/events/drm/enable - chmod 0660 /sys/kernel/tracing/events/drm/enable - chmod 0660 /sys/kernel/debug/events/tracing/sde/enable - chmod 0660 /sys/kernel/tracing/events/sde/enable +# check for display on time + chown system system /sys/class/lcd/panel/display_on + chmod 0440 /sys/class/lcd/panel/display_on + + chown system system /sys/class/lcd/panel1/display_on + chmod 0440 /sys/class/lcd/panel1/display_on chmod 0660 /sys/kernel/debug/tracing/events/sde/sde_cmd_release_bw/enable chmod 0660 /sys/kernel/tracing/events/sde/sde_cmd_release_bw/enable diff --git a/init/init.samsung.dp.rc b/init/init.samsung.dp.rc index db4d55f..6cce94c 100644 --- a/init/init.samsung.dp.rc +++ b/init/init.samsung.dp.rc @@ -43,10 +43,6 @@ on late-fs on post-fs-data on boot - # Permission for Secure NVM - chmod 0660 /dev/k250a - chown system system /dev/k250a - # DP AUX switch control chmod 0660 /sys/class/dp_sec/dp_sbu_sw_sel chown system system /sys/class/dp_sec/dp_sbu_sw_sel @@ -67,6 +63,10 @@ on boot chmod 0444 /sys/class/dp_sec/monitor_info chown system system /sys/class/dp_sec/monitor_info + # DP bandwidth code + chmod 0440 /sys/class/dp_sec/bw_code + chown system radio /sys/class/dp_sec/bw_code + on shutdown # service definition diff --git a/init/init.samsung.power.rc b/init/init.samsung.power.rc index 8dd5dd4..80ff6e0 100644 --- a/init/init.samsung.power.rc +++ b/init/init.samsung.power.rc @@ -1,5 +1,4 @@ - -# Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. +# Copyright (c) 2019-2023, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -41,18 +40,7 @@ on late-fs on post-fs-data on boot - write /sys/power/pm_debug_messages 1 - # Set online permission as system|system - chown system system /sys/devices/system/cpu/cpu3/online - chmod 0660 /sys/devices/system/cpu/cpu3/online - chown system system /sys/devices/system/cpu/cpu4/online - chmod 0660 /sys/devices/system/cpu/cpu4/online - chown system system /sys/devices/system/cpu/cpu5/online - chmod 0660 /sys/devices/system/cpu/cpu5/online - chown system system /sys/devices/system/cpu/cpu6/online - chmod 0660 /sys/devices/system/cpu/cpu6/online - chown system system /sys/devices/system/cpu/cpu7/online - chmod 0660 /sys/devices/system/cpu/cpu7/online + # limit driver chown radio system /sys/devices/system/cpu/cpufreq_limit/cpufreq_max_limit chown radio system /sys/devices/system/cpu/cpufreq_limit/cpufreq_min_limit chown radio system /sys/devices/system/cpu/cpufreq_limit/cpufreq_table @@ -63,44 +51,28 @@ on boot chmod 444 /sys/devices/system/cpu/cpufreq_limit/cpufreq_table chmod 664 /sys/devices/system/cpu/cpufreq_limit/over_limit chmod 664 /sys/devices/system/cpu/cpufreq_limit/limit_stat - chown system system /sys/class/sec/ap_pmic/chg_det + + chown system system /sys/class/sec/ap_pmic/ap_info + chmod 0400 /sys/class/sec/ap_pmic/ap_info + chown system system /sys/class/sec/ap_pmic/phot_info + chmod 0400 /sys/class/sec/ap_pmic/phot_info + chown system system /sys/class/sec/ap_pmic/manual_reset chown radio system /sys/class/sec/ap_pmic/wake_enabled chmod 664 /sys/class/sec/ap_pmic/wake_enabled - chown radio system /sys/class/sec/ap_pmic/volkey_wakeup - chmod 660 /sys/class/sec/ap_pmic/volkey_wakeup - write /sys/class/sec/ap_pmic/volkey_wakeup 1 + chown radio system /sys/class/sec/ap_pmic/gpio_dump chmod 664 /sys/class/sec/ap_pmic/gpio_dump - -# Permissions for IAFT - chown radio system /sys/power/iaft/enable_code - chown radio system /sys/power/iaft/enable_tid - chown radio system /sys/power/iaft/sleep_time - chmod 664 /sys/power/iaft/enable_code - chmod 664 /sys/power/iaft/enable_tid - chmod 664 /sys/power/iaft/sleep_time - - # Display PMIC - chown system system /sys/class/sec/disp_pmic/enable_fd - chmod 664 /sys/class/sec/disp_pmic/enable_fd - - # AP info - chown system system /sys/class/sec/ap_pmic/ap_info - chmod 0400 /sys/class/sec/ap_pmic/ap_info - - # Adaptive boost(silver) - chown system system /sys/devices/system/cpu/cpufreq/policy0/walt/adaptive_high_freq - chown system system /sys/devices/system/cpu/cpufreq/policy0/walt/adaptive_low_freq - chmod 664 /sys/devices/system/cpu/cpufreq/policy0/walt/adaptive_high_freq - chmod 664 /sys/devices/system/cpu/cpufreq/policy0/walt/adaptive_low_freq - on property:sys.boot_completed=1 - write /sys/class/secgpio_check/secgpio_check_all/gpioinit_call 1 - chmod 220 /dev/power_on_alarm + +on charger on shutdown # service definition # on property triggers + +on property:sys.boot_completed=1 + write /sys/class/secgpio_check/secgpio_check_all/gpioinit_call 1 + chmod 220 /dev/power_on_alarm diff --git a/init/init.samsung.rc b/init/init.samsung.rc index 2aa8f24..27c537a 100644 --- a/init/init.samsung.rc +++ b/init/init.samsung.rc @@ -1,51 +1,45 @@ +# Copyright (c) 2019-2023, The Linux Foundation. All rights reserved. # -# Copyright (C) 2023 The LineageOS Project +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# SPDX-License-Identifier: Apache-2.0 # import /vendor/etc/init/hw/init.samsung.bsp.rc -import /vendor/etc/init/hw/init.samsung.power.rc import /vendor/etc/init/hw/init.samsung.display.rc +import /vendor/etc/init/hw/init.samsung.${ro.binary.type}.rc import /vendor/etc/init/hw/init.samsung.dp.rc -import /vendor/etc/init/hw/init.samsung.connector.rc -import /vendor/etc/init/hw/init.samsung.firmware.rc +import /vendor/etc/init/hw/init.samsung.power.rc +import /vendor/etc/init/hw/init.qti.ss-ramdump.sh on early-init mkdir /mnt/vendor/efs 0771 radio system mkdir /mnt/vendor/persist 0771 root system - # foreground boost enable - mkdir /dev/cpuctl/foreground-boost/ - chown system system /dev/cpuctl/foreground-boost - chown system system /dev/cpuctl/foreground-boost/tasks - chown system system /dev/cpuctl/foreground-boost/cgroup.procs - chmod 0664 /dev/cpuctl/foreground-boost/tasks - chmod 0664 /dev/cpuctl/foreground-boost/cgroup.procs - - mkdir /dev/cpuset/foreground-boost - copy /dev/cpuset/cpus /dev/cpuset/foreground-boost/cpus - copy /dev/cpuset/mems /dev/cpuset/foreground-boost/mems - - chown system system /dev/cpuset/foreground-boost - chown system system /dev/cpuset/foreground-boost/tasks - chown system system /dev/cpuset/foreground-boost/cgroup.procs - chmod 0664 /dev/cpuset/foreground-boost/tasks - chmod 0664 /dev/cpuset/foreground-boost/cgroup.procs - - # set property to boost-optimize - setprop sys.perf.boostopt true - on init - symlink /dev/block/bootdevice/by-name/steady /dev/block/steady - symlink /dev/block/bootdevice/by-name/persistent /dev/block/persistent - - chown system system /dev/cpuset/foreground/cpus - chown system system /dev/cpuset/foreground-boost/cpus - chown system system /dev/cpuset/background/cpus - chmod 0664 /dev/cpuset/foreground/cpus - chmod 0664 /dev/cpuset/foreground-boost/cpus - chmod 0664 /dev/cpuset/background/cpus + symlink /dev/block/platform/soc/1d84000.ufshc/by-name/steady /dev/block/steady # Create carrier folder for HiddenMenu on post-fs @@ -68,16 +62,17 @@ on post-fs-data # sensors chown system system /mnt/vendor/persist/sensors/registry/registry/sns_cm - # Meta event chown system radio /sys/class/sensors/sensor_dev/flush # If AP debug_level is low, recovery mode for ALL peripheral will be endabled on post-fs-data && property:ro.boot.debug_level=0x4f4c setprop persist.vendor.ssr.restart_level ALL_ENABLE + setprop persist.vendor.ssr.enable_ramdumps 1 setprop persist.vendor.sensors.debug.hal_trigger_ssr true setprop persist.vendor.sensors.debug.hal_trigger_crash false +# Sensor property setting on post-fs-data && property:ro.boot.debug_level=0x494d setprop persist.vendor.sensors.debug.hal_trigger_crash true setprop persist.vendor.sensors.debug.hal_trigger_ssr false @@ -89,72 +84,30 @@ on post-fs-data && property:ro.boot.debug_level=0x4948 # Enable recovery mode for modem only (CP Ramdump OFF && dbg_level MID) on post-fs-data && property:ro.boot.cp_debug_level=0x55FF && property:ro.boot.debug_level=0x494d setprop persist.vendor.ssr.restart_level mss + setprop persist.vendor.ssr.enable_ramdumps 1 # Enable recovery mode for modem only (CP Ramdump OFF && dbg_level HI) on post-fs-data && property:ro.boot.cp_debug_level=0x55FF && property:ro.boot.debug_level=0x4948 setprop persist.vendor.ssr.restart_level mss + setprop persist.vendor.ssr.enable_ramdumps 1 # Disable recovery mode for modem only (CP Ramdump ON && dbg_level MID) on post-fs-data && property:ro.boot.cp_debug_level=0x5500 && property:ro.boot.debug_level=0x494d setprop persist.vendor.ssr.restart_level ALL_DISABLE + setprop persist.vendor.ssr.enable_ramdumps 0 # Disable recovery mode for modem only (CP Ramdump ON && dbg_level HI) on post-fs-data && property:ro.boot.cp_debug_level=0x5500 && property:ro.boot.debug_level=0x4948 setprop persist.vendor.ssr.restart_level ALL_DISABLE + setprop persist.vendor.ssr.enable_ramdumps 0 on early-boot on early-boot && property:ro.binary.type=factory - umount /vendor/vm-system + umount /product/vm-system on boot - # set cpuset value by performance team - write /dev/cpuset/top-app/cpus 0-7 - write /dev/cpuset/foreground/cpus 0-6 - write /dev/cpuset/background/cpus 0-2 - write /dev/cpuset/system-background/cpus 0-2 - write /dev/cpuset/sf/cpus 0-6 - write /dev/cpuset/foreground-boost 0-7 - # write /dev/cpuset/restricted/cpus 0-2 - # write /dev/cpuset/audio-app/cpus 0-3 - - # HyPer Permission - chown root system /dev/cpuctl/top-app/cpu.uclamp.min - chmod 0664 /dev/cpuctl/top-app/cpu.uclamp.min - chown root system /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_low_freq - chmod 0664 /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_low_freq - chown root system /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_high_freq - chmod 0664 /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_high_freq - chown root system /sys/devices/system/cpu/bus_dcvs/DDR/soc:qcom,memlat:ddr:prime-latfloor/max_freq - chmod 0664 /sys/devices/system/cpu/bus_dcvs/DDR/soc:qcom,memlat:ddr:prime-latfloor/max_freq - - # Perfmond Atrace Buffer Size - setprop debug.perfmond.atrace.buffer 16384 - - # System Performance Restricted cpuset - chown root system dev/cpuset/restricted/cpus - chmod 0664 /dev/cpuset/restricted/cpus - - # for BT MAC address - mkdir /mnt/vendor/efs/bluetooth 0770 system bluetooth - # if already exist - chown system bluetooth /mnt/vendor/efs/bluetooth - chown system bluetooth /mnt/vendor/efs/bluetooth/bt_addr - chmod 0770 /mnt/vendor/efs/bluetooth - chmod 0660 /mnt/vendor/efs/bluetooth/bt_addr - - # permissions for bluetooth. - setprop ro.bt.bdaddr_path "/mnt/vendor/efs/bluetooth/bt_addr" - chown bluetooth bluetooth ro.bt.bdaddr_path - - # Allow access to emmc rawdump block partition and dload sysfs node - chown root system /dev/block/bootdevice/by-name/rawdump - chmod 0660 /dev/block/bootdevice/by-name/rawdump - -# For CDSP crash -on property:ro.boot.debug_level=0x494d - setprop vendor.fastrpc.process.attrs 0x40000001 - setprop vendor.fastrpc.debug.trace 1 + write /sys/power/pm_debug_messages 1 service factory_ssc /vendor/bin/factory.ssc class core @@ -164,5 +117,3 @@ service factory_ssc /vendor/bin/factory.ssc on property:sys.boot_completed=1 setprop ro.factory.sensor.delay.init 1 - # Enable PowerHAL hint processing - setprop vendor.powerhal.init 1 diff --git a/init/init.target.rc b/init/init.target.rc index 2199c0d..4a9d992 100644 --- a/init/init.target.rc +++ b/init/init.target.rc @@ -28,7 +28,7 @@ # # # Changes from Qualcomm Innovation Center are provided under the following license: -# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. +# Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted (subject to the limitations in the @@ -62,13 +62,50 @@ import /vendor/etc/init/hw/init.qti.kernel.rc -import /vendor/etc/init/hw/init.samsung.rc +import /vendor/etc/init/hw/init.${ro.product.vendor.brand}.rc import /vendor/etc/init/hw/init.${ro.product.vendor.device}.rc import /vendor/etc/init/hw/init.${ro.product.vendor.name}.rc on early-init write /proc/sys/kernel/printk_devkmsg ratelimited export MEMTAG_OPTIONS off + write /proc/sys/kernel/sched_util_clamp_min_rt_default 0 + + # foreground-boost + mkdir /dev/cpuctl/foreground-boost + chown system system /dev/cpuctl/foreground-boost + chown system system /dev/cpuctl/foreground-boost/tasks + chmod 0664 /dev/cpuctl/foreground-boost/tasks + chown system system /dev/cpuctl/foreground-boost/cgroup.procs + chmod 0664 /dev/cpuctl/foreground-boost/cgroup.procs + + mkdir /dev/cpuset/foreground-boost + copy /dev/cpuset/cpus /dev/cpuset/foreground-boost/cpus + copy /dev/cpuset/mems /dev/cpuset/foreground-boost/mems + chown root system /dev/cpuset/foreground-boost + chown root system /dev/cpuset/foreground-boost/tasks + chmod 0664 /dev/cpuset/foreground-boost/tasks + chown root system /dev/cpuset/foreground-boost/cgroup.procs + chmod 0664 /dev/cpuset/foreground-boost/cgroup.procs + chown root system /dev/cpuset/foreground-boost/cpus + chmod 0664 /dev/cpuset/foreground-boost/cpus + chown root system /dev/cpuctl/foreground-boost/cpu.shares + chmod 0664 /dev/cpuctl/foreground-boost/cpu.shares + + # set property to boost-optimize + setprop sys.perf.boostopt true + # set property to animation vi boost + setprop sys.perf.viboost true + + # midground set + mkdir /dev/cpuset/midground + copy /dev/cpuset/cpus /dev/cpuset/midground/cpus + copy /dev/cpuset/mems /dev/cpuset/midground/mems + chown root system /dev/cpuset/midground/cgroup.procs + chmod 0664 /dev/cpuset/midground/cgroup.procs + chown root system /dev/cpuset/midground/cpus + chmod 0664 /dev/cpuset/midground/cpus + write /dev/cpuset/midground/cpus 0-5 on init wait /dev/block/platform/soc/${ro.boot.bootdevice} @@ -77,28 +114,57 @@ on init chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8 start logd + mkdir /dev/cpuctl/general + copy_per_line /dev/cpuctl/tasks /dev/cpuctl/general/tasks + chown root system /dev/cpuctl/general + chown root system /dev/cpuctl/general/tasks + chmod 0644 /dev/cpuctl/general/tasks + chown root system /dev/cpuctl/general/cpu.shares + chmod 0664 /dev/cpuctl/general/cpu.shares + chown root system /dev/cpuctl/foreground-boost/cpu.shares + chmod 0664 /dev/cpuctl/foreground-boost/cpu.shares + + # hyper for VIDEO_POWER_EFFICIENCY + chmod 0660 /sys/devices/system/cpu/cpu6/core_ctl/assist_cpu_min_misfit + chown root system /sys/devices/system/cpu/cpu6/core_ctl/assist_cpu_min_misfit + chmod 0660 /sys/devices/system/cpu/cpu6/core_ctl/nrrun_cpu_min_misfit + chown root system /sys/devices/system/cpu/cpu6/core_ctl/nrrun_cpu_min_misfit + + # set property for auto sched pipeline + setprop sys.perf.asp true + on early-fs start vold on fs - start hwservicemanager mount_all /vendor/etc/fstab.qcom --early chown root system /mnt/vendor/persist chmod 0771 /mnt/vendor/persist restorecon_recursive /mnt/vendor/persist - mkdir /mnt/vendor/persist/secnvm 0770 system system mkdir /mnt/vendor/persist/data 0700 system system on post-fs #Execute virtualization manager - enable vendor.qvirtmgr - start vendor.qvirtmgr + on property:ro.vendor.vm.ssr.enable= + enable vendor.qvirtservice_rs + start vendor.qvirtservice_rs + on property:ro.vendor.vm.ssr.enable=false + enable vendor.qvirtservice_rs + start vendor.qvirtservice_rs + on property:ro.vendor.vm.ssr.enable=true + enable vendor.qvirtservice_rs + start vendor.qvirtservice_rs + enable vendor.qvirtvendorservice + start vendor.qvirtvendorservice on late-fs + #exec_start wait_for_keymaster mount_all /vendor/etc/fstab.qcom --late on post-fs-data mkdir /vendor/data/tombstones 0771 system system + # Wait (1 second at most) for 'fs_ready' entry to be created + wait /sys/kernel/cnss/fs_ready 1 # Enable WLAN cold boot calibration write /sys/kernel/cnss/fs_ready 1 @@ -106,7 +172,18 @@ on early-boot verity_update_state on boot - write /dev/cpuset/audio-app/cpus 1-2 + write /dev/cpuset/audio-app/cpus 0-1 + # Add a cpuset for the camera daemon + # We want all cores for camera + mkdir /dev/cpuset/camera-daemon + write /dev/cpuset/camera-daemon/cpus 0-7 + write /dev/cpuset/camera-daemon/mems 0 + chown cameraserver cameraserver /dev/cpuset/camera-daemon + chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks + chmod 0664 /dev/cpuset/camera-daemon/tasks + chown cameraserver system /dev/cpuctl/camera-daemon/cpu.shares + chmod 0664 /dev/cpuctl/camera-daemon/cpu.shares + chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable chown system /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable @@ -114,6 +191,38 @@ on boot chown system /sys/devices/system/cpu/hyp_core_ctl/enable chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq + # Hyper Permission for SM8750 + chmod 0664 /sys/devices/system/cpu/bus_dcvs/DDR/soc:qcom,memlat:ddr:prime-latfloor/max_freq + chown root system /sys/devices/system/cpu/bus_dcvs/DDR/soc:qcom,memlat:ddr:prime-latfloor/max_freq + chmod 0664 /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_high_freq + chown root system /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_high_freq + chmod 0664 /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_low_freq + chown root system /sys/devices/system/cpu/bus_dcvs/DDR/memlat/adaptive_low_freq + chmod 0664 /dev/cpuctl/top-app/cpu.uclamp.min + chown root system /dev/cpuctl/top-app/cpu.uclamp.min + + # bg uclamp set + write /dev/cpuctl/background/cpu.uclamp.max 26 + + # CPUSET by system performance + write /dev/cpuset/foreground-boost/cpus 0-7 + + write /dev/cpuset/foreground/cpus 0-5 + write /dev/cpuset/sf/cpus 0-5 + write /dev/cpuset/midground/cpus 0-1,4-5 + write /dev/cpuset/restricted/cpus 0-1,4-5 + write /dev/cpuset/system-background/cpus 0-1,4-5 + write /dev/cpuset/background/cpus 0-1,4-5 + +# For CDSP crash +on property:ro.boot.debug_level=0x494d + setprop vendor.fastrpc.process.attrs 1 + setprop vendor.fastrpc.debug.trace 1 + setprop persist.vendor.fastrpc.process.clockvote 4 + +on property:ro.boot.debug_level=0x4f4c + setprop persist.vendor.fastrpc.process.clockvote 4 + on property:vendor.display.lcd_density=560 setprop dalvik.vm.heapgrowthlimit 256m @@ -123,8 +232,6 @@ on property:vendor.display.lcd_density=640 on init && property:ro.boot.mode=charger wait_for_prop vendor.all.modules.ready 1 mount_all /vendor/etc/charger_fw_fstab.qti --early - wait /sys/kernel/boot_adsp/boot - write /sys/kernel/boot_adsp/boot 1 on charger start vendor.power_off_alarm @@ -155,10 +262,10 @@ service vendor.per_proxy /vendor/bin/pm-proxy group system disabled -service vendor.mdm_helper /vendor/bin/mdm_helper - class core - group system wakelock - disabled +#service vendor.mdm_helper /vendor/bin/mdm_helper +# class core +# group system wakelock +# disabled service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh class core @@ -171,38 +278,15 @@ on property:sys.shutdown.requested=* write /sys/kernel/qcom_rproc/shutdown_in_progress 1 stop vendor.per_proxy +on property:vold.decrypt=trigger_restart_framework + start vendor.cnss_diag + +service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM + class main + user system + group system wifi inet sdcard_rw media_rw diag + oneshot + on early-boot && property:persist.vendor.pcie.boot_option=* write /sys/bus/platform/devices/1c00000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option} write /sys/bus/platform/devices/1c08000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option} - -service fan_control_turn_on /vendor/bin/fan_service 1 - class late_start - user root - disabled - oneshot - -service fan_control_turn_off /vendor/bin/fan_service 0 - class late_start - user root - disabled - oneshot - -service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service - override - class hal - user audioserver - # media gid needed for /dev/fm (radio) and for /data/misc/media (tee) - group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock oem_2912 - capabilities BLOCK_SUSPEND SYS_NICE - # setting RLIMIT_RTPRIO allows binder RT priority inheritance - rlimit rtprio 10 10 - ioprio rt 4 - task_profiles ProcessCapacityHigh HighPerformance - onrestart restart audioserver - -service vendor.audioadsprpcd_audiopd /vendor/bin/audioadsprpcd audiopd - override - class main - user media - group media - setenv ADSP_LIBRARY_PATH ";/system/lib/rfsa/adsp;/system/vendor/lib/rfsa/adsp;/dsp;/vendor/dsp;/odm/lib/rfsa/adsp;/vendor/lib/rfsa/adsp" diff --git a/overlay/CarrierConfigResCommon/res/xml/vendor.xml b/overlay/CarrierConfigResCommon/res/xml/vendor.xml index 66ec7dc..1d879dc 100644 --- a/overlay/CarrierConfigResCommon/res/xml/vendor.xml +++ b/overlay/CarrierConfigResCommon/res/xml/vendor.xml @@ -16,7 +16,7 @@ - + diff --git a/overlay/FrameworksResTarget/res/values/config.xml b/overlay/FrameworksResTarget/res/values/config.xml index baa10f0..55183ac 100644 --- a/overlay/FrameworksResTarget/res/values/config.xml +++ b/overlay/FrameworksResTarget/res/values/config.xml @@ -15,7 +15,7 @@ - false + true - 3 + 5 true diff --git a/overlay/WifiResTarget/AndroidManifest.xml b/overlay/WifiResTarget/AndroidManifest.xml index 7c223ae..ac60093 100644 --- a/overlay/WifiResTarget/AndroidManifest.xml +++ b/overlay/WifiResTarget/AndroidManifest.xml @@ -9,5 +9,5 @@ android:isStatic="true" android:priority="500" android:requiredSystemPropertyName="ro.boot.product.vendor.sku" - android:requiredSystemPropertyValue="kalama"/> + android:requiredSystemPropertyValue="sun"/> diff --git a/overlay/WifiResTarget_spf/AndroidManifest.xml b/overlay/WifiResTarget_spf/AndroidManifest.xml index 422b3eb..cc561a2 100644 --- a/overlay/WifiResTarget_spf/AndroidManifest.xml +++ b/overlay/WifiResTarget_spf/AndroidManifest.xml @@ -3,7 +3,7 @@ SPDX-License-Identifier: Apache-2.0 --> + package="com.android.wifi.resources.overlay.sun">