28 Commits

Author SHA1 Message Date
basamaryan
003acc2d67 sm7125-common: Disable blurs by default
Change-Id: Ia323bb8f66e3515bdf16ff3a14c919b8bd859eba
2026-01-13 19:48:06 +05:30
basamaryan
69cec4a226 sm7125-common: overlay: Reduce blur radius
Change-Id: Id6339df82156099ca14da684f236931b3ecf51ce
2026-01-13 16:13:14 +05:30
LuK1337
e3709c3a5f sm7125-common: Opt out of speaker_layout_channel_mask field
Required for ABI compatibility with audio HAL compiled before 15 QPR2.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/9426
Change-Id: Ic910f0634ee0707c21dad77f5264fd89fb33f1c0
2026-01-09 23:20:13 +05:30
theshaenix
36fc00c6f7 sm7125-common : fine tuned the post boot script
- Improved the overall script behaviour
2026-01-09 18:14:43 +05:30
theshaenix
691ae80522 sm7125-common:migrate recovery init rc files to Soong
Move init.recovery.qcom.rc and init.recovery.usb.rc from
PRODUCT_COPY_FILES to proper prebuilt_etc modules.

This aligns recovery configuration with Soong-only builds,
ensures correct installation under /recovery/root, and
improves maintainability going forward.
2026-01-09 18:13:24 +05:30
aminfauzi
7f7b28b7ec sm7125-common: Fix for aux camera lens missing in Aperture
Signed-off-by: aminfauzi <aremean0107@gmail.com>
2026-01-09 18:13:24 +05:30
theshaenix
698b0793e0 Revert "sm7125-common: overlay: Enable BoostFramework support"
This reverts commit 2a5f329dcdbd63684e8d33ee2827df64b3b93783.
2026-01-09 18:13:23 +05:30
me-cafebabe
ba3f515548 sm7125-common: overlay: Disable high performance transitions
Change-Id: I70c593a8efe1499f8e0917b4e80652b7f3d71198
2026-01-09 18:13:23 +05:30
Pranav Vashi
61f4eca83c sm7125-common: Update pinner files
Change-Id: Ibec6b6d6d1689fde16837ca526cb245cd5f9711c
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-09 18:13:23 +05:30
Edgar Arriaga
0daafe0ad3 sm7125-common: overlay: Set default pin amount for home app
Bug: 288900050
Test: dumpsys pinner
Flag: EXEMPT refactor

Change-Id: Ieed912786ce51f420da9b0e96ea5d93c22244176
2026-01-09 18:13:23 +05:30
theshaenix
176d45a401 sm7125-common: Drop zram writeback 2026-01-09 18:13:21 +05:30
Cassie
7cca5eb75f sm7125-common: overlay: Use the new auto network selection UI
Change-Id: I76698911103601d5f3ad67e1099790af8c2fdc18
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-09 18:12:51 +05:30
Georg Veichtlbauer
677534ab57 sm7125-common: Drop config_setColorTransformAccelerated
It's now enabled by default

Change-Id: I57f059c872fc2ad2fd15e788b1391eeebaff9bde
2026-01-09 18:12:51 +05:30
Sebastiano Barezzi
39eaf77d3b sm7125-common: overlay: Enable config_dozePulsePickup
Change-Id: Ice5cd780eb77e2ae78a3a84a0140c321ad84f143
2026-01-09 18:12:51 +05:30
Bruno Martins
32010fe8a6 sm7125-common: overlay: Remove obsolete config_keyboardTapVibePattern
Change-Id: Ic89566183d2cdc4a20ea83f462c56a14184621ae
2026-01-09 18:12:51 +05:30
x0x00044
1c92a3aa64 sm7125-common: overlay: Remove config_cellBroadcastAppLinks
- This is true by default.

Change-Id: I9f91f4bf49995975d434ad8b74b175693409862a
2026-01-09 18:12:47 +05:30
theshaenix
580d92d48e sm7125-common: switch to libprotobuf-cpp-lite-3.9.1-vendorcompat 2026-01-06 01:13:30 +05:30
minaripenguin
063ebd6340 sm7125-common: prop: Tune lmkd system properties
Signed-off-by: Mayur <ultramayur123@gmail.com>
2026-01-06 00:01:39 +05:30
Andrzej Perczak
d927eafa9d Import lmkd props from google gki
Reference: https://github.com/LineageOS/android_hardware_google_pixel/blob/lineage-19.1/mm/device_gki.mk
Signed-off-by: Mayur <ultramayur123@gmail.com>
2026-01-06 00:01:39 +05:30
Tim Murray
78c36e6e7a sm7125-common: prop: Set lmkd's swap_free_low_percentage to 100
Ref: 5f975896d4

Signed-off-by: Mayur <ultramayur123@gmail.com>
2026-01-06 00:01:39 +05:30
Mayur
27f7258f40 sm7125-common: prop: set lmk to kill heaviest task
Signed-off-by: Mayur <ultramayur123@gmail.com>
2026-01-06 00:01:39 +05:30
nullxception
79073ee5fb sm7125-common: props: Disable LMKD log stats
TARGET_LMKD_STATS_LOG is not used anymore and log stats is enabled by
default, so we have to explicitly disable it from runtime.

Signed-off-by: Mayur <ultramayur123@gmail.com>
2026-01-06 00:01:38 +05:30
theshaenix
9517a2b2f4 sm7125-common: sepolicy: drop the hal_secure_element_default 2026-01-05 23:52:27 +05:30
Yumi Yukimura
902d9b8b8c sm7125-common: Update some soong config variables to bool type 2025-12-06 14:38:29 +05:30
LuK1337
2ad26e321b sm7125-common: Remove vendor/lineage device framework matrix inclusion
See: I78da6340f38b93fdc4c3694cb8f431f387d16c0d
Change-Id: I0b9f527de50ca02082be9b92375559f4893b2688
2025-12-06 14:31:26 +05:30
Sourajit Karmakar
4b55992686 sm7125-common: Disable FRP
* This should really be disabled after unlocking the bootloader.

Change-Id: Icf5305cba66e9e613000a6ef53b32fa59760a7f2
2025-12-06 14:27:15 +05:30
theshaenix
9ee13c15a6 sm7125-common: Cleanup for QPR1
* dropped  Offending entries:
- android.frameworks.schedulerservice@1.0.vendor
- android.hardware.automotive.audiocontrol@1.0.vendor
- android.hardware.automotive.audiocontrol@2.0.vendor
- android.hardware.vibrator@1.0.vendor
- android.hardware.vibrator@1.1.vendor
- android.hardware.vibrator@1.2.vendor
- android.hardware.vibrator@1.3.vendor
- android.hardware.vr@1.0.vendor
2025-12-06 14:22:42 +05:30
theshaenix
895a9d4a5f sm7125: drop libprotobuf
- in new QRP1 this is being provided by the source , hence manual declaration creates conflicts
2025-12-06 14:14:04 +05:30
12 changed files with 346 additions and 211 deletions

View File

@@ -6,11 +6,6 @@ soong_namespace {
],
}
cc_library_shared {
name: "libprotobuf-cpp-lite-3.9.1",
shared_libs: ["libprotobuf-cpp-full-3.9.1-vendorcompat"],
vendor: true,
}
install_symlink {
name: "firmware_wlan_mac.bin_symlink",

View File

@@ -101,7 +101,6 @@ BOARD_HAVE_QCOM_FM := true
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
hardware/qcom-caf/common/vendor_framework_compatibility_matrix_legacy.xml \
vendor/lineage/config/device_framework_matrix.xml \
$(COMMON_PATH)/framework_compatibility_matrix.xml
DEVICE_MANIFEST_FILE := \

View File

@@ -22,6 +22,9 @@ $(call inherit-product, hardware/qcom-caf/common/common.mk)
# UDFPS
$(call soong_config_set,surfaceflinger,udfps_lib,//$(LOCAL_PATH):libudfps_extension.realme_sm7125)
# speaker layout channel mask
$(call soong_config_set_bool,android_hardware_audio,skip_speaker_layout_channel_mask_field,true)
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_BOARD_PLATFORM := atoll
@@ -227,9 +230,11 @@ PRODUCT_PACKAGES += \
init.qcom.usb.rc \
init.sm7125.rc
# Recovery init script
# Recovery
PRODUCT_PACKAGES += \
init.recovery.qcom.sh
init.recovery.qcom.sh \
init.recovery.qcom.rc \
init.recovery.usb.rc
# Vendor shell scripts
PRODUCT_PACKAGES += \
@@ -270,7 +275,7 @@ $(call inherit-product-if-exists, vendor/lawnchair/lawnchair.mk)
PRODUCT_PACKAGES += \
vendor.lineage.livedisplay-service.sdm
$(call soong_config_set,livedisplay_sdm,enable_dm,false)
$(call soong_config_set_bool,livedisplay_sdm,enable_dm,false)
# Media
PRODUCT_PACKAGES += \
@@ -356,8 +361,8 @@ PRODUCT_DEXPREOPT_SPEED_APPS += \
#Protobuf
PRODUCT_PACKAGES += \
libprotobuf-cpp-full-3.9.1-vendorcompat \
libprotobuf-cpp-lite-3.9.1
libprotobuf-cpp-lite-3.9.1-vendorcompat
# QTI FWK Detect
PRODUCT_PACKAGES += \
libqti_vndfwk_detect.vendor \
@@ -533,7 +538,6 @@ PRODUCT_PACKAGES += \
android.frameworks.cameraservice.service@2.0.vendor \
android.frameworks.cameraservice.service@2.1.vendor \
android.frameworks.displayservice@1.0.vendor \
android.frameworks.schedulerservice@1.0.vendor \
android.frameworks.stats@1.0.vendor \
android.hardware.atrace@1.0.vendor \
android.frameworks.sensorservice@1.0.vendor \
@@ -549,8 +553,6 @@ PRODUCT_PACKAGES += \
android.hardware.audio@5.0.vendor \
android.hardware.audio@6.0.vendor \
android.hardware.authsecret@1.0.vendor \
android.hardware.automotive.audiocontrol@1.0.vendor \
android.hardware.automotive.audiocontrol@2.0.vendor \
android.hardware.automotive.can@1.0.vendor \
android.hardware.automotive.evs@1.0.vendor \
android.hardware.automotive.evs@1.1.vendor \
@@ -650,11 +652,6 @@ PRODUCT_PACKAGES += \
android.hardware.usb@1.0.vendor \
android.hardware.usb@1.1.vendor \
android.hardware.usb@1.2.vendor \
android.hardware.vibrator@1.0.vendor \
android.hardware.vibrator@1.1.vendor \
android.hardware.vibrator@1.2.vendor \
android.hardware.vibrator@1.3.vendor \
android.hardware.vr@1.0.vendor \
android.hardware.weaver@1.0.vendor \
android.hardware.wifi.hostapd@1.0.vendor \
android.hardware.wifi.hostapd@1.1.vendor \

View File

@@ -1,17 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright (C) 2022-2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
autodetected from the Configuration. -->
@@ -21,9 +13,6 @@
<!-- The restoring is handled by modem if it is true-->
<bool name="skip_restoring_network_selection">true</bool>
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
<bool name="config_cellBroadcastAppLinks">true</bool>
<!-- M user agent string -->
<string name="config_mms_user_agent">Android-Mms/2.0</string>
@@ -161,6 +150,9 @@
Doze dreams will run whenever the power manager is in a dozing state. -->
<string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
<!-- Doze: should the TYPE_PICK_UP_GESTURE sensor be used as a pulse signal. -->
<bool name="config_dozePulsePickup">true</bool>
<!-- If true, the doze component is not started until after the screen has been
turned off and the screen off animation has been performed. -->
<bool name="config_dozeAfterScreenOffByDefault">true</bool>
@@ -218,10 +210,6 @@
on the headphone/microphone jack. When false use the older uevent framework. -->
<bool name="config_useDevInputEventForAudioJack">true</bool>
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
in hardware. -->
<bool name="config_setColorTransformAccelerated">true</bool>
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
@@ -366,11 +354,6 @@
Equivalent to 67/255 (default for this device) -->
<integer name="config_screenBrightnessSettingDefault">45</integer>
<!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
<integer-array name="config_keyboardTapVibePattern">
<item>40</item>
</integer-array>
<!-- Vibrator pattern for feedback about a long screen/key press -->
<integer-array name="config_longPressVibePattern">
<item>0</item>
@@ -434,22 +417,58 @@
<!-- Default list of files pinned by the Pinner Service -->
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
<item>"/apex/com.android.art/javalib/core-oj.jar"</item>
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
<item>"/system/bin/surfaceflinger"</item>
<item>"/system/framework/boot-framework.vdex"</item>
<item>"/system/framework/ext.jar"</item>
<item>"/system/framework/framework-res.apk"</item>
<item>"/system/framework/framework.jar"</item>
<item>"/system/framework/services.jar"</item>
<item>"/system/framework/ext.jar"</item>
<item>"/system/framework/telephony-common.jar"</item>
<item>"/system/lib/libEGL.so"</item>
<item>"/system/lib/libGLESv1_CM.so"</item>
<item>"/system/lib/libGLESv2.so"</item>
<item>"/system/lib/libGLESv3.so"</item>
<item>"/system/lib/libgui.so"</item>
<item>"/system/lib/libhwui.so"</item>
<item>"/system/lib/libui.so"</item>
<item>"/system/lib/libvulkan.so"</item>
<item>"/system/lib64/libEGL.so"</item>
<item>"/system/lib64/libGLESv1_CM.so"</item>
<item>"/system/lib64/libGLESv2.so"</item>
<item>"/system/lib64/libGLESv3.so"</item>
<item>"/system/lib64/libgui.so"</item>
<item>"/system/lib64/libhwui.so"</item>
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
<item>"/system/lib64/libui.so"</item>
<item>"/system/lib64/libvulkan.so"</item>
<item>"/vendor/lib/egl/eglSubDriverAndroid.so"</item>
<item>"/vendor/lib/egl/libEGL_adreno.so"</item>
<item>"/vendor/lib/egl/libGLESv1_CM_adreno.so"</item>
<item>"/vendor/lib/egl/libGLESv2_adreno.so"</item>
<item>"/vendor/lib/hw/vulkan.adreno.so"</item>
<item>"/vendor/lib/libCB.so"</item>
<item>"/vendor/lib/libOpenCL.so"</item>
<item>"/vendor/lib/libadreno_utils.so"</item>
<item>"/vendor/lib/libgsl.so"</item>
<item>"/vendor/lib/libllvm-glnext.so"</item>
<item>"/vendor/lib/libllvm-qcom.so"</item>
<item>"/vendor/lib64/egl/eglSubDriverAndroid.so"</item>
<item>"/vendor/lib64/egl/libEGL_adreno.so"</item>
<item>"/vendor/lib64/egl/libGLESv1_CM_adreno.so"</item>
<item>"/vendor/lib64/egl/libGLESv2_adreno.so"</item>
<item>"/vendor/lib64/hw/vulkan.adreno.so"</item>
<item>"/vendor/lib64/libCB.so"</item>
<item>"/vendor/lib64/libOpenCL.so"</item>
<item>"/vendor/lib64/libadreno_utils.so"</item>
<item>"/vendor/lib64/libgsl.so"</item>
<item>"/vendor/lib64/libllvm-qgl.so"</item>
<item>"/vendor/lib64/libllvm-glnext.so"</item>
<item>"/vendor/lib64/libllvm-qcom.so"</item>
</string-array>
<!-- Should the pinner service pin the Home application? -->
<bool name="config_pinnerHomeApp">true</bool>
<!-- Bytes that the PinnerService will pin for Home app -->
<integer name="config_pinnerHomePinBytes">6291456</integer>
<!-- List of files pinned by the Pinner Service with the JIT Zygote boot image b/119800099 -->
<string-array translatable="false" name="config_jitzygoteBootImagePinnerServiceFiles">
@@ -502,9 +521,6 @@
available on some devices. -->
<bool name="config_enableHapticTextHandle">true</bool>
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
<bool name="config_zramWriteback">true</bool>
<!-- Whether to post reset runnable for all clients. Needed for some older
vendor fingerprint HAL implementations. -->
<bool name="config_fingerprintPostResetRunnableForAllClients">true</bool>
@@ -565,6 +581,8 @@
manager will disable alpha trasformation in animations where not
strictly needed. -->
<bool name="config_sf_limitedAlpha">true</bool>
<!-- Whether the new Auto Selection Network UI should be shown -->
<bool name="config_enableNewAutoSelectNetworkUI">true</bool>
<!-- Package name of a telephony-related system app, such as an IMS service.
Exempted from privacy indicators. -->
@@ -589,9 +607,7 @@
<!-- Whether we use large screen shade header which takes only one row compared to QS header -->
<bool name="config_use_large_screen_shade_header">true</bool>
<!-- Boost Framework -->
<bool name="config_supportsBoostFramework">true</bool>
<!-- Whether WiFi display is supported by this device.
There are many prerequisites for this feature to work correctly.
@@ -606,4 +622,8 @@
* The device must be provisioned with HDCP keys (for protected content).
-->
<bool name="config_enableWifiDisplay">true</bool>
</resources>
<!-- Whether WM DisplayContent supports high performance transitions
(lower-end devices may want to disable) -->
<bool name="config_deviceSupportsHighPerfTransitions">false</bool>
</resources>

View File

@@ -57,4 +57,7 @@
<!-- Location on the screen of the center of the physical power button. -->
<dimen name="physical_power_button_center_screen_location_y">912px</dimen>
<!-- Blur radius behind Notification Shade -->
<dimen name="max_shade_window_blur_radius">17dp</dimen>
</resources>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<integer name="max_depth_blur_radius">11</integer>
<dimen name="max_depth_blur_radius_enhanced">15dp</dimen>
</resources>

View File

@@ -19,6 +19,22 @@ vendor.display.disable_metadata_dynamic_fps=1
# LMKD
ro.config.low_ram=false
ro.lmk.log_stats=false
ro.lmk.kill_heaviest_task=true
ro.lmk.swap_free_low_percentage=100
# LMK tuning
ro.lmk.filecache_min_kb=153600
ro.lmk.stall_limit_critical=40
ro.lmk.use_new_strategy=true
ro.lmk.enable_watermark_check=true
ro.lmk.enable_userspace_lmk=true
ro.lmk.enhance_batch_kill=false
ro.lmk.super_critical=701
ro.lmk.kill_timeout_ms=50
ro.lmk.psi_scrit_complete_stall_ms=150
ro.lmk.direct_reclaim_pressure=45
ro.lmk.reclaim_scan_threshold=0
# Incremental FS
ro.incremental.enable=1

20
recovery/root/Android.bp Normal file
View File

@@ -0,0 +1,20 @@
//
// Copyright (C) 2026 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
prebuilt_etc {
name: "init.recovery.qcom.rc",
src: "init.recovery.qcom.rc",
sub_dir: "recovery/root",
filename: "init.recovery.qcom.rc",
installable: true,
}
prebuilt_etc {
name: "init.recovery.usb.rc",
src: "init.recovery.usb.rc",
sub_dir: "recovery/root",
filename: "init.recovery.usb.rc",
installable: true,
}

View File

@@ -4,15 +4,15 @@
#
# 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.
# * 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -31,59 +31,148 @@
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
function configure_zram_parameters() {
swapoff /dev/block/zram0 2>/dev/null || true
# Reset zram device
[ -w /sys/block/zram0/reset ] && echo 1 > /sys/block/zram0/reset
# Set compression algorithm (LZ4 optimized for ARM Cortex-A76/A55)
echo lz4 > /sys/block/zram0/comp_algorithm 2>/dev/null || return 1
# Optimize compression streams for 8-core big.LITTLE (2x A76 + 6x A55)
echo 4 > /sys/block/zram0/max_comp_streams 2>/dev/null || true
# Set 4GB zram size
echo 4294967296 > /sys/block/zram0/disksize 2>/dev/null || return 1
# Initialize and enable swap
mkswap /dev/block/zram0 2>/dev/null || return 1
swapon /dev/block/zram0 -p 32758 2>/dev/null || return 1
# VM tuning - Optimized for Realme 6 Pro mobile workloads
{
# Swappiness: Slightly higher for 4GB zram to utilize it effectively
echo 100 > /proc/sys/vm/swappiness
# Cache pressure: Aggressive reclaim for mobile RAM management
echo 100 > /proc/sys/vm/vfs_cache_pressure
# Page-cluster: Small reads optimal for mobile flash + zram combo
echo 1 > /proc/sys/vm/page-cluster
# Dirty ratios: Conservative for mobile storage longevity
echo 20 > /proc/sys/vm/dirty_ratio
echo 5 > /proc/sys/vm/dirty_background_ratio
# Extra free memory: Buffer for smooth operation
echo 1024 > /proc/sys/vm/extra_free_kbytes
# Memory overcommit: Conservative for stability
echo 1 > /proc/sys/vm/overcommit_memory
echo 50 > /proc/sys/vm/overcommit_ratio
# Additional mobile optimizations for Snapdragon 720G
echo 1 > /proc/sys/vm/compact_memory 2>/dev/null || true
echo 0 > /proc/sys/vm/oom_kill_allocating_task 2>/dev/null || true
# Optimize readahead for mobile storage patterns
echo 128 > /sys/block/*/queue/read_ahead_kb 2>/dev/null || true
} 2>/dev/null
return 0
function configure_read_ahead_kb_values() {
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
dmpts=$(ls /sys/block/*/queue/read_ahead_kb | grep -e dm -e mmc)
# Set 128 for <= 3GB &
# set 512 for >= 4GB targets.
if [ $MemTotal -le 3145728 ]; then
echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
for dm in $dmpts; do
echo 128 > $dm
done
else
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
echo 512 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
for dm in $dmpts; do
echo 512 > $dm
done
fi
}
function enable_swap() {
# Enable swap if not already enabled
if [ ! -f /proc/swaps ] || [ -z "$(cat /proc/swaps | grep zram0)" ]; then
return 0
fi
}
function configure_memory_parameters() {
# Unified memory configuration for Atoll device (Realme 6 Pro: 6GB/8GB RAM)
# Combines ZRAM setup and memory management parameters
ProductName=`getprop ro.product.name`
arch_type=`uname -m`
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
# Configure ZRAM parameters with LZ4 compression
echo lz4 > /sys/block/zram0/comp_algorithm
echo 100 > /proc/sys/vm/swappiness
echo 60 > /proc/sys/vm/direct_swappiness
echo 0 > /proc/sys/vm/page-cluster
if [ -f /sys/block/zram0/disksize ]; then
# Enable deduplication if available
if [ -f /sys/block/zram0/use_dedup ]; then
echo 1 > /sys/block/zram0/use_dedup
fi
# Configure ZRAM size based on total RAM
if [ $MemTotal -le 4194304 ]; then
# 4GB RAM: 2.5GB ZRAM
echo 2684354560 > /sys/block/zram0/disksize
echo 4 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
elif [ $MemTotal -le 6291456 ]; then
# 6GB RAM: 3GB ZRAM
echo 3221225472 > /sys/block/zram0/disksize
echo 6 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
elif [ $MemTotal -le 8388608 ]; then
# 8GB RAM: 4GB ZRAM
echo 4294967296 > /sys/block/zram0/disksize
echo 8 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
else
# 12GB+ RAM: 5GB ZRAM
echo 5368709120 > /sys/block/zram0/disksize
echo 10 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
fi
# Initialize and enable ZRAM swap
mkswap /dev/block/zram0
swapon /dev/block/zram0 -p 32758
fi
# Configure Low Memory Killer parameters
# Read adj series and set adj threshold for PPR and ALMK
adj_series=`cat /sys/module/lowmemorykiller/parameters/adj`
adj_1="${adj_series#*,}"
set_almk_ppr_adj="${adj_1%%,*}"
# Calculate PPR adj threshold (HOME adj and below should not be affected)
set_almk_ppr_adj=$(((set_almk_ppr_adj * 6) + 6))
echo $set_almk_ppr_adj > /sys/module/lowmemorykiller/parameters/adj_max_shift
# Calculate vmpressure_file_min for 64-bit architecture
if [ "$arch_type" == "aarch64" ]; then
minfree_series=`cat /sys/module/lowmemorykiller/parameters/minfree`
minfree_1="${minfree_series#*,}"
rem_minfree_1="${minfree_1%%,*}"
minfree_2="${minfree_1#*,}"
rem_minfree_2="${minfree_2%%,*}"
minfree_3="${minfree_2#*,}"
rem_minfree_3="${minfree_3%%,*}"
minfree_4="${minfree_3#*,}"
rem_minfree_4="${minfree_4%%,*}"
minfree_5="${minfree_4#*,}"
vmpres_file_min=$((minfree_5 + (minfree_5 - rem_minfree_4)))
echo $vmpres_file_min > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
fi
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
# Enable OOM reaper
if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
fi
# Configure Process Reclaim parameters
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
# Set PPR parameters (excluding premium SoCs)
case "$soc_id" in
"321" | "341" | "292" | "319" | "246" | "291" | "305" | "312")
# Skip PPR for premium targets
;;
*)
echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
echo 1 > /sys/module/process_reclaim/parameters/enable_process_reclaim
echo 50 > /sys/module/process_reclaim/parameters/pressure_min
echo 70 > /sys/module/process_reclaim/parameters/pressure_max
echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
;;
esac
# Set global VM parameters
echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
echo 1 > /proc/sys/vm/watermark_scale_factor
# Configure read-ahead values
configure_read_ahead_kb_values
# Enable swap
enable_swap
}
# Core control parameters on silver
echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
@@ -103,109 +192,94 @@ echo 85 > /proc/sys/kernel/sched_group_downmigrate
echo 100 > /proc/sys/kernel/sched_group_upmigrate
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
#colocation v3 settings
# Colocation v3 settings
echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
# configure governor settings for little cluster
# Configure governor settings for little cluster
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
echo 500 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# configure governor settings for big cluster
# Configure governor settings for big cluster
echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
echo 500 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
echo 20000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
echo 1267200 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
# Enable conservative pl for power save
echo 1 > /proc/sys/kernel/sched_conservative_pl
echo "0:1248000" > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
# Set Memory parameters
configure_memory_parameters
# Enable bus-dcvs
for device in /sys/devices/platform/soc
do
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
do
echo "bw_hwmon" > $cpubw/governor
echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
echo 4 > $cpubw/bw_hwmon/sample_ms
echo 68 > $cpubw/bw_hwmon/io_percent
echo 20 > $cpubw/bw_hwmon/hist_memory
echo 0 > $cpubw/bw_hwmon/hyst_length
echo 80 > $cpubw/bw_hwmon/down_thres
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
echo 250 > $cpubw/bw_hwmon/up_scale
echo 1600 > $cpubw/bw_hwmon/idle_mbps
echo 50 > $cpubw/polling_interval
done
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
do
echo "bw_hwmon" > $cpubw/governor
echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
echo 4 > $cpubw/bw_hwmon/sample_ms
echo 68 > $cpubw/bw_hwmon/io_percent
echo 20 > $cpubw/bw_hwmon/hist_memory
echo 0 > $cpubw/bw_hwmon/hyst_length
echo 80 > $cpubw/bw_hwmon/down_thres
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
echo 250 > $cpubw/bw_hwmon/up_scale
echo 1600 > $cpubw/bw_hwmon/idle_mbps
echo 50 > $cpubw/polling_interval
done
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
do
echo "bw_hwmon" > $llccbw/governor
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $llccbw/bw_hwmon/mbps_zones
echo 4 > $llccbw/bw_hwmon/sample_ms
echo 68 > $llccbw/bw_hwmon/io_percent
echo 20 > $llccbw/bw_hwmon/hist_memory
echo 0 > $llccbw/bw_hwmon/hyst_length
echo 80 > $llccbw/bw_hwmon/down_thres
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
echo 250 > $llccbw/bw_hwmon/up_scale
echo 1600 > $llccbw/bw_hwmon/idle_mbps
echo 40 > $llccbw/polling_interval
done
for npubw in $device/*npu*-npu-ddr-bw/devfreq/*npu*-npu-ddr-bw
do
echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
echo "bw_hwmon" > $npubw/governor
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $npubw/bw_hwmon/mbps_zones
echo 4 > $npubw/bw_hwmon/sample_ms
echo 80 > $npubw/bw_hwmon/io_percent
echo 20 > $npubw/bw_hwmon/hist_memory
echo 10 > $npubw/bw_hwmon/hyst_length
echo 30 > $npubw/bw_hwmon/down_thres
echo 0 > $npubw/bw_hwmon/guard_band_mbps
echo 250 > $npubw/bw_hwmon/up_scale
echo 0 > $npubw/bw_hwmon/idle_mbps
echo 40 > $npubw/polling_interval
echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
done
#Enable mem_latency governor for L3, LLCC, and DDR scaling
for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
do
echo "mem_latency" > $memlat/governor
echo 10 > $memlat/polling_interval
echo 400 > $memlat/mem_latency/ratio_ceil
done
#Enable cdspl3 governor for L3 cdsp nodes
for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
do
echo "cdspl3" > $l3cdsp/governor
done
#Gold L3 ratio ceil
echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
#Enable compute governor for gold latfloor
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
do
echo "compute" > $latfloor/governor
echo 10 > $latfloor/polling_interval
done
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
do
echo "bw_hwmon" > $llccbw/governor
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $llccbw/bw_hwmon/mbps_zones
echo 4 > $llccbw/bw_hwmon/sample_ms
echo 68 > $llccbw/bw_hwmon/io_percent
echo 20 > $llccbw/bw_hwmon/hist_memory
echo 0 > $llccbw/bw_hwmon/hyst_length
echo 80 > $llccbw/bw_hwmon/down_thres
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
echo 250 > $llccbw/bw_hwmon/up_scale
echo 1600 > $llccbw/bw_hwmon/idle_mbps
echo 40 > $llccbw/polling_interval
done
for npubw in $device/*npu*-npu-ddr-bw/devfreq/*npu*-npu-ddr-bw
do
echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
echo "bw_hwmon" > $npubw/governor
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $npubw/bw_hwmon/mbps_zones
echo 4 > $npubw/bw_hwmon/sample_ms
echo 80 > $npubw/bw_hwmon/io_percent
echo 20 > $npubw/bw_hwmon/hist_memory
echo 10 > $npubw/bw_hwmon/hyst_length
echo 30 > $npubw/bw_hwmon/down_thres
echo 0 > $npubw/bw_hwmon/guard_band_mbps
echo 250 > $npubw/bw_hwmon/up_scale
echo 0 > $npubw/bw_hwmon/idle_mbps
echo 40 > $npubw/polling_interval
echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
done
done
# cpuset parameters
echo 0-5 > /dev/cpuset/background/cpus
# memlat specific settings are moved to separate file under
# device/target specific folder
setprop vendor.dcvs.prop 1
# cpuset parameters for power save
echo 0-3 > /dev/cpuset/background/cpus
echo 0-5 > /dev/cpuset/system-background/cpus
# Turn off scheduler boost at the end
@@ -214,8 +288,8 @@ echo 0 > /proc/sys/kernel/sched_boost
# Turn on sleep modes
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
# configure zram
configure_zram_parameters
# Change IO scheduler to noop for better performance
echo noop > /sys/block/sda/queue/scheduler
# Post-setup services
setprop vendor.post_boot.parsed 1
# Create 1 kswapd thread
echo 1 > /proc/sys/vm/kswapd_threads

View File

@@ -1,2 +0,0 @@
allow hal_secure_element_default nfc_hwservice:hwservice_manager { find add };
binder_call(hal_secure_element_default, nfc_hwservice)

View File

@@ -25,9 +25,10 @@ persist.vendor.camera.oissr.debug=1
vendor.debug.camera.eisv2enable=1
vendor.debug.camera.eisv3enable=1
# Allow privileged camera apps
persist.vendor.camera.privapp.list=com.android.camera,com.google.camera,org.lineageos.aperture
persist.vendor.camera.privapp.list=org.lineageos.aperture,org.codeaurora.snapcam,com.android.camera,com.google.camera
# Allow aux cameras
vendor.camera.aux.packagelist=com.android.camera,com.google.camera,org.lineageos.aperture
vendor.camera.aux.packagelist=org.lineageos.aperture,org.codeaurora.snapcam,com.android.camera,com.google.camera
persist.vendor.camera.expose.aux=1
# CNE
persist.vendor.cne.feature=1
@@ -122,11 +123,6 @@ persist.vendor.ssr.restart_level=ALL_ENABLE
persist.debug.wfd.enable=1
persist.sys.wfd.virtual=0
# ZRAM
ro.zram.mark_idle_delay_mins=60
ro.zram.first_wb_delay_mins=180
ro.zram.periodic_wb_delay_hours=24
#SkiaGL
debug.renderengine.backend=skiaglthreaded
renderthread.skia.reduceopstasksplitting=true

View File

@@ -112,6 +112,7 @@ ro.hardware.egl=adreno
ro.hardware.vulkan=adreno
ro.opengles.version=196610
ro.vendor.cabc.enable=true
ro.surface_flinger.blur_disabled_by_default=true
vendor.display.comp_mask=0
vendor.display.disable_decimation=1
vendor.display.disable_excl_rect=0
@@ -151,9 +152,6 @@ ro.qcom.adreno.qgl.ShaderStorageImageExtendedFormats=0
# FM
vendor.hw.fm.init=0
# FRP
ro.frp.pst=/dev/block/bootdevice/by-name/frp
#Graphics
debug.hwui.use_hint_manager=true
debug.hwui.target_cpu_time_percent=30