Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
322d479725 | ||
|
|
bec5c3db94 | ||
|
|
03020b1274 | ||
|
|
f1a3425044 | ||
|
|
c86d19e751 | ||
|
|
f0aadfa60b | ||
|
|
ba508fb9b1 | ||
|
|
f4b9b7ec70 | ||
|
|
62c94dd951 | ||
|
|
07c435fcef | ||
|
|
7ee3bb7a27 | ||
|
|
fc00311470 | ||
|
|
aa778f553e | ||
|
|
f2f4b2efeb | ||
|
|
97ad4295ad | ||
|
|
31347a73ae | ||
|
|
3f09ced1c3 | ||
|
|
57bd82fae0 | ||
|
|
734f657643 | ||
|
|
54110ba528 | ||
|
|
2b590106d8 | ||
|
|
4cc2bb90a5 | ||
|
|
94a2d2d549 | ||
|
|
53235bff5d | ||
|
|
dcc5969fcf | ||
|
|
3f7b24dcc4 | ||
|
|
a0aa628a70 | ||
|
|
6f5c8ec0b9 | ||
|
|
c593366c84 | ||
|
|
fdeab87c41 | ||
|
|
876a6995c0 | ||
|
|
9c289210e7 | ||
|
|
c2e6f2c3fa | ||
|
|
b9ae99763f | ||
|
|
13f0771051 | ||
|
|
d4604d0118 | ||
|
|
e15d64f9ce | ||
|
|
92420c6671 | ||
|
|
8e246fa93d | ||
|
|
429276cfc3 | ||
|
|
c2022b22aa | ||
|
|
ab84d06a1e | ||
|
|
515b2f56a9 | ||
|
|
2944336369 | ||
|
|
0a644f80f7 | ||
|
|
6400ddd42c | ||
|
|
70872e0ab5 | ||
|
|
08b0e35987 | ||
|
|
5e67a4196c | ||
|
|
ee195f20f4 | ||
|
|
6f7cc1fbb9 | ||
|
|
44fb5a2df1 | ||
|
|
16098b0773 | ||
|
|
fb21864a2d | ||
|
|
be6ce4538a | ||
|
|
a03ace867d | ||
|
|
e58327b53c | ||
|
|
7d7d9f44b1 | ||
|
|
6ee1b45e9c | ||
|
|
8ffc9e22cd | ||
|
|
1c166492b4 | ||
|
|
d7334688bb |
@@ -1,4 +1,7 @@
|
||||
soong_namespace {
|
||||
imports: [
|
||||
"hardware/qcom-caf/sm8150",
|
||||
],
|
||||
}
|
||||
|
||||
install_symlink {
|
||||
|
||||
13
Android.mk
13
Android.mk
@@ -1,13 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2021 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifeq ($(TARGET_DEVICE),sweet)
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
endif
|
||||
@@ -7,6 +7,12 @@
|
||||
# Inherit from sm6150-common
|
||||
include device/xiaomi/sm6150-common/BoardConfigCommon.mk
|
||||
|
||||
# Inherit from Dolby
|
||||
-include device/oneplus/dolby/BoardConfig.mk
|
||||
|
||||
# MiuiCamera
|
||||
-include device/xiaomi/miuicamera-sweet/BoardConfig.mk
|
||||
|
||||
DEVICE_PATH := device/xiaomi/sweet
|
||||
|
||||
# Assert
|
||||
@@ -15,11 +21,34 @@ TARGET_OTA_ASSERT_DEVICE := sweet,sweetin
|
||||
# Audio
|
||||
TARGET_PROVIDES_AUDIO_EXTNS := true
|
||||
|
||||
# Broken Rules
|
||||
ifneq ($(TARGET_BUILD_VARIANT), user)
|
||||
BUILD_BROKEN_CLANG_PROPERTY := true
|
||||
BUILD_BROKEN_CLANG_ASFLAGS := true
|
||||
BUILD_BROKEN_CLANG_CFLAGS := true
|
||||
BUILD_BROKEN_DEPFILE := true
|
||||
BUILD_BROKEN_DUP_RULES := true
|
||||
BUILD_BROKEN_DUP_SYSPROP := true
|
||||
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
BUILD_BROKEN_ENFORCE_SYSPROP_OWNER := true
|
||||
BUILD_BROKEN_INPUT_DIR_MODULES := true
|
||||
BUILD_BROKEN_MISSING_REQUIRED_MODULES := true
|
||||
BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS := true
|
||||
BUILD_BROKEN_PREBUILT_ELF_FILES := true
|
||||
# BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true
|
||||
BUILD_BROKEN_USES_NETWORK := true
|
||||
BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE := true
|
||||
BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES := true
|
||||
BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true
|
||||
# BUILD_BROKEN_GENRULE_SANDBOXING := true
|
||||
BUILD_BROKEN_DONT_CHECK_SYSTEMSDK := true
|
||||
endif
|
||||
|
||||
# HIDL
|
||||
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/hidl/manifest.xml
|
||||
|
||||
# Kernel
|
||||
TARGET_KERNEL_CONFIG += vendor/sweet.config
|
||||
TARGET_KERNEL_CONFIG += sweet_defconfig
|
||||
|
||||
# Partitions
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728
|
||||
@@ -35,10 +64,11 @@ TARGET_ODM_PROP += $(DEVICE_PATH)/properties/odm.prop
|
||||
TARGET_VENDOR_PROP += $(DEVICE_PATH)/properties/vendor.prop
|
||||
|
||||
# Screen density
|
||||
TARGET_SCREEN_DENSITY := 440
|
||||
TARGET_SCREEN_DENSITY := 410
|
||||
|
||||
# Vendor security patch level
|
||||
VENDOR_SECURITY_PATCH := 2023-11-01
|
||||
# Security patch level
|
||||
BOOT_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
|
||||
VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
|
||||
|
||||
# Inherit from proprietary files
|
||||
include vendor/xiaomi/sweet/BoardConfigVendor.mk
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" acdb_id="10"/>
|
||||
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" acdb_id="10"/>
|
||||
<device name="SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET" acdb_id="45"/>
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_MIC_AEC" acdb_id="111"/>
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_MIC_NS" acdb_id="111"/>
|
||||
<device name="SND_DEVICE_IN_UNPROCESSED_USB_HEADSET_MIC" acdb_id="133"/>
|
||||
<device name="SND_DEVICE_IN_UNPROCESSED_MIC" acdb_id="143"/>
|
||||
<device name="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC" acdb_id="144"/>
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--- Copyright (c) 2014-2018, 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 -->
|
||||
<!--- 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. -->
|
||||
|
||||
<mixer>
|
||||
<!-- These are the initial mixer settings -->
|
||||
<ctl name="LSM1 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM2 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM3 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM4 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM5 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM6 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM7 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM8 Mixer TX_CDC_DMA_TX_3" value="0" />
|
||||
<ctl name="LSM1 Port" value="None" />
|
||||
<ctl name="LSM2 Port" value="None" />
|
||||
<ctl name="LSM3 Port" value="None" />
|
||||
<ctl name="LSM4 Port" value="None" />
|
||||
<ctl name="LSM5 Port" value="None" />
|
||||
<ctl name="LSM6 Port" value="None" />
|
||||
<ctl name="LSM7 Port" value="None" />
|
||||
<ctl name="LSM8 Port" value="None" />
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="None" />
|
||||
<ctl name="TX_CDC_DMA_TX_3 Channels" value="One" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC0" value="0" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC1" value="0" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC2" value="0" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC3" value="0" />
|
||||
<ctl name="TX DEC0 MUX" value="MSM_DMIC" />
|
||||
<ctl name="TX DMIC MUX0" value="ZERO" />
|
||||
<ctl name="TX DEC1 MUX" value="MSM_DMIC" />
|
||||
<ctl name="TX DMIC MUX1" value="ZERO" />
|
||||
<ctl name="TX DEC2 MUX" value="MSM_DMIC" />
|
||||
<ctl name="TX DMIC MUX2" value="ZERO" />
|
||||
<ctl name="TX DEC3 MUX" value="MSM_DMIC" />
|
||||
<ctl name="TX DMIC MUX3" value="ZERO" />
|
||||
<ctl name="AUDIO_REF_EC_UL1 MUX" value="None"/>
|
||||
<ctl name="EC Reference Channels" value="One"/>
|
||||
<ctl name="EC Reference Bit Format" value="0"/>
|
||||
<ctl name="EC Reference SampleRate" value="0"/>
|
||||
<ctl name="TX_DEC0 Volume" value="84" />
|
||||
<ctl name="TX_DEC1 Volume" value="84" />
|
||||
<ctl name="TX_DEC2 Volume" value="84" />
|
||||
<ctl name="TX_DEC3 Volume" value="84" />
|
||||
|
||||
<path name="listen-voice-wakeup-1">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM1 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM1 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-2">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM2 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM2 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-3">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM3 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM3 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-4">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM4 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM4 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-5">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM5 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM5 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-6">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM6 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM6 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-7">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM7 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM7 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-8">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM8 Port" value="TX_CDC_DMA_TX_3" />
|
||||
<ctl name="LSM8 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-1 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM1 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM1 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-2 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM2 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM2 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-3 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM3 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM3 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-4 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM4 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM4 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-5 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM5 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM5 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-6 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM6 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM6 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-7 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM7 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM7 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-voice-wakeup-8 preproc">
|
||||
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
|
||||
<ctl name="LSM8 Port" value="ADM_LSM_TX" />
|
||||
<ctl name="LSM8 Mixer TX_CDC_DMA_TX_3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="listen-ape-handset-mic">
|
||||
<ctl name="TX_CDC_DMA_TX_3 Channels" value="One" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
|
||||
<ctl name="TX_DEC0 Volume" value="102" />
|
||||
<ctl name="TX DMIC MUX0" value="DMIC2" />
|
||||
</path>
|
||||
|
||||
<path name="listen-ape-handset-mic-preproc">
|
||||
<path name="listen-ape-handset-mic"/>
|
||||
</path>
|
||||
|
||||
<path name="listen-ape-handset-dmic">
|
||||
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Two" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
|
||||
<ctl name="TX_DEC0 Volume" value="102" />
|
||||
<ctl name="TX_DEC1 Volume" value="102" />
|
||||
<ctl name="TX DMIC MUX0" value="DMIC2" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
|
||||
<ctl name="TX DMIC MUX1" value="DMIC3" />
|
||||
</path>
|
||||
|
||||
<path name="listen-ape-handset-tmic">
|
||||
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Three" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
|
||||
<ctl name="TX_DEC0 Volume" value="102" />
|
||||
<ctl name="TX_DEC1 Volume" value="102" />
|
||||
<ctl name="TX_DEC2 Volume" value="102" />
|
||||
<ctl name="TX DMIC MUX0" value="DMIC2" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
|
||||
<ctl name="TX DMIC MUX1" value="DMIC0" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
|
||||
<ctl name="TX DMIC MUX2" value="DMIC3" />
|
||||
</path>
|
||||
|
||||
<path name="listen-ape-handset-qmic">
|
||||
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Four" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
|
||||
<ctl name="TX_DEC0 Volume" value="102" />
|
||||
<ctl name="TX_DEC1 Volume" value="102" />
|
||||
<ctl name="TX_DEC2 Volume" value="102" />
|
||||
<ctl name="TX_DEC3 Volume" value="102" />
|
||||
<ctl name="TX DMIC MUX0" value="DMIC2" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
|
||||
<ctl name="TX DMIC MUX1" value="DMIC0" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
|
||||
<ctl name="TX DMIC MUX2" value="DMIC3" />
|
||||
<ctl name="TX_AIF1_CAP Mixer DEC3" value="1" />
|
||||
<ctl name="TX DMIC MUX3" value="DMIC1" />
|
||||
</path>
|
||||
|
||||
<path name="echo-reference">
|
||||
<ctl name="AUDIO_REF_EC_UL1 MUX" value="WSA_CDC_DMA_RX_0"/>
|
||||
<ctl name="EC Reference Channels" value="Two"/>
|
||||
<ctl name="EC Reference Bit Format" value="S16_LE"/>
|
||||
<ctl name="EC Reference SampleRate" value="48000"/>
|
||||
</path>
|
||||
|
||||
<path name="echo-reference a2dp">
|
||||
<ctl name="AUDIO_REF_EC_UL1 MUX" value="SLIM_7_RX"/>
|
||||
<ctl name="EC Reference Channels" value="Two"/>
|
||||
<ctl name="EC Reference Bit Format" value="S16_LE"/>
|
||||
<ctl name="EC Reference SampleRate" value="48000"/>
|
||||
</path>
|
||||
|
||||
</mixer>
|
||||
@@ -1,4 +1,4 @@
|
||||
<manifest version="2.0" type="device" target-level="5" >
|
||||
<manifest version="2.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.sensors</name>
|
||||
<transport>hwbinder</transport>
|
||||
|
||||
@@ -20,12 +20,29 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPULittleClusterUpRateLimit",
|
||||
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us",
|
||||
"Values": [
|
||||
"500",
|
||||
"2000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPULittleClusterDownRateLimit",
|
||||
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us",
|
||||
"Values": [
|
||||
"20000",
|
||||
"2000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBigClusterMaxFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1939200",
|
||||
"1555200"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
@@ -36,40 +53,47 @@
|
||||
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1555200",
|
||||
"1248000",
|
||||
"652800"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "GPUMaxFreq",
|
||||
"Path": "/sys/class/kgsl/kgsl-3d0/max_pwrlevel",
|
||||
"Name": "CPUBigClusterUpRateLimit",
|
||||
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us",
|
||||
"Values": [
|
||||
"0",
|
||||
"3"
|
||||
"500",
|
||||
"2000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBigClusterDownRateLimit",
|
||||
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us",
|
||||
"Values": [
|
||||
"10000",
|
||||
"2000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "GPUMaxFreq",
|
||||
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/max_freq",
|
||||
"Values": [
|
||||
"800000000",
|
||||
"650000000"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "GPUMinFreq",
|
||||
"Path": "/sys/class/kgsl/kgsl-3d0/min_pwrlevel",
|
||||
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/min_freq",
|
||||
"Values": [
|
||||
"0",
|
||||
"3",
|
||||
"7"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "GPUBusMinFreq",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,gpubw/min_freq",
|
||||
"Values": [
|
||||
"6881",
|
||||
"5931",
|
||||
"3879",
|
||||
"0"
|
||||
"800000000",
|
||||
"650000000",
|
||||
"565000000",
|
||||
"430000000",
|
||||
"267000000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
@@ -100,13 +124,35 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "FgSchedtunePreferIdle",
|
||||
"Path": "/dev/stune/foreground/schedtune.prefer_idle",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "BgSchedtunePreferIdle",
|
||||
"Path": "/dev/stune/background/schedtune.prefer_idle",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "TASchedtuneBoost",
|
||||
"Path": "/dev/stune/top-app/schedtune.boost",
|
||||
"Values": [
|
||||
"40",
|
||||
"10"
|
||||
"10",
|
||||
"0"
|
||||
],
|
||||
"DefaultIndex": 1,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
@@ -118,6 +164,16 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "TASchedtunePreferIdle",
|
||||
"Path": "/dev/stune/top-app/schedtune.prefer_idle",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWHystTriggerCount",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hyst_trigger_count",
|
||||
@@ -145,32 +201,13 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWSampleMs",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/sample_ms",
|
||||
"Values": [
|
||||
"10",
|
||||
"4"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWIOPercent",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/io_percent",
|
||||
"Values": [
|
||||
"80",
|
||||
"34"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBWMinFreq",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq",
|
||||
"Values": [
|
||||
"14236",
|
||||
"9155",
|
||||
"7110",
|
||||
"4577"
|
||||
"2288"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
@@ -184,33 +221,6 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "LLCCBWSampleMs",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/sample_ms",
|
||||
"Values": [
|
||||
"10",
|
||||
"4"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "LLCCBWHistMemory",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hist_memory",
|
||||
"Values": [
|
||||
"0",
|
||||
"20"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "LLCCBWHystLength",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_length",
|
||||
"Values": [
|
||||
"0",
|
||||
"10"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "L3LittleClusterMinFreq",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq",
|
||||
@@ -220,15 +230,6 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "LLCCBWHystTriggerCount",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_trigger_count",
|
||||
"Values": [
|
||||
"0",
|
||||
"3"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "L3BigClusterMinFreq",
|
||||
"Path": "/sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/min_freq",
|
||||
@@ -238,31 +239,13 @@
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "PMQoSCpuDmaLatency",
|
||||
"Path": "/dev/cpu_dma_latency",
|
||||
"Values": [
|
||||
"44",
|
||||
"100"
|
||||
],
|
||||
"HoldFd": true
|
||||
},
|
||||
{
|
||||
"Name": "EnergyAware",
|
||||
"Path": "/proc/sys/kernel/sched_energy_aware",
|
||||
"Values": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "DoubleTapToWakeEnable",
|
||||
"Path": "/sys/devices/virtual/touch/touch_dev/double_tap",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "PowerHALMainState",
|
||||
@@ -273,15 +256,6 @@
|
||||
],
|
||||
"Type": "Property"
|
||||
},
|
||||
{
|
||||
"Name": "PowerHALAudioState",
|
||||
"Path": "vendor.powerhal.audio",
|
||||
"Values": [
|
||||
"AUDIO_STREAMING_LOW_LATENCY",
|
||||
""
|
||||
],
|
||||
"Type": "Property"
|
||||
},
|
||||
{
|
||||
"Name": "PowerHALRenderingState",
|
||||
"Path": "vendor.powerhal.rendering",
|
||||
@@ -315,7 +289,67 @@
|
||||
"PowerHint": "SUSTAINED_PERFORMANCE",
|
||||
"Node": "GPUMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "3"
|
||||
"Value": "800000000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPULittleClusterMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "GPUMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "800000000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "800000000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTIVE",
|
||||
"Node": "CPULittleClusterUpRateLimit",
|
||||
"Duration": 0,
|
||||
"Value": "500"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTIVE",
|
||||
"Node": "CPULittleClusterDownRateLimit",
|
||||
"Duration": 0,
|
||||
"Value": "20000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTIVE",
|
||||
"Node": "CPUBigClusterUpRateLimit",
|
||||
"Duration": 0,
|
||||
"Value": "500"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTIVE",
|
||||
"Node": "CPUBigClusterDownRateLimit",
|
||||
"Duration": 0,
|
||||
"Value": "10000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
@@ -365,114 +399,84 @@
|
||||
"Duration": 0,
|
||||
"Value": "2597"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "EnergyAware",
|
||||
"Duration": 3000,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPULittleClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "PMQoSCpuDmaLatency",
|
||||
"Duration": 3000,
|
||||
"Value": "44"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUBWHystTriggerCount",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUBWHystLength",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUBWHistMemory",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUBWMinFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "14236"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "GPUForceClkOn",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "GPUForceRailOn",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "GPUIdleTimer",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "10000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "LLCCBWMinFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "6881"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "L3LittleClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "1459200000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "L3BigClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Duration": 5000,
|
||||
"Value": "1459200000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "AUDIO_LAUNCH",
|
||||
"Node": "PMQoSCpuDmaLatency",
|
||||
"Duration": 2000,
|
||||
"Value": "44"
|
||||
},
|
||||
{
|
||||
"PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
|
||||
"Node": "PowerHALAudioState",
|
||||
"Duration": 0,
|
||||
"Value": "AUDIO_STREAMING_LOW_LATENCY"
|
||||
},
|
||||
{
|
||||
"PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
|
||||
"Node": "PMQoSCpuDmaLatency",
|
||||
"Duration": 0,
|
||||
"Value": "44"
|
||||
},
|
||||
{
|
||||
"PowerHint": "EXPENSIVE_RENDERING",
|
||||
"Node": "PowerHALRenderingState",
|
||||
@@ -483,19 +487,43 @@
|
||||
"PowerHint": "EXPENSIVE_RENDERING",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
"Value": "800000000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "EXPENSIVE_RENDERING",
|
||||
"Node": "GPUMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "800000000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_INACTIVE",
|
||||
"Node": "TASchedtuneBoost",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "TPU_BOOST",
|
||||
"Node": "PMQoSCpuDmaLatency",
|
||||
"Duration": 2000,
|
||||
"Value": "44"
|
||||
"PowerHint": "DISPLAY_INACTIVE",
|
||||
"Node": "FgSchedtunePreferIdle",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_INACTIVE",
|
||||
"Node": "BgSchedtunePreferIdle",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_INACTIVE",
|
||||
"Node": "TASchedtunePreferIdle",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_INACTIVE",
|
||||
"Node": "TASchedtuneHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DOUBLE_TAP_TO_WAKE",
|
||||
|
||||
32
device.mk
32
device.mk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2021-2024 The LineageOS Project
|
||||
# Copyright (C) 2021-2025 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -7,6 +7,16 @@
|
||||
# Inherit from sm6150-common
|
||||
$(call inherit-product, device/xiaomi/sm6150-common/sm6150.mk)
|
||||
|
||||
# Inherit from dolby
|
||||
$(call inherit-product-if-exists, device/oneplus/dolby/device.mk)
|
||||
|
||||
# MiuiCamera
|
||||
$(call inherit-product-if-exists, device/xiaomi/miuicamera-sweet/device.mk)
|
||||
|
||||
# AAPT
|
||||
PRODUCT_AAPT_CONFIG := normal
|
||||
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
|
||||
|
||||
# API level, the device has been commercially launched on
|
||||
PRODUCT_SHIPPING_API_LEVEL := 30
|
||||
|
||||
@@ -18,8 +28,7 @@ PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
|
||||
$(LOCAL_PATH)/configs/audio/mixer_paths_idp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_idp.xml \
|
||||
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_dynamic.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_dynamic.xml \
|
||||
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_static.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_static.xml \
|
||||
$(LOCAL_PATH)/configs/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml
|
||||
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_static.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_static.xml
|
||||
|
||||
# Display
|
||||
PRODUCT_COPY_FILES += \
|
||||
@@ -27,12 +36,25 @@ PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/display/qdcm_calib_data_xiaomi_k6_38_0e_0b_fhd_dsc_video_dsi_panel.xml:$(TARGET_COPY_OUT_VENDOR)/etc/qdcm_calib_data_xiaomi_k6_38_0e_0b_fhd_dsc_video_dsi_panel.xml
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
hwcomposer.qcom
|
||||
hwcomposer.sweet
|
||||
|
||||
# Dolby
|
||||
TARGET_USES_DOLBY := true
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
DSPVolumeSynchronizer
|
||||
|
||||
# Init
|
||||
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_sweet)
|
||||
|
||||
# Init scripts
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.sweet.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.sweet.rc
|
||||
|
||||
# KProfiles
|
||||
PRODUCT_PACKAGES += \
|
||||
KProfiles
|
||||
|
||||
# NFC
|
||||
PRODUCT_PACKAGES += \
|
||||
com.android.nfc_extras \
|
||||
@@ -52,7 +74,7 @@ PRODUCT_COPY_FILES += \
|
||||
|
||||
# IR
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.ir-service.xiaomi
|
||||
android.hardware.ir-service.lineage
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
|
||||
|
||||
13
display/Android.bp
Normal file
13
display/Android.bp
Normal file
@@ -0,0 +1,13 @@
|
||||
cc_library_shared {
|
||||
name: "hwcomposer.sweet",
|
||||
vendor: true,
|
||||
relative_install_path: "hw",
|
||||
|
||||
shared_libs: [
|
||||
"hwcomposer.qcom",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"display_builtin.cpp",
|
||||
],
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := hwcomposer.qcom
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SHARED_LIBRARIES := hwcomposer.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_SRC_FILES := display_builtin.cpp
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
68
evolution.dependencies
Normal file
68
evolution.dependencies
Normal file
@@ -0,0 +1,68 @@
|
||||
[
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "SoulEye-sweet/device_xiaomi_sm6150-common",
|
||||
"target_path": "device/xiaomi/sm6150-common",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "SoulEye-sweet/device_xiaomi_miuicamera-sweet",
|
||||
"target_path": "device/xiaomi/miuicamera-sweet",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "codeberg",
|
||||
"repository": "SoulEye-sweet/vendor_xiaomi_sweet",
|
||||
"target_path": "vendor/xiaomi/sweet",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "codeberg",
|
||||
"repository": "SoulEye-sweet/vendor_xiaomi_sm6150-common",
|
||||
"target_path": "vendor/xiaomi/sm6150-common",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "codeberg",
|
||||
"repository": "SoulEye-sweet/vendor_xiaomi_miuicamera-sweet",
|
||||
"target_path": "vendor/xiaomi/miuicamera-sweet",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "tbyool/android_kernel_xiaomi_sm6150",
|
||||
"target_path": "kernel/xiaomi/sm6150",
|
||||
"branch": "16.0"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "SoulEye-sweet/device_oneplus_dolby",
|
||||
"target_path": "device/oneplus/dolby",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "codeberg",
|
||||
"repository": "SoulEye-sweet/vendor_oneplus_dolby",
|
||||
"target_path": "vendor/oneplus/dolby",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "SoulEye-sweet/hardware_xiaomi",
|
||||
"target_path": "hardware/xiaomi",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "SoulEye-sweet/packages_apps_ViPER4AndroidFX",
|
||||
"target_path": "packages/apps/ViPER4AndroidFX",
|
||||
"branch": "bka"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "yaap/packages_apps_KProfiles",
|
||||
"target_path": "packages/apps/KProfiles",
|
||||
"branch": "sixteen"
|
||||
}
|
||||
]
|
||||
113
extract-files.py
Executable file
113
extract-files.py
Executable file
@@ -0,0 +1,113 @@
|
||||
#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
from extract_utils.fixups_blob import (
|
||||
BlobFixupCtx,
|
||||
File,
|
||||
blob_fixup,
|
||||
blob_fixups_user_type,
|
||||
)
|
||||
from extract_utils.fixups_lib import (
|
||||
lib_fixups,
|
||||
lib_fixups_user_type,
|
||||
)
|
||||
from extract_utils.main import (
|
||||
ExtractUtils,
|
||||
ExtractUtilsModule,
|
||||
)
|
||||
from extract_utils.tools import (
|
||||
llvm_objdump_path,
|
||||
)
|
||||
from extract_utils.utils import (
|
||||
run_cmd,
|
||||
)
|
||||
|
||||
namespace_imports = [
|
||||
'hardware/qcom-caf/sm8150',
|
||||
'hardware/xiaomi',
|
||||
'vendor/qcom/opensource/display',
|
||||
'vendor/xiaomi/sm6150-common',
|
||||
]
|
||||
|
||||
|
||||
def blob_fixup_graphic_buffer_size(
|
||||
ctx: BlobFixupCtx,
|
||||
file: File,
|
||||
file_path: str,
|
||||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
for line in run_cmd(
|
||||
[
|
||||
llvm_objdump_path,
|
||||
'--disassemble-all',
|
||||
file_path,
|
||||
]
|
||||
).splitlines():
|
||||
line = line.split(maxsplit=5)
|
||||
if len(line) != 6:
|
||||
continue
|
||||
|
||||
# The size of GraphicBuffer changed from 0x100 to 0xd30
|
||||
offset, _, instruction, register, value, _ = line
|
||||
if instruction == 'mov' and register[:-1] == 'w0' and value == '#0x100':
|
||||
with open(file_path, 'rb+') as f:
|
||||
f.seek(int(offset[:-1], 16))
|
||||
f.write(b'\x00\xa6\x81\x52') # AArch64 mov w0, #0xd30
|
||||
|
||||
|
||||
lib_fixups: lib_fixups_user_type = {
|
||||
**lib_fixups,
|
||||
}
|
||||
|
||||
blob_fixups: blob_fixups_user_type = {
|
||||
'vendor/etc/init/init.batterysecret.rc': blob_fixup()
|
||||
.regex_replace(' +seclabel u:r:batterysecret:s0\n', ''),
|
||||
'vendor/etc/init/init.mi_thermald.rc': blob_fixup()
|
||||
.regex_replace(' +seclabel u:r:mi_thermald:s0\n', ''),
|
||||
('vendor/lib/hw/audio.primary.sm6150.so', 'vendor/lib/libaudioroute_ext.so'): blob_fixup()
|
||||
.replace_needed('libaudioroute.so', 'libaudioroute-v34.so'),
|
||||
'vendor/lib64/camera/components/com.qti.node.watermark.so': blob_fixup()
|
||||
.add_needed('libpiex_shim.so'),
|
||||
('vendor/lib64/hw/camera.qcom.so', 'vendor/lib64/libFaceDetectpp-0.5.2.so', 'vendor/lib64/libfacedet.so'): blob_fixup()
|
||||
.binary_regex_replace(b'libmegface.so', b'libfacedet.so')
|
||||
.binary_regex_replace(b'libMegviiFacepp-0.5.2.so', b'libFaceDetectpp-0.5.2.so')
|
||||
.binary_regex_replace(b'megviifacepp_0_5_2_model', b'facedetectpp_0_5_2_model'),
|
||||
'vendor/lib64/camera/components/com.vidhance.node.eis.so': blob_fixup()
|
||||
.call(blob_fixup_graphic_buffer_size),
|
||||
('vendor/lib64/libalLDC.so', 'vendor/lib64/libalhLDC.so'): blob_fixup()
|
||||
.clear_symbol_version('AHardwareBuffer_allocate')
|
||||
.clear_symbol_version('AHardwareBuffer_describe')
|
||||
.clear_symbol_version('AHardwareBuffer_lock')
|
||||
.clear_symbol_version('AHardwareBuffer_release')
|
||||
.clear_symbol_version('AHardwareBuffer_unlock'),
|
||||
('vendor/lib64/libarcsoft_hta.so', 'vendor/lib64/libarcsoft_super_night_raw.so', 'vendor/lib64/libhvx_interface.so', 'vendor/lib64/libmialgo_rfs.so'): blob_fixup()
|
||||
.clear_symbol_version('remote_handle_close')
|
||||
.clear_symbol_version('remote_handle_invoke')
|
||||
.clear_symbol_version('remote_handle_open')
|
||||
.clear_symbol_version('remote_handle64_close')
|
||||
.clear_symbol_version('remote_handle64_invoke')
|
||||
.clear_symbol_version('remote_handle64_open')
|
||||
.clear_symbol_version('remote_register_buf_attr')
|
||||
.clear_symbol_version('remote_register_buf')
|
||||
.clear_symbol_version('rpcmem_alloc')
|
||||
.clear_symbol_version('rpcmem_free')
|
||||
.clear_symbol_version('rpcmem_to_fd'),
|
||||
} # fmt: skip
|
||||
|
||||
module = ExtractUtilsModule(
|
||||
'sweet',
|
||||
'xiaomi',
|
||||
blob_fixups=blob_fixups,
|
||||
lib_fixups=lib_fixups,
|
||||
namespace_imports=namespace_imports,
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
utils = ExtractUtils.device_with_common(
|
||||
module, 'sm6150-common', module.vendor
|
||||
)
|
||||
utils.run()
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
function blob_fixup() {
|
||||
case "${1}" in
|
||||
vendor/etc/init/init.batterysecret.rc)
|
||||
[ "$2" = "" ] && return 0
|
||||
sed -i "/seclabel u:r:batterysecret:s0/d" "${2}"
|
||||
;;
|
||||
vendor/etc/init/init.mi_thermald.rc)
|
||||
[ "$2" = "" ] && return 0
|
||||
sed -i "/seclabel u:r:mi_thermald:s0/d" "${2}"
|
||||
;;
|
||||
vendor/lib64/camera/components/com.qti.node.watermark.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libpiex_shim.so" "${2}" || "${PATCHELF}" --add-needed "libpiex_shim.so" "${2}"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function blob_fixup_dry() {
|
||||
blob_fixup "$1" ""
|
||||
}
|
||||
|
||||
# If we're being sourced by the common script that we called,
|
||||
# stop right here. No need to go down the rabbit hole.
|
||||
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
export DEVICE=sweet
|
||||
export DEVICE_COMMON=sm6150-common
|
||||
export VENDOR=xiaomi
|
||||
export VENDOR_COMMON=${VENDOR}
|
||||
|
||||
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/extract-files.sh" "$@"
|
||||
18
libinit/Android.bp
Normal file
18
libinit/Android.bp
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SPDX-FileCopyrightText: The LineageOS Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
cc_library_static {
|
||||
name: "libinit_sweet",
|
||||
srcs: [
|
||||
"init_xiaomi_sweet.cpp",
|
||||
"libinit_dalvik_heap.cpp",
|
||||
"libinit_variant.cpp",
|
||||
"libinit_utils.cpp",
|
||||
],
|
||||
whole_static_libs: ["libbase"],
|
||||
export_include_dirs: ["include"],
|
||||
include_dirs: ["system/core/init"],
|
||||
recovery_available: true,
|
||||
}
|
||||
23
libinit/include/libinit_dalvik_heap.h
Normal file
23
libinit/include/libinit_dalvik_heap.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef LIBINIT_DALVIK_HEAP_H
|
||||
#define LIBINIT_DALVIK_HEAP_H
|
||||
|
||||
#include <string>
|
||||
|
||||
typedef struct dalvik_heap_info {
|
||||
std::string heapstartsize;
|
||||
std::string heapgrowthlimit;
|
||||
std::string heapsize;
|
||||
std::string heapminfree;
|
||||
std::string heapmaxfree;
|
||||
std::string heaptargetutilization;
|
||||
} dalvik_heap_info_t;
|
||||
|
||||
void set_dalvik_heap(void);
|
||||
|
||||
#endif // LIBINIT_DALVIK_HEAP_H
|
||||
18
libinit/include/libinit_utils.h
Normal file
18
libinit/include/libinit_utils.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef LIBINIT_UTILS_H
|
||||
#define LIBINIT_UTILS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
void property_override(std::string prop, std::string value, bool add = true);
|
||||
|
||||
void set_ro_build_prop(const std::string &prop, const std::string &value, bool product = false);
|
||||
|
||||
const std::string fingerprint_to_description(const std::string &fingerprint);
|
||||
|
||||
#endif // LIBINIT_UTILS_H
|
||||
30
libinit/include/libinit_variant.h
Normal file
30
libinit/include/libinit_variant.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef LIBINIT_VARIANT_H
|
||||
#define LIBINIT_VARIANT_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
typedef struct variant_info {
|
||||
std::string hwc_value;
|
||||
std::string sku_value;
|
||||
|
||||
std::string brand;
|
||||
std::string device;
|
||||
std::string name;
|
||||
std::string marketname;
|
||||
std::string model;
|
||||
std::string mod_device;
|
||||
std::string build_fingerprint;
|
||||
} variant_info_t;
|
||||
|
||||
void search_variant(const std::vector<variant_info_t> variants);
|
||||
|
||||
void set_variant_props(const variant_info_t variant);
|
||||
|
||||
#endif // LIBINIT_VARIANT_H
|
||||
74
libinit/init_xiaomi_sweet.cpp
Normal file
74
libinit/init_xiaomi_sweet.cpp
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <libinit_dalvik_heap.h>
|
||||
#include <libinit_variant.h>
|
||||
|
||||
#include "vendor_init.h"
|
||||
|
||||
static const variant_info_t sweet_info = {
|
||||
.hwc_value = "GLOBAL",
|
||||
.sku_value = "pro",
|
||||
|
||||
.brand = "Redmi",
|
||||
.device = "sweet",
|
||||
.mod_device = "sweet_global",
|
||||
.name = "sweet_global",
|
||||
.marketname = "Redmi Note 10 Pro",
|
||||
.model = "M2101K6G",
|
||||
.build_fingerprint = "Redmi/sweet_global/sweet:13/RKQ1.210614.002/V14.0.9.0.TKFMIXM:user/release-keys",
|
||||
};
|
||||
|
||||
static const variant_info_t sweetjp_info = {
|
||||
.hwc_value = "JAPAN",
|
||||
.sku_value = "",
|
||||
|
||||
.brand = "Redmi",
|
||||
.device = "sweet",
|
||||
.mod_device = "sweet_global",
|
||||
.name = "sweet_global",
|
||||
.marketname = "Redmi Note 10 Pro",
|
||||
.model = "M2101K6R",
|
||||
.build_fingerprint = "Redmi/sweet_global/sweet:13/RKQ1.210614.002/V14.0.9.0.TKFMIXM:user/release-keys",
|
||||
};
|
||||
|
||||
static const variant_info_t sweetin_info = {
|
||||
.hwc_value = "INDIA",
|
||||
.sku_value = "std",
|
||||
|
||||
.brand = "Redmi",
|
||||
.device = "sweetin",
|
||||
.mod_device = "sweetin_in_global",
|
||||
.name = "sweetin",
|
||||
.marketname = "Redmi Note 10 Pro",
|
||||
.model = "M2101K6P",
|
||||
.build_fingerprint = "Redmi/sweetin/sweetin:13/RKQ1.210614.002/V14.0.1.0.TKFINXM:user/release-keys",
|
||||
};
|
||||
|
||||
static const variant_info_t sweetinpro_info = {
|
||||
.hwc_value = "INDIA",
|
||||
.sku_value = "pro",
|
||||
|
||||
.brand = "Redmi",
|
||||
.device = "sweetin",
|
||||
.mod_device = "sweetin_in_global",
|
||||
.name = "sweetinpro",
|
||||
.marketname = "Redmi Note 10 Pro Max",
|
||||
.model = "M2101K6I",
|
||||
.build_fingerprint = "Redmi/sweetinpro/sweetin:13/RKQ1.210614.002/V14.0.1.0.TKFINXM:user/release-keys",
|
||||
};
|
||||
|
||||
static const std::vector<variant_info_t> variants = {
|
||||
sweet_info,
|
||||
sweetjp_info,
|
||||
sweetin_info,
|
||||
sweetinpro_info,
|
||||
};
|
||||
|
||||
void vendor_load_properties() {
|
||||
set_dalvik_heap();
|
||||
search_variant(variants);
|
||||
}
|
||||
56
libinit/libinit_dalvik_heap.cpp
Normal file
56
libinit/libinit_dalvik_heap.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <sys/sysinfo.h>
|
||||
#include <libinit_utils.h>
|
||||
|
||||
#include <libinit_dalvik_heap.h>
|
||||
|
||||
#define HEAPSTARTSIZE_PROP "dalvik.vm.heapstartsize"
|
||||
#define HEAPGROWTHLIMIT_PROP "dalvik.vm.heapgrowthlimit"
|
||||
#define HEAPSIZE_PROP "dalvik.vm.heapsize"
|
||||
#define HEAPMINFREE_PROP "dalvik.vm.heapminfree"
|
||||
#define HEAPMAXFREE_PROP "dalvik.vm.heapmaxfree"
|
||||
#define HEAPTARGETUTILIZATION_PROP "dalvik.vm.heaptargetutilization"
|
||||
|
||||
#define GB(b) (b * 1024ull * 1024 * 1024)
|
||||
|
||||
static const dalvik_heap_info_t dalvik_heap_info_8192 = {
|
||||
.heapstartsize = "24m",
|
||||
.heapgrowthlimit = "256m",
|
||||
.heapsize = "512m",
|
||||
.heapminfree = "8m",
|
||||
.heapmaxfree = "48m",
|
||||
.heaptargetutilization = "0.46",
|
||||
};
|
||||
|
||||
static const dalvik_heap_info_t dalvik_heap_info_6144 = {
|
||||
.heapstartsize = "16m",
|
||||
.heapgrowthlimit = "256m",
|
||||
.heapsize = "512m",
|
||||
.heapminfree = "8m",
|
||||
.heapmaxfree = "32m",
|
||||
.heaptargetutilization = "0.5",
|
||||
};
|
||||
|
||||
void set_dalvik_heap() {
|
||||
struct sysinfo sys;
|
||||
const dalvik_heap_info_t *dhi;
|
||||
|
||||
sysinfo(&sys);
|
||||
|
||||
if (sys.totalram > GB(7))
|
||||
dhi = &dalvik_heap_info_8192;
|
||||
else
|
||||
dhi = &dalvik_heap_info_6144;
|
||||
|
||||
property_override(HEAPSTARTSIZE_PROP, dhi->heapstartsize);
|
||||
property_override(HEAPGROWTHLIMIT_PROP, dhi->heapgrowthlimit);
|
||||
property_override(HEAPSIZE_PROP, dhi->heapsize);
|
||||
property_override(HEAPTARGETUTILIZATION_PROP, dhi->heaptargetutilization);
|
||||
property_override(HEAPMINFREE_PROP, dhi->heapminfree);
|
||||
property_override(HEAPMAXFREE_PROP, dhi->heapmaxfree);
|
||||
}
|
||||
67
libinit/libinit_utils.cpp
Normal file
67
libinit/libinit_utils.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||
#include <sys/_system_properties.h>
|
||||
#include <vector>
|
||||
|
||||
#include <libinit_utils.h>
|
||||
|
||||
void property_override(std::string prop, std::string value, bool add) {
|
||||
auto pi = (prop_info *) __system_property_find(prop.c_str());
|
||||
if (pi != nullptr) {
|
||||
__system_property_update(pi, value.c_str(), value.length());
|
||||
} else if (add) {
|
||||
__system_property_add(prop.c_str(), prop.length(), value.c_str(), value.length());
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> ro_props_default_source_order = {
|
||||
"odm.",
|
||||
"product.",
|
||||
"system.",
|
||||
"system_ext.",
|
||||
"vendor.",
|
||||
"",
|
||||
};
|
||||
|
||||
void set_ro_build_prop(const std::string &prop, const std::string &value, bool product) {
|
||||
std::string prop_name;
|
||||
|
||||
for (const auto &source : ro_props_default_source_order) {
|
||||
if (product)
|
||||
prop_name = "ro.product." + source + prop;
|
||||
else
|
||||
prop_name = "ro." + source + "build." + prop;
|
||||
|
||||
property_override(prop_name, value, true);
|
||||
}
|
||||
}
|
||||
|
||||
#define FIND_AND_REMOVE(s, delimiter, variable_name) \
|
||||
std::string variable_name = s.substr(0, s.find(delimiter)); \
|
||||
s.erase(0, s.find(delimiter) + delimiter.length());
|
||||
|
||||
const std::string fingerprint_to_description(const std::string &fingerprint) {
|
||||
const std::string delimiter = "/";
|
||||
const std::string delimiter2 = ":";
|
||||
|
||||
std::string build_fingerprint_copy = fingerprint;
|
||||
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, brand)
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, product)
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter2, device)
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, platform_version)
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, build_id)
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter2, build_number)
|
||||
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, build_variant)
|
||||
std::string build_version_tags = build_fingerprint_copy;
|
||||
|
||||
const std::string description = product + "-" + build_variant + " " + platform_version +
|
||||
" " + build_id + " " + build_number + " " + build_version_tags;
|
||||
|
||||
return description;
|
||||
}
|
||||
51
libinit/libinit_variant.cpp
Normal file
51
libinit/libinit_variant.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <libinit_utils.h>
|
||||
|
||||
#include <libinit_variant.h>
|
||||
|
||||
using android::base::GetProperty;
|
||||
|
||||
#define HWC_PROP "ro.boot.hwc"
|
||||
#define SKU_PROP "ro.boot.product.hardware.sku"
|
||||
|
||||
void search_variant(const std::vector<variant_info_t> variants) {
|
||||
std::string hwc_value = GetProperty(HWC_PROP, "");
|
||||
std::string sku_value = GetProperty(SKU_PROP, "");
|
||||
|
||||
for (const auto& variant : variants) {
|
||||
if ((variant.hwc_value == "" || variant.hwc_value == hwc_value) &&
|
||||
(variant.sku_value == "" || variant.sku_value == sku_value)) {
|
||||
set_variant_props(variant);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_variant_props(const variant_info_t variant) {
|
||||
// Older devices don't have marketname
|
||||
auto marketname = !variant.marketname.empty() ? variant.marketname : variant.model;
|
||||
|
||||
set_ro_build_prop("brand", variant.brand, true);
|
||||
set_ro_build_prop("device", variant.device, true);
|
||||
set_ro_build_prop("marketname", marketname, true);
|
||||
set_ro_build_prop("model", variant.model, true);
|
||||
set_ro_build_prop("name", variant.name, true);
|
||||
set_ro_build_prop("mod_device", variant.mod_device, true);
|
||||
property_override("ro.product.vendor.name", variant.name, true);
|
||||
property_override("vendor.usb.product_string", marketname, true);
|
||||
|
||||
if (access("/system/bin/recovery", F_OK) != 0) {
|
||||
property_override("bluetooth.device.default_name", marketname, true);
|
||||
set_ro_build_prop("fingerprint", variant.build_fingerprint);
|
||||
property_override("ro.bootimage.build.fingerprint", variant.build_fingerprint);
|
||||
|
||||
property_override("ro.build.description", fingerprint_to_description(variant.build_fingerprint));
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
[
|
||||
{
|
||||
"repository": "android_device_xiaomi_sm6150-common",
|
||||
"target_path": "device/xiaomi/sm6150-common"
|
||||
}
|
||||
]
|
||||
@@ -1,27 +1,70 @@
|
||||
#
|
||||
# Copyright (C) 2021 The LineageOS Project
|
||||
# Copyright (C) 2021-2025 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Inherit from those products. Most specific first.
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
TARGET_SUPPORTS_OMX_SERVICE := false
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
|
||||
|
||||
# Inherit from sweet device
|
||||
# Inherit from sweet device.
|
||||
$(call inherit-product, device/xiaomi/sweet/device.mk)
|
||||
|
||||
# Inherit some common Lineage stuff.
|
||||
# Inherit some common LineageOS / Evolution-X stuff.
|
||||
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
|
||||
|
||||
# Bootanimation
|
||||
TARGET_INCLUDE_BOOT_ANIMATIONS := true
|
||||
TARGET_SCREEN_WIDTH := 1080
|
||||
TARGET_SCREEN_HEIGHT := 2400
|
||||
|
||||
# Face Unlock
|
||||
TARGET_SUPPORTS_64_BIT_APPS := true
|
||||
|
||||
# DeviceAsWebcam
|
||||
TARGET_BUILD_DEVICE_AS_WEBCAM := true
|
||||
|
||||
# Enable blur
|
||||
TARGET_ENABLE_BLUR := true
|
||||
|
||||
# BCR
|
||||
TARGET_INCLUDE_BCR := true
|
||||
|
||||
# Other ROM feature flags
|
||||
BYPASS_CHARGE_SUPPORTED := true
|
||||
PERF_ANIM_OVERRIDE := true
|
||||
TARGET_ENABLES_IMS_OVERRIDES := true
|
||||
TORCH_STR_SUPPORTED := true
|
||||
|
||||
# Targets
|
||||
TARGET_INCLUDE_VIPERFX := true
|
||||
TARGET_DISABLE_LINEAGE_SDK := false
|
||||
TARGET_DISABLE_EPPE := false
|
||||
TARGET_BUILD_APERTURE_CAMERA := false
|
||||
TARGET_EXCLUDES_AUDIOFX := false
|
||||
TARGET_HAS_UDFPS := false
|
||||
|
||||
# Device identifier.
|
||||
PRODUCT_NAME := lineage_sweet
|
||||
PRODUCT_DEVICE := sweet
|
||||
PRODUCT_BRAND := Xiaomi
|
||||
PRODUCT_MODEL := Redmi Note 10 Pro
|
||||
PRODUCT_MANUFACTURER := Xiaomi
|
||||
|
||||
# GMS
|
||||
ifeq ($(WITH_GMS),true)
|
||||
TARGET_USES_MINI_GAPPS := false
|
||||
TARGET_USES_PICO_GAPPS := false
|
||||
TARGET_SUPPORTS_QUICK_TAP := true
|
||||
TARGET_INCLUDE_LIVE_WALLPAPERS := true
|
||||
TARGET_INCLUDE_STOCK_ARCORE := true
|
||||
TARGET_SUPPORTS_GOOGLE_RECORDER := true
|
||||
endif
|
||||
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
|
||||
|
||||
BUILD_FINGERPRINT := Redmi/sweet_global/sweet:13/TKQ1.221013.002/V14.0.9.0.TKFMIXM:user/release-keys
|
||||
# Properties
|
||||
PRODUCT_BUILD_PROP_OVERRIDES += \
|
||||
PRIVATE_BUILD_DESC="sweet_global-user 13 TKQ1.221013.002 V14.0.9.0.TKFMIXM release-keys"
|
||||
BuildDesc="sweet_global-user 13 TKQ1.221013.002 V14.0.9.0.TKFMIXM release-keys" \
|
||||
BuildFingerprint=Redmi/sweet_global/sweet:13/TKQ1.221013.002/V14.0.9.0.TKFMIXM:user/release-keys
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
M -24 51.75 a 24 24 0 1 0 48 0 a 24 24 0 1 0 -48 0
|
||||
but using a radius 24.5 circle to see the antialiasing.
|
||||
-->
|
||||
<string name="config_mainBuiltInDisplayCutout">M -24.5 51.75 a 24.5 24.5 0 1 0 49 0 a 24.5 24.5 0 1 0 -49 0 Z</string>
|
||||
<string name="config_mainBuiltInDisplayCutout" translatable="false">M -24.5 51.75 a 24.5 24.5 0 1 0 49 0 a 24.5 24.5 0 1 0 -49 0 Z</string>
|
||||
|
||||
<!--Like config_mainBuiltInDisplayCutout, but this path is used to report the
|
||||
one single bounding rect per device edge to the app via
|
||||
@@ -385,21 +385,4 @@
|
||||
<item>10</item>
|
||||
<item>10</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- An array of arrays of side fingerprint sensor properties relative to each display.
|
||||
Note: this value is temporary and is expected to be queried directly
|
||||
from the HAL in the future. -->
|
||||
<array name="config_sfps_sensor_props" translatable="false">
|
||||
<item>@array/config_sfps_sensor_props_0</item>
|
||||
</array>
|
||||
|
||||
<array name="config_sfps_sensor_props_0" translatable="false">
|
||||
<item>local:4630946711218184577</item> <!--item>displayId</item-->
|
||||
<item>1080</item> <!--item>sensorLocationX</item-->
|
||||
<item>990</item> <!--item>sensorLocationY</item-->
|
||||
<item>200</item> <!--item>sensorRadius</item-->
|
||||
</array>
|
||||
|
||||
<!-- Indicates whether device has a power button fingerprint sensor. -->
|
||||
<bool name="config_is_powerbutton_fps" translatable="false">true</bool>
|
||||
</resources>
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
<dimen name="rounded_corner_content_padding">10dp</dimen>
|
||||
|
||||
<!-- the padding on the start of the statusbar -->
|
||||
<dimen name="status_bar_padding_start">10dp</dimen>
|
||||
<dimen name="status_bar_padding_start">8dp</dimen>
|
||||
|
||||
<!-- the padding on the end of the statusbar -->
|
||||
<dimen name="status_bar_padding_end">5dp</dimen>
|
||||
<dimen name="status_bar_padding_end">2dp</dimen>
|
||||
|
||||
<!-- Location on the screen of the center of the fingerprint sensor. For devices with under
|
||||
display fingerprint sensors, this directly corresponds to the fingerprint sensor's location.
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
|
||||
<!-- Whether to show Smooth Display feature in Settings Options -->
|
||||
<bool name="config_show_smooth_display">true</bool>
|
||||
<!-- Whether to show peak refresh rate in display settings -->
|
||||
<bool name="config_show_peak_refresh_rate_switch">true</bool>
|
||||
|
||||
<!-- Whether to show min refresh rate in display settings -->
|
||||
<bool name="config_show_min_refresh_rate_switch">true</bool>
|
||||
|
||||
</resources>
|
||||
|
||||
10
overlay/packages/apps/Settings/res/values/strings.xml
Normal file
10
overlay/packages/apps/Settings/res/values/strings.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) Evolution X
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- About device screen, build maintainer -->
|
||||
<string name="build_maintainer_summary">therealmharc | donjohanliebert</string>
|
||||
<string name="build_maintainer_donate_url">https://paypal.me/donjohanliebert</string>
|
||||
</resources>
|
||||
@@ -8,12 +8,18 @@ vendor.audio.feature.compr_voip.enable=false
|
||||
vendor.voice.path.for.pcm.voip=true
|
||||
|
||||
# Display
|
||||
ro.surface_flinger.set_idle_timer_ms=4000
|
||||
ro.surface_flinger.set_touch_timer_ms=4000
|
||||
ro.surface_flinger.set_display_power_timer_ms=1000
|
||||
ro.surface_flinger.use_content_detection_for_refresh_rate=true
|
||||
debug.sf.frame_rate_multiple_threshold=120
|
||||
ro.hardware.hwcomposer=sweet
|
||||
ro.surface_flinger.set_idle_timer_ms=2000
|
||||
ro.surface_flinger.set_touch_timer_ms=2000
|
||||
ro.surface_flinger.set_display_power_timer_ms=2000
|
||||
ro.surface_flinger.use_content_detection_for_refresh_rate=false
|
||||
vendor.display.override_doze_mode=1
|
||||
|
||||
# Fingerprint
|
||||
persist.vendor.fingerprint.type=side
|
||||
persist.vendor.fingerprint.sensor_location=1080|990|200|local:4630946711218184577
|
||||
|
||||
# Fluence
|
||||
ro.vendor.audio.sdk.fluencetype=fluence
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
# These proprietary files are extracted from Redmi Note 10 Pro (codenamed `sweet`) MIUI V14.0.9.0.TKFMIXM, unless pinned
|
||||
|
||||
# Current blobs with ELF checks disabled:
|
||||
# com.qti.chi.override, libmialgoengine depend on libgrallocutils, which is a gnu makefile target
|
||||
# libalLDC, libalhLDC depend on NDK libnativewindow and build is unable to resolve its symbols
|
||||
# libarcsoft_hta, libarcsoft_super_night_raw, libhvx_interface, libmialgo_rfs depend on libsdsprpc and build is unable to resolve its symbols
|
||||
|
||||
# ADSP modules
|
||||
vendor/lib/rfsa/adsp/capi_v2_aptX_CLHDAD_Encoder.so
|
||||
vendor/lib/rfsa/adsp/capi_v2_aptX_Classic.so
|
||||
@@ -60,8 +55,6 @@ vendor/lib/libadiertac.so
|
||||
vendor/lib/libaudcal.so
|
||||
|
||||
# Awinic firmware
|
||||
vendor/firmware/aw8624_haptic.bin
|
||||
vendor/firmware/aw8624_rtp.bin
|
||||
vendor/firmware/awinic/aw882xx_pid_1852_acf.bin
|
||||
vendor/firmware/awinic/aw882xx_pid_1852_monitor.bin
|
||||
vendor/firmware/awinic/aw882xx_pid_2032_acf.bin
|
||||
@@ -70,16 +63,18 @@ vendor/firmware/awinic/aw882xx_rcv_reg_l.bin
|
||||
vendor/firmware/awinic/aw882xx_rcv_reg_r.bin
|
||||
vendor/firmware/awinic/aw882xx_spk_reg_l.bin
|
||||
vendor/firmware/awinic/aw882xx_spk_reg_r.bin
|
||||
vendor/firmware/aw8624_haptic.bin
|
||||
vendor/firmware/aw8624_rtp.bin
|
||||
vendor/firmware/osc_rtp_24K_5s.bin
|
||||
|
||||
# Audio HAL
|
||||
vendor/lib/hw/audio.primary.sm6150.so
|
||||
vendor/lib/vndk/libxlog.so
|
||||
vendor/lib/libadm.so
|
||||
vendor/lib/libaudio_log_utils.so
|
||||
vendor/lib/libaudioparsers.so
|
||||
vendor/lib/libaudioroute_ext.so
|
||||
vendor/lib/libqtigef.so
|
||||
vendor/lib/vndk/libxlog.so
|
||||
|
||||
# Audio extensions
|
||||
vendor/lib/btaudio_offload_if.so
|
||||
@@ -95,7 +90,7 @@ vendor/etc/init/init.batterysecret.rc
|
||||
|
||||
# Camera
|
||||
vendor/lib64/hw/camera.qcom.so
|
||||
vendor/lib64/hw/com.qti.chi.override.so;DISABLE_CHECKELF
|
||||
vendor/lib64/hw/com.qti.chi.override.so
|
||||
vendor/lib64/libFaceGrade.so
|
||||
vendor/lib64/libPSNPE.so
|
||||
vendor/lib64/libSNPE.so
|
||||
@@ -103,8 +98,8 @@ vendor/lib64/libVDClearShot.so
|
||||
vendor/lib64/libXMFD_AgeGender.so
|
||||
vendor/lib64/lib_sr_models.so
|
||||
vendor/lib64/libalCFR.so
|
||||
vendor/lib64/libalLDC.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libalhLDC.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libalLDC.so
|
||||
vendor/lib64/libalhLDC.so
|
||||
vendor/lib64/libarcdualcamsat.so
|
||||
vendor/lib64/libarcsat.so
|
||||
vendor/lib64/libbeauty_face_interface.so
|
||||
@@ -118,22 +113,20 @@ vendor/lib64/libcamxfdengine.so
|
||||
vendor/lib64/libcamxstatscore.so
|
||||
vendor/lib64/libcamxswprocessalgo.so
|
||||
vendor/lib64/libcamxtintlessalgo.so
|
||||
vendor/lib64/libcapiv2svacnn.so
|
||||
vendor/lib64/libcapiv2vop.so
|
||||
vendor/lib64/libcom.qti.chinodeutils.so
|
||||
vendor/lib64/libdualcam_optical_zoom_control.so
|
||||
vendor/lib64/libdualcam_video_optical_zoom.so
|
||||
vendor/lib64/libft2vendor.so
|
||||
vendor/lib64/libhta.so
|
||||
vendor/lib64/libhta_hexagon_runtime.so
|
||||
vendor/lib64/libhvx_interface.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libhvx_interface.so
|
||||
vendor/lib64/libmiai_portraitsupernight.so
|
||||
vendor/lib64/libmialgo_fs.so
|
||||
vendor/lib64/libmialgo_ie_capture.so
|
||||
vendor/lib64/libmialgo_rfs.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libmialgo_rfs.so
|
||||
vendor/lib64/libmialgo_sd.so
|
||||
vendor/lib64/libmialgo_utils.so
|
||||
vendor/lib64/libmialgoengine.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libmialgoengine.so
|
||||
vendor/lib64/libmibokeh_712.so
|
||||
vendor/lib64/libmpbase.so
|
||||
vendor/lib64/libmulticam_image_optical_zoom.so
|
||||
@@ -149,7 +142,6 @@ vendor/lib64/libsnpe_dsp_domains_v2.so
|
||||
vendor/lib64/libsnpe_dsp_domains_v2_system.so
|
||||
vendor/lib64/libsns_device_mode_stub.so
|
||||
vendor/lib64/libswregistrationalgo.so
|
||||
vendor/lib64/libswvdec.so
|
||||
vendor/lib64/libsymphony-cpu.so
|
||||
vendor/lib64/libtriplecam_video_optical_zoom.so
|
||||
vendor/lib64/libvideofilter_only.so
|
||||
@@ -166,13 +158,18 @@ vendor/lib64/libarcsoft_dualcam_refocus.so
|
||||
vendor/lib64/libarcsoft_dualcam_refocus_front.so
|
||||
vendor/lib64/libarcsoft_dualcam_refocus_rear_t.so
|
||||
vendor/lib64/libarcsoft_dualcam_refocus_rear_w.so
|
||||
vendor/lib64/libarcsoft_hta.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libarcsoft_hta.so
|
||||
vendor/lib64/libarcsoft_portrait_lighting.so
|
||||
vendor/lib64/libarcsoft_portrait_lighting_c.so
|
||||
vendor/lib64/libarcsoft_preview_deflicker.so
|
||||
vendor/lib64/libarcsoft_super_night_raw.so;DISABLE_CHECKELF
|
||||
vendor/lib64/libarcsoft_super_night_raw.so|a725136e8fe0c9ffd6b5ed527fd480478c9fd57d|a30ef90898eff351e6efc30f71b35db00f4a9d2a
|
||||
|
||||
# Camera-components
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0.xml
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0_3hdr.xml
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high.xml
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high_1.xml
|
||||
vendor/lib64/camera/components/etc/visidon_clearshot_params.xml
|
||||
vendor/lib64/camera/components/com.altek.node.depurple.so
|
||||
vendor/lib64/camera/components/com.altek.node.distortioncorrection.so
|
||||
vendor/lib64/camera/components/com.arcsoft.node.capturebokeh.so
|
||||
@@ -227,11 +224,6 @@ vendor/lib64/camera/components/com.xiaomi.node.mifilter.so
|
||||
vendor/lib64/camera/components/com.xiaomi.node.mifragment.so
|
||||
vendor/lib64/camera/components/com.xiaomi.node.mimovie.so
|
||||
vendor/lib64/camera/components/com.xiaomi.node.misegment.so
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0.xml
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0_3hdr.xml
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high.xml
|
||||
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high_1.xml
|
||||
vendor/lib64/camera/components/etc/visidon_clearshot_params.xml
|
||||
vendor/lib64/camera/components/libdepthmapwrapper.so
|
||||
vendor/lib64/camera/components/libmmcamera_cac3.so
|
||||
|
||||
@@ -269,6 +261,11 @@ vendor/etc/camera/vidhance_calibration_108m
|
||||
vendor/etc/camera/vidhance_calibration_64m
|
||||
vendor/etc/camera/watermark_font_2300_3199.dat
|
||||
|
||||
# Camera face detection
|
||||
vendor/etc/camera/megviifacepp_0_5_2_model:vendor/etc/camera/facedetectpp_0_5_2_model
|
||||
vendor/lib64/libMegviiFacepp-0.5.2.so:vendor/lib64/libFaceDetectpp-0.5.2.so;FIX_SONAME
|
||||
vendor/lib64/libmegface.so:vendor/lib64/libfacedet.so;FIX_SONAME
|
||||
|
||||
# Camera-firmware
|
||||
vendor/firmware/CAMERA_ICP.elf
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
runtime_resource_overlay {
|
||||
name: "SweetWifiOverlay",
|
||||
theme: "SweetWifiOverlay",
|
||||
product_specific: true
|
||||
product_specific: true,
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
runtime_resource_overlay {
|
||||
name: "SweetinproWifiOverlay",
|
||||
theme: "SweetinproWifiOverlay",
|
||||
product_specific: true
|
||||
product_specific: true,
|
||||
}
|
||||
|
||||
1
setup-makefiles.py
Executable file
1
setup-makefiles.py
Executable file
@@ -0,0 +1 @@
|
||||
#!./extract-files.py --regenerate_makefiles
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# If we're being sourced by the common script that we called,
|
||||
# stop right here. No need to go down the rabbit hole.
|
||||
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
export DEVICE=sweet
|
||||
export DEVICE_COMMON=sm6150-common
|
||||
export VENDOR=xiaomi
|
||||
export VENDOR_COMMON=${VENDOR}
|
||||
|
||||
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"
|
||||
Reference in New Issue
Block a user