42 Commits
bka ... udc

Author SHA1 Message Date
Jesse Chan
9a59c08d36 sdm845-common: overlay: configure SQLite to operate in MEMORY mode
This change yields considerable SQLite performance gains. It
should be generally safe as this device has irremovable battery.

Some OEMs have been doing this for years.

Change-Id: I873c6abfa088de43d2f6dec18d6d106fe23251ba
Signed-off-by: Jesse Chan <jc@lineageos.org>
Signed-off-by: PainKiller3 <ninadpatil100@gmail.com>
2024-10-31 02:42:17 +07:00
Albert I
a76d5245ec sdm845-common: Inherit several Android Go configurations
Beneficial for everyone, even on non-Go devices.
2024-10-31 02:29:01 +07:00
Mathieu Chartier
74866f585f sdm845-common: Speed profile services and wifi-service to reduce RAM and storage 2024-10-31 02:28:31 +07:00
Le Hong Duc
87c895faf2 Revert "sdm845-common: Reserve space for gapps"
This reverts commit 4a63d9a897.
2024-10-31 02:07:03 +07:00
Terminator-J
d16b0db56a sdm845-common: overlays: Update doze options
DT2W should probably check proximity sensor first to avoid
spurious pocket battery drain.
2024-10-31 02:01:20 +07:00
Le Hong Duc
bf73234013 sdm845-common: Enable volume step settings 2024-10-31 02:01:20 +07:00
Le Hong Duc
962070e390 sdm845-common: Enable double tap ambient support 2024-10-31 02:01:20 +07:00
Le Hong Duc
6ab6d9873e sdm845-common: Initialize Evolution X
Change-Id: I0258ac328e84175984816809986aea2d44a35feb
Signed-off-by: Le Hong Duc <hongducthbk123@gmail.com>
2024-10-31 02:01:20 +07:00
David Sehr
af0ae40ff7 sdm845-common: Enable usage of dex2oat64
Use 64-bit dex2oat for better dexopt time.

Bug: 153380900
Test: boot and install an application
Change-Id: I3e7a6e6e9385ff6564d1a2e6dda004ebb061f095
(cherry picked from commit 126f03be80f57a8a0411842011152d9381589b78)
Merged-In: I3e7a6e6e9385ff6564d1a2e6dda004ebb061f095
2024-10-31 02:00:11 +07:00
Alex Sarraf
d9df48233f sdm845-common: props: Disable SF client composition cache
Disable SF client composition cache. Helps with framework
client target fence management.

Change-Id: I73e03e76f51d00fafad38479be00f4005be50665
2024-10-31 02:00:11 +07:00
Pullakavi Srinivas
f88fe75421 sdm845-common: props: Disable SF composition prediction model.
CRs-Fixed: 3243885
Change-Id: I64f82a25768b561bb343fdb7686b7d6c020d024a
2024-10-31 02:00:11 +07:00
Georg Veichtlbauer
cde90c8d6f sdm845-common: props: Drop SF debug properties
latch_unsignaled defaults to auto single layer in Android 13.

Change-Id: I8d38f3257b5f6b56c0f6b79cf4fb406a47d64af8
2024-10-31 02:00:11 +07:00
SamarV-121
4dc4bf0bd9 sdm845-common: props: Disable continuous transaction tracing on all build types
Change-Id: I95657a00e38f1229675682e784b20cca12c119b0
2024-10-31 02:00:11 +07:00
Sultanxda
f449c56fea sdm845-common: props: Disable vendor.audio.feature.kpi_optimize.enable
We're not using perfd so this is useless.

Change-Id: I862d8bf175c8a99e525f50250ef900cc84da89d9
2024-10-31 02:00:11 +07:00
Georg Veichtlbauer
3fbe17119d sdm845-common: props: remove obsolete SurfaceFlinger properties
* debug.sf.hw & debug.egl.hw were removed.

Change-Id: I8d38f3257b5f6b56c0f6b79cf4fb406a47d64af8
2024-10-31 02:00:11 +07:00
Nirmal Abraham
c98a7e85e9 sdm845-common: props: Disable debug.sf.recomputecrop
Disable recompute crop change in SF

Change-Id: Ifd5bae734ccc4962427a64f789cf9890f10f5965
2024-10-31 02:00:11 +07:00
Lucchetto
a195372ca6 sdm845-common: props: disable phantom process monitoring
Change-Id: Iacf0e8056d3c28fdc15ef497be67d2e1a7ec8b0c
2024-10-31 02:00:11 +07:00
Tim Lin
9e243ecb2e sdm845-common: props: fix MT SMS sent during power off
qcril will block any further MT SMS if previous one is not ACKed.
For this bug, IMS service is not ready and resulted in qcril stuck in blocking state.
This solution will add 30s timer to reset blocking state if there is no ACK from Telephony.

Bug: 169549852
Test: MT SMS during power off
Change-Id: I6f52170654925143aeb55f8bc0cf4c379717e718
2024-10-31 02:00:11 +07:00
Long Ling
ac54194708 sdm845-common: props: Set debug.sf.layer_caching_active_layer_timeout_ms to 1000
Avoid SF cache thrashing in some cases.

Bug: 189928400
Test: no flicking issue with the testbuld (removed displaycolor fix)
      and flicking happens after set the prop to 0
Change-Id: I24aa79001ec21cff18ae5ac8ff988f70ed121061
2024-10-31 02:00:11 +07:00
EmanuelCN
6644e8793a sdm845-common: props: Set UI rendering to skiaglthreaded
Change-Id: I933482d7bd0355dfd9373975cc91c1e8e61e0755
2024-10-31 02:00:11 +07:00
Jun Wang
c8d44ce56a sdm845-common: props: Disable Skia tracing by default
If the prop "debug.hwui.skia_atrace_enabled" is enabled, too many
skia tracing calls will be printed in every frame. This has obvious
overhead on performance/power, and can cause many janks. So disable
it by default, and user can set it manually if necessary.

Change-Id: I90d28ddb77ced0127f941f2b6e4e491859981e51
2024-10-31 02:00:11 +07:00
EmanuelCN
42eff7f0ef sdm845-common: props: Default HWUI renderer to SkiaGL
Change-Id: I2fd62fc46c0e1ab67f94658a35dae26c41ff52dd
2024-10-31 02:00:11 +07:00
bengris32
852f257a05 sdm845-common: props: Tune phase offset duration
Change-Id: I5f7a3de4261beaa6ac8063565ae447b66f5612f2
2024-10-31 02:00:11 +07:00
Emanuel
c008703d9c sdm845-common: props: Use phase offsets as duration
Change-Id: I969c008c086bd7a2ea6f81ca511e39d0f6f3e562
2024-10-31 02:00:11 +07:00
Chenyang Zhong
fbb0f4325a sdm845-common: Ship cgroups.json and task_profiles.json
Google's prebuilt cgroups.json and task_profiles.json for products
launched with previous API levels only covers
ro.product.first_api_level >= 28. [1]

SDM845 devices was launched with Oreo MR1 (API level 27), so schedtune
and task groups are completely broken. Since the system also checks
/vendor/etc for vendor profiles, make a copy of cgroups_28.json
and task_profiles_28.json and ship them to /vendor/etc. Profiles
for previous API levels are all the same anyway.

Test: boot and check /dev/stune/

[1] system/core/libprocessgroup/profiles/

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I65fe622a804a720a97b43d8092cc8a37703f4b64
2024-10-31 02:00:11 +07:00
Chenyang Zhong
ca1008b1c7 sdm845-common: Optimize for kryo385
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2024-10-31 02:00:11 +07:00
Danny Lin
f1b05787ab sdm845-common: Declare support for ARMv8.2 extensions
Change-Id: I0d9f64ef4e676a5f8de93f87e48bf02f48af07af
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2024-10-31 02:00:11 +07:00
Le Hong Duc
e54af76df3 sdm845-common: Only remove some unwanted gapps 2024-10-31 02:00:11 +07:00
Lunarixus
272b9bb04b sdm845-common: Remove packages at build time 2024-10-31 02:00:11 +07:00
mickaelmendes50
55626419e9 sdm845-common: Add Support for ParanoidSense
Change-Id: I75fe56418a40bd559430d6be6d79c80203b8fe7c
2024-10-31 02:00:11 +07:00
Martin Liu
9cec233b65 sdm845-common: adjust zram write back policy
The first default zram write back time is 3 hours which
is for go device to quickly save more ram. For Pixel
devices, we have more working set and could bring launch
time impact if we write back too fast. Thus, adjust the
first time write back time to 24 hours which is aligned
with periodic write back time.

Bug: 166739872
Test: boot

Change-Id: If1398bc44db0619cf2e2be87d4813972c0454dba
Signed-off-by: Martin Liu <liumartin@google.com>
2024-10-31 02:00:11 +07:00
Minchan Kim
89ee258d14 sdm845-common: Enable zram writeback job scheduler
Bug: 140882488
Change-Id: I5489a7ce7a8d73306a6ecf69f57d338b2b0eaad2
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2024-10-31 02:00:11 +07:00
Luofan Chen
78454e7e5e sdm845-common: Setup zram and zram writeback
Following Pixel's way of setting up zram and zram writeback, see https://github.com/LineageOS/android_hardware_google_pixel/tree/lineage-21.0/mm

Change-Id: I9220aa49929f7d37fa1344d8e5eff8a771151341
2024-10-31 02:00:11 +07:00
me-cafebabe
54c1b2627b sdm845-common: Preserve enough space for full gapps installation
It appears to be some popular gapps installers chooses a biggest partition to install.
Most of gapps files normally resides in product partition, let's enlarge it.

Signed-off-by: GhostMaster69-dev <rathore6375@gmail.com>
2024-10-31 02:00:11 +07:00
me-cafebabe
1514ecfe3d sdm845-common: Disable custom inode count calculation for SSI partitions
Signed-off-by: GhostMaster69-dev <rathore6375@gmail.com>
2024-10-31 02:00:11 +07:00
me-cafebabe
c732629622 sdm845-common: Refactor partition flags
* Set file system type and copy out for each partition
* Set reserved size with a foreach loop

Co-authored-by: Sebastiano Barezzi <barezzisebastiano@gmail.com>
Signed-off-by: GhostMaster69-dev <rathore6375@gmail.com>
2024-10-31 02:00:11 +07:00
Sebastiano Barezzi
c570a41089 sdm845-common: Use logdump as metadata partition
* We have a 64MB unused partition, why not use it

Change-Id: Ie0fafa8285eaebb24589073581ff9575f40c89e9
2024-10-31 02:00:11 +07:00
Tim Zimmermann
f5a74be96e sdm845-common: Flash dummy super image if needed
* Needed because stock does not use dynamic partitions so
  there's no existing metadata that could be used

Change-Id: Icbc828389465f3d4681ca8e4c3adec782540752e
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2024-10-31 02:00:11 +07:00
Ivan Vecera
c7813e9c4f sdm845-common: Set TARGET_USES_YCRCB_VENUS_CAMERA_ENCODE
Fixes red & blue colors swapped in DeviceAsWebcam.

Change-Id: I0dcfe6d354674dd5b374d73e64cd0dac2a1aae36
2024-10-30 20:09:32 +07:00
me-cafebabe
471a12514c sdm845-common: Migrate to QTI USB Gadget 1.2 HIDL
Change-Id: I6adbca2fab9a3fe0477d17f9786166828b786710
2024-10-30 20:09:32 +07:00
me-cafebabe
1f9b42f154 sdm845-common: Move usage of USB MTP/PTP functionality with USB F_FS driver
* `vendor/qcom/opensource/usb/vendor_product.mk` enables it for
  kernel 4.9~4.19, and we're on kernel 4.9

Change-Id: I7bc8153b4016ab804d4e385ece5808f187a87886
2024-10-30 20:09:32 +07:00
me-cafebabe
12cea79c69 sdm845-common: Setup DeviceAsWebcam
Change-Id: Icf8e10cd21c4eef9a66af624971ffe9c4d39d992
2024-10-30 20:09:32 +07:00
19 changed files with 278 additions and 43 deletions

View File

@@ -46,4 +46,18 @@ $(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE)
ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_INI_SYMLINK) $(WCNSS_MAC_SYMLINK)
LPFLASH := $(HOST_OUT_EXECUTABLES)/lpflash$(HOST_EXECUTABLE_SUFFIX)
INSTALLED_SUPERIMAGE_DUMMY_TARGET := $(PRODUCT_OUT)/super_dummy.img
$(INSTALLED_SUPERIMAGE_DUMMY_TARGET): $(PRODUCT_OUT)/super_empty.img $(LPFLASH)
$(call pretty,"Target dummy super image: $@")
$(hide) touch $@
$(hide) echo $(CURDIR)
$(hide) $(LPFLASH) $(CURDIR)/$@ $(CURDIR)/$(PRODUCT_OUT)/super_empty.img
.PHONY: super_dummyimage
super_dummyimage: $(INSTALLED_SUPERIMAGE_DUMMY_TARGET)
INSTALLED_RADIOIMAGE_TARGET += $(INSTALLED_SUPERIMAGE_DUMMY_TARGET)
endif

View File

@@ -12,18 +12,16 @@ COMMON_PATH := device/xiaomi/sdm845-common
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_ARCH_VARIANT := armv8-2a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_VARIANT_RUNTIME := kryo385
TARGET_CPU_VARIANT:= kryo385
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_ARCH_VARIANT := armv8-2a
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic
TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
TARGET_2ND_CPU_VARIANT := kryo385
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := sdm845
@@ -47,6 +45,9 @@ TARGET_BOARD_PLATFORM := sdm845
# Audio
TARGET_PROVIDES_AUDIO_EXTNS := true
# Camera
TARGET_USES_YCRCB_CAMERA_ENCODE := true
# Filesystem
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
@@ -71,16 +72,20 @@ DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
TARGET_LMKD_STATS_LOG := true
# Partitions
SSI_PARTITIONS := system system_ext product
TREBLE_PARTITIONS := vendor odm
ALL_PARTITIONS := $(SSI_PARTITIONS) $(TREBLE_PARTITIONS)
$(foreach p, $(call to-upper, $(ALL_PARTITIONS)), \
$(eval BOARD_$(p)IMAGE_FILE_SYSTEM_TYPE := ext4) \
$(eval TARGET_COPY_OUT_$(p) := $(call to-lower, $(p))))
BOARD_BOOTIMAGE_PARTITION_SIZE := 67092480
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_USERDATAIMAGE_PARTITION_SIZE := 57453555712
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USES_METADATA_PARTITION := true
BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
@@ -92,11 +97,9 @@ BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 3221225472
BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 1073741824
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := $(ALL_PARTITIONS)
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 5163188224 # (BOARD_SUPER_PARTITION_SIZE - 4194304) 4MiB overhead
include vendor/lineage/config/BoardConfigReservedSize.mk
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
@@ -106,6 +109,21 @@ TARGET_COPY_OUT_PRODUCT := product
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
TARGET_COPY_OUT_VENDOR := vendor
# Partitions - reserved size
$(foreach p, $(call to-upper, $(SSI_PARTITIONS)), \
$(eval BOARD_$(p)IMAGE_EXTFS_INODE_COUNT := -1))
$(foreach p, $(call to-upper, $(TREBLE_PARTITIONS)), \
$(eval BOARD_$(p)IMAGE_EXTFS_INODE_COUNT := 5120))
$(foreach p, $(call to-upper, $(SSI_PARTITIONS)), \
$(eval BOARD_$(p)IMAGE_PARTITION_RESERVED_SIZE := 52428800)) # 50 MB
$(foreach p, $(call to-upper, $(TREBLE_PARTITIONS)), \
$(eval BOARD_$(p)IMAGE_PARTITION_RESERVED_SIZE := 20971520)) # 20 MB
ifneq ($(WITH_GMS),true)
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 1287651328 # 1228 MB
endif
# Power
TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB := //$(COMMON_PATH):libperfmgr-ext-xiaomi

16
evolution.dependencies Normal file
View File

@@ -0,0 +1,16 @@
[
{
"repository": "LineageOS/android_hardware_xiaomi",
"target_path": "hardware/xiaomi",
"remote": "github-non-los",
"branch": "lineage-21"
},
{
"repository": "vendor_xiaomi_sdm845-common",
"target_path": "vendor/xiaomi/sdm845-common"
},
{
"repository": "kernel_xiaomi_sdm845",
"target_path": "kernel/xiaomi/sdm845"
}
]

View File

@@ -1,10 +0,0 @@
[
{
"repository": "android_hardware_xiaomi",
"target_path": "hardware/xiaomi"
},
{
"repository": "android_kernel_xiaomi_sdm845",
"target_path": "kernel/xiaomi/sdm845"
}
]

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018-2022 The LineageOS Project
Copyright (C) 2024 crDroid Android 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>
<!-- Doze: does the double tap sensor need a proximity check? -->
<bool name="doze_double_tap_proximity_check">true</bool>
</resources>

View File

@@ -20,6 +20,7 @@
<!-- Defines the actions shown in advanced reboot submenu -->
<string-array name="config_restartActionsList">
<item>restart</item>
<item>restart_systemui</item>
<item>restart_recovery</item>
<item>restart_bootloader</item>
<item>restart_fastboot</item>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020-2024 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.
-->
<resources>
<!-- Whether to show double tap ambient settings -->
<bool name="config_supports_double_tap_ambient" translatable="false">true</bool>
<!-- Whether to show volume steps settings -->
<bool name="config_supports_volume_steps" translatable="false">true</bool>
</resources>

View File

@@ -284,4 +284,35 @@
<string-array name="config_biometric_sensors" translatable="false" >
<item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
</string-array>
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
<bool name="config_zramWriteback">true</bool>
<!-- The default journal mode to use use when Write-Ahead Logging is not active.
Choices are: OFF, DELETE, TRUNCATE, PERSIST and MEMORY.
PERSIST may improve performance by reducing how often journal blocks are
reallocated (compared to truncation) resulting in better data block locality
and less churn of the storage media.
The PERSIST mode results in data persisting in the journal beyond the life of
a transaction, so it interacts poorly with SECURE_DELETE. -->
<string name="db_default_journal_mode" translatable="false">MEMORY</string>
<!-- The database synchronization mode when using the default journal mode.
FULL is safest and preserves durability at the cost of extra fsyncs.
NORMAL also preserves durability in non-WAL modes and uses checksums to ensure
integrity although there is a small chance that an error might go unnoticed.
Choices are: FULL, NORMAL, OFF. -->
<string name="db_default_sync_mode" translatable="false">OFF</string>
<!-- The database synchronization mode when using Write-Ahead Logging.
From https://www.sqlite.org/pragma.html#pragma_synchronous:
WAL mode is safe from corruption with synchronous=NORMAL, and probably DELETE mode is safe
too on modern filesystems. WAL mode is always consistent with synchronous=NORMAL, but WAL
mode does lose durability. A transaction committed in WAL mode with
synchronous=NORMAL might roll back following a power loss or system crash.
Transactions are durable across application crashes regardless of the synchronous setting
or journal mode. The synchronous=NORMAL setting is a good choice for most applications
running in WAL mode.
Choices are: FULL, NORMAL, OFF. -->
<string name="db_wal_sync_mode" translatable="false">OFF</string>
</resources>

View File

@@ -0,0 +1,7 @@
[
"/dev/video0",
"/dev/video1",
"/dev/video2",
"/dev/video32",
"/dev/video33"
]

View File

@@ -0,0 +1,20 @@
#!/system/bin/sh
#
# Copyright (C) 2021 The PixelExperience Project
#
# SPDX-License-Identifier: Apache-2.0
#
SUPER="/dev/block/by-name/system"
mkdir /tmp/super-mnt
mount $SUPER /tmp/super-mnt 2>/dev/null
if [ "$?" = "0" ]; then
echo "Detected stock /system in super partition, flashing super_dummy.img!"
umount /tmp/super-mnt
dd if=/tmp/super_dummy.img of=$SUPER
fi
rmdir /tmp/super-mnt

View File

@@ -1,6 +1,6 @@
# Copyright (C) 2009 The Android Open Source Project
# Copyright (c) 2011, The Linux Foundation. All rights reserved.
# Copyright (C) 2017-2023 The LineageOS Project
# Copyright (C) 2017-2024 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.
@@ -17,6 +17,13 @@
import common
import re
def FullOTA_InstallBegin(info):
AddImage(info, "RADIO", "super_dummy.img", "/tmp/super_dummy.img");
info.script.AppendExtra('package_extract_file("install/bin/flash_super_dummy.sh", "/tmp/flash_super_dummy.sh");')
info.script.AppendExtra('set_metadata("/tmp/flash_super_dummy.sh", "uid", 0, "gid", 0, "mode", 0755);')
info.script.AppendExtra('run_program("/tmp/flash_super_dummy.sh");')
return
def FullOTA_InstallEnd(info):
OTA_InstallEnd(info)
return
@@ -33,8 +40,8 @@ def IncrementalOTA_Assertions(info):
AddTrustZoneAssertion(info, info.target_zip)
return
def AddImage(info, basename, dest):
path = "IMAGES/" + basename
def AddImage(info, dir, basename, dest):
path = dir + "/" + basename
if path not in info.input_zip.namelist():
return
@@ -44,8 +51,8 @@ def AddImage(info, basename, dest):
info.script.AppendExtra('package_extract_file("%s", "%s");' % (basename, dest))
def OTA_InstallEnd(info):
AddImage(info, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo")
AddImage(info, "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta")
AddImage(info, "IMAGES", "dtbo.img", "/dev/block/bootdevice/by-name/dtbo")
AddImage(info, "IMAGES", "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta")
return
def AddTrustZoneAssertion(info, input_zip):

View File

@@ -0,0 +1,27 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := RemovePackages
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_TAGS := optional
LOCAL_OVERRIDES_PACKAGES := \
AdaptiveVPNPrebuilt-10307 \
AiWallpapers \
arcore-1.42 \
Backgrounds \
Chrome \
GoogleTTS \
PixelLiveWallpaperPrebuilt \
PixelWallpapers2024 \
ScribePrebuilt \
SoundAmplifierPrebuilt \
SwitchAccessPrebuilt \
talkback \
Photos \
Tycho \
VoiceAccessPrebuilt
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_SRC_FILES := /dev/null
include $(BUILD_PREBUILT)

View File

@@ -1,5 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.zram
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/fstab.zram
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.early_boot.sh
LOCAL_MODULE_TAGS := optional

1
rootdir/etc/fstab.zram Normal file
View File

@@ -0,0 +1 @@
/dev/block/zram0 none swap defaults zramsize=50%,zram_backingdev_size=512M,max_comp_streams=8

View File

@@ -132,7 +132,6 @@ on property:init.svc.vendor.charger=running
mount tmpfs tmpfs /data
start vendor.thermal-engine
setprop vendor.usb.controller a600000.dwc3
setprop sys.usb.configfs 1
on enable-low-power
# Set the default IRQ affinity to the silver cluster.

View File

@@ -472,6 +472,11 @@ on property:sys.boot_completed=1
write /sys/block/sdf/queue/nr_requests 128
write /sys/block/sdf/queue/iostats 1
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz4
write /proc/sys/vm/page-cluster 0
swapon_all /vendor/etc/fstab.zram
start qcom-post-boot
# corefile limit

View File

@@ -115,6 +115,7 @@ PRODUCT_PACKAGES += \
# Common init scripts
PRODUCT_PACKAGES += \
fstab.zram \
init.qcom.early_boot.sh \
init.qcom.post_boot.sh \
init.qcom.rc \
@@ -124,12 +125,18 @@ PRODUCT_PACKAGES += \
init.qcom.usb.rc \
init.qcom.usb.sh \
init.recovery.qcom.rc \
ueventd.qcom.rc
ueventd.qcom.rc \
usb_compositions.conf
# Configstore
PRODUCT_PACKAGES += \
disable_configstore
# Cgroup and task profiles
PRODUCT_COPY_FILES += \
system/core/libprocessgroup/profiles/cgroups_28.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json \
system/core/libprocessgroup/profiles/task_profiles_28.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
# Context Hub
PRODUCT_PACKAGES += \
android.hardware.contexthub@1.0-impl.generic \
@@ -280,6 +287,9 @@ PRODUCT_PACKAGES += \
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/partitions/flash_super_dummy.sh:install/bin/flash_super_dummy.sh
# Power
PRODUCT_PACKAGES += \
android.hardware.power-service.lineage-libperfmgr \
@@ -316,6 +326,10 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
librecovery_updater_xiaomi
# Remove unwanted packages
PRODUCT_PACKAGES += \
RemovePackages
# Seccomp policy
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
@@ -337,6 +351,11 @@ PRODUCT_SOONG_NAMESPACES += \
hardware/xiaomi \
vendor/qcom/opensource/usb/etc
# Speed profile services and wifi-service to reduce RAM and storage
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := frameworks/base/config/boot-image-profile.txt
# Telephony
PRODUCT_PACKAGES += \
ims-ext-common \
@@ -356,7 +375,8 @@ PRODUCT_PACKAGES += \
# USB
PRODUCT_PACKAGES += \
android.hardware.usb@1.3-service.dual_role_usb
android.hardware.usb@1.3-service.dual_role_usb \
android.hardware.usb.gadget@1.2-service-qti
# Vibrator
PRODUCT_PACKAGES += \

View File

@@ -17,6 +17,9 @@ persist.data.df.dev_name=rmnet_usb0
persist.vendor.data.mode=concurrent
ro.vendor.use_data_netmgrd=true
# Dex2oat
dalvik.vm.dex2oat64.enabled=true
# Display post-processing
ro.qualcomm.cabl=0
ro.vendor.display.ad=1
@@ -29,12 +32,17 @@ ro.fastbootd.available=true
# Graphics
debug.sf.auto_latch_unsignaled=0
debug.sf.early_app_phase_offset_ns=500000
debug.sf.early_gl_app_phase_offset_ns=15000000
debug.sf.early_gl_phase_offset_ns=3000000
debug.sf.early_phase_offset_ns=500000
debug.sf.enable_advanced_sf_phase_offset=1
debug.sf.use_phase_offsets_as_durations=1
debug.sf.late.sf.duration=27600000
debug.sf.late.app.duration=20000000
debug.sf.early.sf.duration=27600000
debug.sf.early.app.duration=20000000
debug.sf.earlyGl.sf.duration=27600000
debug.sf.earlyGl.app.duration=20000000
debug.sf.hwc.min.duration=23000000
debug.sf.layer_caching_active_layer_timeout_ms=1000
debug.sf.enable_hwc_vds=1
debug.sf.latch_unsignaled=1
persist.demo.hdmirotationlock=false
persist.sys.sf.native_mode=0
ro.surface_flinger.enable_frame_rate_override=false
@@ -74,3 +82,8 @@ ril.subscription.types=NV,RUIM
ro.com.android.dataroaming=true
ro.telephony.default_network=22,22
telephony.lteOnCdmaDevice=1
# Zram
ro.zram.first_wb_delay_mins=1440
ro.zram.mark_idle_delay_mins=60
ro.zram.periodic_wb_delay_hours=24

View File

@@ -42,7 +42,7 @@ vendor.audio.feature.hifi_audio.enable=false
vendor.audio.feature.hwdep_cal.enable=false
vendor.audio.feature.incall_music.enable=false
vendor.audio.feature.keep_alive.enable=false
vendor.audio.feature.kpi_optimize.enable=true
vendor.audio.feature.kpi_optimize.enable=false
vendor.audio.feature.maxx_audio.enable=false
vendor.audio.feature.multi_voice_session.enable=true
vendor.audio.feature.ras.enable=true
@@ -102,7 +102,7 @@ persist.vendor.qcom.bluetooth.twsp_state.enabled=false
vendor.qcom.bluetooth.soc=cherokee
# Camera
vendor.camera.aux.packagelist=com.android.camera,org.codeaurora.snapcam,org.lineageos.aperture,org.lineageos.aperture.dev
vendor.camera.aux.packagelist=com.android.camera,org.codeaurora.snapcam,org.lineageos.aperture,co.aospa.sense
# Chipset
ro.soc.manufacturer=Qualcomm
@@ -128,12 +128,19 @@ drm.service.enabled=true
ro.frp.pst=/dev/block/bootdevice/by-name/frp
# Graphics
debug.egl.hw=0
debug.sf.hw=0
debug.sf.disable_client_composition_cache=1
debug.sf.enable_transaction_tracing=false
debug.sf.predict_hwc_composition_strategy=0
debug.sf.recomputecrop=0
ro.hardware.egl=adreno
ro.hardware.vulkan=adreno
ro.opengles.version=196610
# HWUI
debug.hwui.renderer=skiagl
debug.hwui.skia_atrace_enabled=false
debug.renderengine.backend=skiaglthreaded
# IMS
persist.dbg.volte_avail_ovr=1
persist.dbg.vt_avail_ovr=1
@@ -168,18 +175,25 @@ persist.vendor.data.iwlan.enable=true
# Perf
ro.vendor.extension_library=libqti-perfd-client.so
# Phantom process monitoring
sys.fflag.override.settings_enable_monitor_phantom_procs=false
# Radio
persist.vendor.radio.enableadvancedscan=false
persist.vendor.radio.mt_sms_ack=30
# USB
ro.usb.uvc.enabled=true
sys.usb.mtp.batchcancel=1
vendor.usb.controller=a600000.dwc3
vendor.usb.diag.func.name=diag
vendor.usb.dpl.inst.name=dpl
vendor.usb.qdss.inst.name=qdss
vendor.usb.rmnet.func.name=gsi
vendor.usb.rmnet.inst.name=rmnet
vendor.usb.rndis.func.name=gsi
vendor.usb.use_ffs_mtp=0
vendor.usb.use_gadget_hal=0
vendor.usb.use_ffs_mtp=1
vendor.usb.use_gadget_hal=1
# Zygote
zygote.critical_window.minute=10