62 Commits
vic ... bka

Author SHA1 Message Date
77bfc857be sm8350-common: parts: Switch to SwitchPreferenceCompat 2026-01-21 09:26:11 +09:00
Bruno Martins
0a48861515 sm8350-common: parts: Apply Expressive theme
Change-Id: I03c814b97c8401428f2b358d065a99503df9d1cc
2025-12-31 01:44:34 +09:00
Bruno Martins
9d601a8e70 sm8350-common: parts: Defer applying divider
Android 16 QPR1 + M3E changes the inflation and lifecycle timing of
PreferenceFragmentCompat layouts, resulting in internal RecyclerView
being created later than before.

As a result, PreferenceFragmentCompat.setDivider() can be invoked
before the internal RecyclerView exists thus causing below NPE:

  11-25 18:06:19.705 7903 7903 E AndroidRuntime: FATAL EXCEPTION: main
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: Process: org.lineageos.lineageparts, PID: 7903
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.recyclerview.widget.RecyclerView.invalidateItemDecorations()' on a null object reference
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at androidx.preference.PreferenceFragmentCompat$DividerDecoration.setDivider(PreferenceFragmentCompat.java:909)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at androidx.preference.PreferenceFragmentCompat.setDivider(PreferenceFragmentCompat.java:247)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at com.android.settingslib.widget.SettingsBasePreferenceFragment.onViewCreated(SettingsBasePreferenceFragment.kt:47)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at org.lineageos.lineageparts.SettingsPreferenceFragment.onViewCreated(SettingsPreferenceFragment.java:156)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at org.lineageos.lineageparts.profiles.SetupTriggersFragment.onViewCreated(SetupTriggersFragment.java:89)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3099)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:607)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:285)
  (...)
 # 11-25 18:06:19.705 7903 7903 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:9041)
 # 11-25 18:06:19.705 7903 7903 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
  11-25 18:06:19.705 7903 7903 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
  11-25 18:06:19.727 2241 6629 W ActivityTaskManager: Force finishing activity org.lineageos.lineageparts/.PartsActivity

Test: Open System profiles settings, create a new profile and verify
      that the activity no longer crashes.
Change-Id: Ifb741011baaa6d721d0ca0db2d68d30037eb8930
2025-12-31 01:44:27 +09:00
0xCAFEBABE
d4ae3d2235 sm8350-common: Update some soong config variables to bool type 2025-12-30 22:37:38 +09:00
LuK1337
cd33b79ad5 sm8350-common: Remove vendor/lineage device framework matrix inclusion 2025-12-30 22:34:02 +09:00
beingashwani
dc2446bd7d sm8350-common: disable verbose camera logs
* fixes camera jitter/ui lag in some scenario
2025-10-14 04:16:22 +09:00
Subhajeet Muhuri
a5bae6559a sm8350-common: Silence Codec2 spammy logs
I QC2Buf  : Buffer 0xf3041d10 imported as 0xf3042690
W QC2V4l2Codec: [avcD_13] unknown/unsupported param Output::HdrStaticMetadata index = 0xD200180A

Change-Id: I5de137760aa0ffb5cb52a12ae074c2862de24a40
2025-10-14 04:15:50 +09:00
dhanush281
1de080ddfe sm8350-common: props: Force disable low ram config
Signed-off-by: kenway214 <kenway214@outlook.com>
2025-10-14 04:08:35 +09:00
009b8ac153 Revert "sm8350-common: properties: adjust LMKD"
This reverts commit 0191b499f4.
2025-10-14 04:08:07 +09:00
Sourajit Karmakar
58cb5002e6 sm8350-common: Disable FRP
* This should really be disabled after unlocking the bootloader.

Change-Id: Icf5305cba66e9e613000a6ef53b32fa59760a7f2
2025-10-14 04:04:17 +09:00
Joey Huab
c926702c11 Revert "[SQUASH] sm8350-common: fastcharge implementation"
This reverts commit d2793a3f48.
2025-08-19 12:09:53 +09:00
Joey Huab
eee22f781a Revert "sm8350-common: remove IRestricted from fastcharge"
This reverts commit 307240d592.
2025-08-19 12:03:18 +09:00
Joey Huab
e9a919f61c Revert "sm8350-common: rro_overlays: Enable ambient AOD"
This reverts commit 51f11a7fa7.
2025-08-09 01:48:27 +09:00
Adithya R
510ca4bbf1 sm8350-common: Move citsensorservice to background cpuset
This service hogs a considerable amount of CPU all the time as its
busy calculating compensation for our under-display light sensor
(and also spamming logcat, which we can take care of later).

  PID USER         PR  NI VIRT  RES  SHR S[%CPU] %MEM     TIME+ ARGS
 1969 system 20 0 12G 9.2M 9.0M S 4.6 0.1 1:13.15
vendor.xiaomi.sensor.citsensorservice@2.0-service

Move it to background CPU set like the sensors multihal to lower
power consumption from big cores.

Change-Id: I8c7b2835b2b53654642ac20fd97df3b8a5ad96eb
2025-08-08 22:26:04 +09:00
Giovanni Ricca
9297fe32e1 sm8350-common: Commonize citsensor stack
Change-Id: I2902359ad66a6e94e40cf9dee9f52c0803e9dfad
2025-08-08 22:25:59 +09:00
Sugakesshaa
963c464686 sm8350-common: overlay: Overlay Dolby Atmos profiles
Change-Id: I67998e9329004e416e6e5a66e9d4b0d9fe919b43
2025-08-08 22:11:38 +09:00
Adithya R
2a84ed6887 sm8350-common: Add sepolicy for Dolby Atmos
Change-Id: I8c41ff32e579cec9c871d6a0177ca027034281c8
2025-08-08 21:39:03 +09:00
Fabian Leutenegger
080fdc7bfc sm8350-common: Link dolby blobs against v33 libstagefright_foundation
* fixes crashes and absurdly high CPU usage while using dolby

Co-authored-by: Woomymy <woomy@woomy.be>
Change-Id: Ib72b775dae677f3085d0b0e2afcbb709d8690063
2025-08-08 20:44:32 +09:00
Sugakesshaa
fab88decab sm8350-common: Import Dolby C2 Media service
from OnePlus 11 CPH2447_15.0.0.401(EX01)

Change-Id: Icdfc5b11c7635d0707c2a39f54e0c8d149c771bc
2025-08-08 20:44:26 +09:00
Omkar Chandorkar
9eb7717818 sm8350-common: Introduce Dolby Atmos support
Change-Id: I46b62d08ad51c321c997792301524fc0c18d6ba6
Co-authored-by: Sugakesshaa <sugakesshaa@gmail.com>
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
2025-08-08 20:44:15 +09:00
sushmit1
c67ab03fd1 sm8350-common: Add libmisoundfx 2025-07-25 15:03:52 +09:00
New Author Name
9e457375ca sm8350-common: Remove FM Tuner from audio input devices
* This fixes google voice recorder

Change-Id: If42676a0087e055e3164da4b0cc43987e32d82b3
2025-07-25 11:54:03 +09:00
jjpprrrr
d119fa6826 sm8350-common: audio: Remove quad mic
*This fixes in-game mic for various games
2025-07-25 11:54:03 +09:00
AdarshGrewal
c2785ff90e sm8350-common: audio: Disable Stereo channel support for voip over audio path
* This breaks in-game voice chat and audio in some messaging apps
   causing it to plays with a higher pitch and speed, making it sound
   like chipmunks.

Change-Id: I0baf0d01481b755372c3420bb58b73d2f38eb2d9
2025-07-25 11:54:03 +09:00
Joey Huab
2d44c6d394 Revert "sm8350-common: add ViPER4FX if-exists"
This reverts commit 907517572b.
2025-07-24 16:11:55 +09:00
Vincent Wang
95bfb8503b sm8350-common: rro_overlays: Enable fp screen off unlock feature
Edit: Turn on by default

Bug: 389002332
Flag: android.hardware.biometrics.screen_off_unlock_udfps
Test: 1. FP screen off unlock should be included in settings
      2. FP screen off unlock should be enabled by default
Change-Id: I65eda6ae6f69ff4e6a3191d91fb8be42797c7fcb
Signed-off-by: ralph950412 <ralph950412@gmail.com>
2025-07-17 00:04:45 +09:00
Matt Pietal
51f11a7fa7 sm8350-common: rro_overlays: Enable ambient AOD
Bug: 373844670
Test: manual - check devices
Flag: com.android.systemui.shared.ambient_aod
Change-Id: I793e7dbab1c039ba82a1f96b7d56ca4b3e1ebbfe
2025-07-17 00:04:45 +09:00
Yumi Yukimura
7b92d5a258 sm8350-common: Setup DeviceAsWebcam
Change-Id: Icf8e10cd21c4eef9a66af624971ffe9c4d39d992
2025-07-17 00:04:45 +09:00
Roberto Sartori
eb486d4bb7 sm8350-common: Switch from time_daemon to TimeKeep
* time_daemon just refuses to work properly on mata.
    Sony's TimeKeep, instead, does the job flawlessly,
    so just ditch the former in favor of the latter.

Signed-off-by: Roberto Sartori <roberto.sartori.android@gmail.com>
Change-Id: I54f50ed3d49efc2834d478781b15e6ee428a3062
2025-07-17 00:04:45 +09:00
Giovanni Ricca
6e0adc2285 sm8350-common: Decommonize libQnnHtpStub
Turns out this is platform specific. Fixes crashes on
libarcsoft_super_night_raw calls on yupik devices

Change-Id: I06b22517d313a8eeb116b0b969615203b0d53823
2025-07-17 00:04:45 +09:00
Alexander Winkowski
bcfc991349 sm8350-common: Use SPDX copyright headers
Change-Id: I0ea8da2780914a239929d48de9b9caaccf098224
2025-07-17 00:04:45 +09:00
Edgar Arriaga
2f7dc94b0f sm8350-common: overlay: Set default pin amount for home app
Bug: 288900050
Test: dumpsys pinner
Flag: EXEMPT refactor

Change-Id: I87e15ec968f59acd65e3d4bc80d1bad08704bc53
2025-07-17 00:04:45 +09:00
Michael Bestas
359345383d sm8350-common: overlay: Remove deprecated config_mobile_tcp_buffers/networkAttributes
Change-Id: Ieda947e283cde11cf74a01dc1b438e1deeb902c9
2025-07-17 00:04:45 +09:00
Chenyang Zhong
51901d3c8f sm8350-common: overlay: drop sw372dp dimens
This one seems to be overriding the actual overlayed value of
rounded_corner_content_padding on the device side.

Change-Id: I64383583a6a54e44a9c801bb3c8dd14c11fa45f9
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2025-07-17 00:04:45 +09:00
Giovanni Ricca
3db25260f9 sm8350-common: Add Xiaomi FX Tunnel manifest entry
Change-Id: Id3d1690bf8ce2af92afeb7d4b16d20b5bf30d3f0
2025-07-17 00:04:41 +09:00
Giovanni Ricca
f61b75ba58 sm8350-common: sepolicy: Unlabel Xiaomi Dtool service
Change-Id: I8a35505f4d0d369dd8160f1b425f4c5c48f38325
2025-07-15 17:53:58 +09:00
Demon000
b1c5641e8a sm8350-common: Add support for udfps long press sensor
Change-Id: I7196dce967c9adbc62bb5156ade749c92c7780a1
2025-07-15 17:53:56 +09:00
Giovanni Ricca
e2491ea9c0 sm8350-common: Opt-in libudfpshandler
Change-Id: If67c415d33215d9ef954ded4d118aad5841e589a
2025-07-15 17:53:56 +09:00
Michael Bestas
71ab56973e sm8350-common: Enable UFFD GC
Kernel has support for it now.

Change-Id: I3863ee71477f321fe47646571b857fdc39a1902b
2025-07-15 17:53:42 +09:00
basamaryan
989dd25e37 sm8350-common: Shim libwfdservice with libaudioclient_shim
Change-Id: Idd6603ad16926226f22423a2bba2075d430015d5
2025-07-10 18:43:46 +09:00
Michael Bestas
4114fac832 sm8350-common: sepolicy: Remove duplicate labels
Change-Id: I3575e6bad93b2f9d69f94033944c44b7f9fbc243
2025-07-10 18:43:46 +09:00
ralph950412
a28ac22367 sm8350-common: Commonize libcvapiv2*
Change-Id: I7b4f2df7620177a00b99b35fe58d463ac97ea2fa
2025-07-10 18:43:43 +09:00
ArianK16a
9fce812db4 sm8350-common: Kang libops.so from Davinci
- Helps fix DRM issues
2025-07-10 18:43:43 +09:00
Joey Huab
b95891af58 Revert "sm8350-common: set ART debug to release mode"
This reverts commit 727abe81d8.
2025-07-10 07:44:22 +09:00
ghostrider-reborn
ae9ba3a846 sm8350-common: Fix battery and USB OTG detection in recovery mode
* in lahaina (msm-5.4) pmic driver now lies in adsp [1], so
   adsp firmware must to be loaded along with qti battery/
   charger kernel module, in order to get battery and usb
   power_supply up & running

[1]:
https://source.codeaurora.org/quic/la/device/qcom/common/commit/rootdir/etc/init.recovery.qcom.rc?h=LA.UM.9.14.r1-18600-LAHAINA.0&id=4e2b0f663a8f4b73000c81999055363411aaf12c

Depends-On: Id0e64302dbbdc53620cbc1825c36e13bb9e58aef
Change-Id: I835fa5daaa53eb704cc6c0777d7069d47ecbe10c
2025-07-02 20:30:08 +09:00
Bruno Martins
596ef97ec6 sm8350-common: sepolicy: Label extcon_usb1 nodes
W ExtconUEventObserver: Unable to read /sys/devices/platform/soc/soc:extcon_usb1/extcon/extcon3/cable.0/name. This probably means the selinux policies need to be changed.
W ExtconUEventObserver: Unable to read /sys/devices/platform/soc/soc:extcon_usb1/extcon/extcon3/cable.1/name. This probably means the selinux policies need to be changed.

Change-Id: I92d728a1bc283beedf33b015c3115221140d527d
2025-07-02 20:30:08 +09:00
Yumi Yukimura
4c3749d1b1 sm8350-common: Migrate to QTI USB Gadget AIDL HAL
Change-Id: I6adbca2fab9a3fe0477d17f9786166828b786710
2025-07-02 11:24:52 +09:00
LuK1337
71ccd9f528 sm8350-common: Pull appropriate USB props from vendor_product.mk
Change-Id: I93b25c5d0989c83d1c8d7b7946a083771febdddd
2025-07-02 11:24:52 +09:00
Pratham Pratap
5081d2b8af sm8350-common: Set sys.usb.mtp.batchcancel for MTP over FFS
* Currently, cancelEvents in MTP will cancel the requests one by
   one, and it will check each response to confirm success or
   failure. However, if kernel usb controller driver got the
   cancel request, the driver will handle all requests in the same
   endpoint so that the second io_cancel in cancelEvents will be
   useless causing the cancelEvents to return error and fail the
   transfer.

 * Fix this by setting sys.usb.mtp.batchcancel for the targets
   using MTP over FFS.

Change-Id: Icea9a2815c79ff710ee887d02e4c99dfe5ad6361
2025-07-02 11:24:52 +09:00
Jack Pham
3e51157bc7 sm8350-common: Configure USB Diag over FFS
On targets where diag-router is used, override the
vendor.usb.diag.func.name property to 'ffs' to
instantiate the Diag function instances to use
F_FS instead of the legacy f_diag driver.

Change-Id: I529a081a0d6988628944a9020b61c061baa877a4
2025-07-02 11:24:52 +09:00
Alexander Koskovich
a27ef14baf sm8350-common: Pick up USB configurations from QCOM
Change-Id: I83882d8992eb367211871130c163f4ca5689fcd4
2025-07-02 11:24:52 +09:00
Giovanni Ricca
460fd03ac3 sm8350-common: udfps: Workaround onFingerDown() race
`onFingerDown()` may be called after authentication has been completed,
leaving HBM enabled. Use a dummy variable to skip HBM activation when
authentication has already succeeded.

Note: This is a temporary solution until we figure out what is really
going on.

Change-Id: Ie738b0dbe8a51e99f2bf9f922b60e725fa2888ee
2025-07-02 11:24:52 +09:00
Arian
b76d62679f sm8350-common: udfps: Switch to unique fd and shared pointer to avoid memory leaks
Change-Id: I746bfd8dbbb20a30ff173ed50b8e0ffaee73bda2
2025-07-02 11:24:52 +09:00
Arian
a03f04db59 sm8350-common: udfps: Kill fod_status
Instead we enable hbm directly from the biometrics hal functions.
This allows to drop a lot of complexity in the touchscreen drivers
and more precise control of when to show the lhbm circle.

Change-Id: I046dd1fdcaf4a8ef93923be04110868b956bc580
2025-07-02 11:24:52 +09:00
Giovanni Ricca
4297204b2b sm8350-common: udfps: Run clang-format
Change-Id: I43243c9d9c74d2f2e64ba5e52d2d7002218b6c21
2025-07-02 11:24:52 +09:00
Steven Moreland
ca638f1631 sm8350-common: Add clang-format with symlink.
Automatic consistency.

Bug: 122835115
Test: manual
Change-Id: I6583f9f7923a822aa11f1839fbf375c1063a89c6
2025-07-02 11:24:52 +09:00
Arian
d3f5be9209 sm8350-common: sepolicy: Allow fingeprint hal to get SYS_NICE capability
This is needed to set the process priority to SCHED_FIFO, which is done
by libgf_hal.so.

Change-Id: I5708e2c5d8eac6f8e8685cce9dd1ddbcd508bb17
2025-06-30 07:38:18 +09:00
kamikaonashi
7c3684e310 sm8350-common: parts: add simple GPU Manager
add a simple GPU Manager to let users adjust some basic GPU controls
2025-06-30 07:38:18 +09:00
kamikaonashi
848f8d9e3b sm8350-common: parts: add simple Kernel Manager
this creates a simple kernel manager, that allows for setting the governos, min and max frequencies for each cluster
lets give the users the possibility to change cpu freq and governor without root
2025-06-30 07:38:18 +09:00
kamikaonashi
ff0caba431 sm8350-common: parts: add Kamis Stuff and shift some settings there 2025-06-30 07:38:18 +09:00
kamikaonashi
0191b499f4 sm8350-common: properties: adjust LMKD
adjust LMKD values
ref:
https://source.android.com/docs/core/perf/lmkd
2025-06-30 07:38:18 +09:00
LuK1337
bb81a8eb38 sm8350-common: Switch to NCM USB tethering
Change-Id: I20b6b2b2e26a45d8b28c7483afc83ad4da4b8643
Signed-off-by: Fiqri Ardyansyah <fiqri191002@gmail.com>
2025-06-30 07:38:18 +09:00
80 changed files with 2121 additions and 1939 deletions

1
.clang-format Symbolic link
View File

@@ -0,0 +1 @@
../../../build/soong/scripts/system-clang-format

View File

@@ -1,5 +1,5 @@
//
// Copyright (C) 2020-2024 The LineageOS Project
// SPDX-FileCopyrightText: The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

View File

@@ -1,6 +1,5 @@
#
# Copyright (C) 2020 The LineageOS Project
#
# SPDX-FileCopyrightText: The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
@@ -39,12 +38,6 @@ TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a76
# ART
ART_BUILD_TARGET_NDEBUG := true
ART_BUILD_TARGET_DEBUG := false
ART_BUILD_HOST_NDEBUG := true
ART_BUILD_HOST_DEBUG := false
# Audio
AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
AUDIO_FEATURE_ENABLED_GKI := true
@@ -73,7 +66,6 @@ DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
hardware/xiaomi/vintf/xiaomi_framework_compatibility_matrix.xml \
vendor/lineage/config/device_framework_matrix.xml \
$(COMMON_PATH)/hidl/vendor_framework_compatibility_matrix.xml \
$(COMMON_PATH)/hidl/xiaomi_framework_compatibility_matrix.xml
@@ -81,6 +73,11 @@ DEVICE_MANIFEST_FILE := \
$(COMMON_PATH)/hidl/manifest_lahaina.xml \
$(COMMON_PATH)/hidl/manifest_xiaomi.xml
ifeq ($(TARGET_HAS_UDFPS),true)
DEVICE_MANIFEST_FILE += \
$(COMMON_PATH)/hidl/manifest_udfps.xml
endif
# Kernel
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_IMAGE_NAME := Image
@@ -167,6 +164,7 @@ VENDOR_SECURITY_PATCH := 2025-06-05
# Sepolicy
include device/lineage/sepolicy/libperfmgr/sepolicy.mk
include device/qcom/sepolicy_vndr/SEPolicy.mk
include hardware/sony/timekeep/sepolicy/SEPolicy.mk
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public

View File

@@ -41,7 +41,10 @@
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<library name="v4a_re" path="libv4a_re.so"/>
<!-- DOLBY DAP -->
<library name="dap_sw" path="libswdap_v3_6.so"/>
<library name="dap_hw" path="libhwdap_v3_6.so"/>
<!-- DOLBY END -->
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
@@ -90,7 +93,12 @@
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
<effect name="v4a_standard_re" library="v4a_re" uuid="90380da3-8536-4744-a6a3-5731970e640f"/>
<!-- DOLBY DAP -->
<effectProxy name="dap" library="proxy" uuid="9d4921da-8225-4f29-aefa-39537a04bcaa">
<libsw library="dap_sw" uuid="6ab06da4-c516-4611-8166-452799218539"/>
<libhw library="dap_hw" uuid="a0c30891-8246-4aef-b8ad-d53e26da0253"/>
</effectProxy>
<!-- DOLBY END -->
</effects>
<postprocess>
<stream type="music">

View File

@@ -90,7 +90,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<item>Telephony Tx</item>
<item>Built-In Mic</item>
<item>Built-In Back Mic</item>
<item>FM Tuner</item>
<item>Telephony Rx</item>
</attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice>
@@ -190,7 +189,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<mixPort name="voip_rx" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
<mixPort name="incall_music_uplink" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
@@ -210,11 +209,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</mixPort>
<mixPort name="quad mic" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_INDEX_MASK_4"/>
</mixPort>
<mixPort name="voip_tx" role="sink"
flags="AUDIO_INPUT_FLAG_VOIP_TX">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
@@ -324,11 +318,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -381,13 +370,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,Telephony Rx"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="fast input"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,Wired Headset Mic"/>
<route type="mix" sink="quad mic"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,Wired Headset Mic"/>
<route type="mix" sink="voip_tx"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="record_24"

View File

@@ -1,6 +1,5 @@
#
# Copyright (C) 2024 The LineageOS Project
#
# SPDX-FileCopyrightText: The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
@@ -9,9 +8,6 @@ $(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)
# Call the ViperFX Config
$(call inherit-product-if-exists, packages/apps/ViPER4AndroidFX/config.mk)
# Enable virtual A/B OTA
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
@@ -139,6 +135,8 @@ PRODUCT_SET_DEBUGFS_RESTRICTIONS := true
# Device-specific settings
PRODUCT_PACKAGES += \
DSPVolumeSynchronizer \
XiaomiDolby \
XiaomiDolbyResCommon \
XiaomiParts
# Display
@@ -168,14 +166,22 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
fastbootd
# Fastcharge
PRODUCT_PACKAGES += \
vendor.lineage.fastcharge@1.0-service.venus
# Fingerprint
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint-service.xiaomi
ifeq ($(TARGET_HAS_UDFPS),true)
PRODUCT_PACKAGES += \
libudfpshandler \
sensors.xiaomi.v2
PRODUCT_PACKAGES += \
FrameworkOverlayUDFPS
PRODUCT_VENDOR_PROPERTIES += \
ro.vendor.sensors.xiaomi.udfps=true
endif
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
@@ -239,7 +245,6 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/init.batterysecret.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.batterysecret.rc \
$(LOCAL_PATH)/rootdir/etc/init.mi_thermald.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.mi_thermald.rc \
$(LOCAL_PATH)/rootdir/etc/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.rc \
$(LOCAL_PATH)/rootdir/etc/init.qcom.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.usb.rc \
$(LOCAL_PATH)/rootdir/etc/init.qti.kernel.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qti.kernel.rc \
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc
@@ -268,18 +273,19 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
# Kernel
PRODUCT_ENABLE_UFFD_GC := false
PRODUCT_ENABLE_UFFD_GC := true
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
$(call soong_config_set,lineage_health,charging_control_supports_bypass,false)
$(call soong_config_set_bool,lineage_health,charging_control_supports_bypass,false)
# Media
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/media/init.qti.media.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.media.sh \
$(LOCAL_PATH)/media/init.qti.media.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qti.media.rc
$(LOCAL_PATH)/media/init.qti.media.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qti.media.rc \
$(LOCAL_PATH)/media/media_codecs_c2_dolby_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2_dolby_audio.xml
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/media/lahaina/media_codecs_lahaina.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_lahaina.xml \
@@ -331,6 +337,10 @@ DEVICE_PACKAGE_OVERLAYS += \
PRODUCT_ENFORCE_RRO_TARGETS := *
PRODUCT_PACKAGES += \
DeviceAsWebcamOverlaySM8350 \
NcmTetheringOverlay
# Partitions
PRODUCT_PACKAGES += \
vendor_bt_firmware_mountpoint \
@@ -421,6 +431,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
android.hardware.thermal-service.qti
# TimeKeep
PRODUCT_PACKAGES += \
TimeKeep
# Touchscreen
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
@@ -437,7 +451,16 @@ PRODUCT_PACKAGES += \
# USB
PRODUCT_PACKAGES += \
android.hardware.usb-service.qti
android.hardware.usb-service.qti \
android.hardware.usb.gadget-service.qti \
usb_compositions.conf
PRODUCT_PACKAGES += \
init.qcom.usb.rc \
init.qcom.usb.sh
PRODUCT_SOONG_NAMESPACES += \
vendor/qcom/opensource/usb/etc
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \

View File

@@ -55,12 +55,15 @@ blob_fixups: blob_fixups_user_type = {
.regex_replace(r'(start|stop) wfdservice\b', r'\1 wfdservice64'),
'system_ext/lib64/libwfdmmsrc_system.so': blob_fixup()
.add_needed('libgui_shim.so'),
'system_ext/lib64/libwfdservice.so': blob_fixup()
('system_ext/lib/libwfdservice.so', 'system_ext/lib64/libwfdservice.so'): blob_fixup()
.add_needed('libaudioclient_shim.so')
.replace_needed('android.media.audio.common.types-V2-cpp.so', 'android.media.audio.common.types-V4-cpp.so'),
'system_ext/lib64/libwfdnative.so': blob_fixup()
.remove_needed('android.hidl.base@1.0.so')
.add_needed('libbinder_shim.so')
.add_needed('libinput_shim.so'),
'vendor/etc/init/vendor.xiaomi.hardware.citsensorservice@1.1-service.rc': blob_fixup()
.add_line_if_missing(' task_profiles ServiceCapacityLow'),
('vendor/etc/media_lahaina/video_system_specs.json', 'vendor/etc/media_shima_v1/video_system_specs.json', 'vendor/etc/media_yupik_v1/video_system_specs.json'): blob_fixup()
.regex_replace('"max_retry_alloc_output_timeout": 10000,', '"max_retry_alloc_output_timeout": 0,'),
'vendor/etc/vintf/manifest/c2_manifest_vendor.xml': blob_fixup()
@@ -70,6 +73,35 @@ blob_fixups: blob_fixups_user_type = {
.add_needed('libcrypto_shim.so'),
'vendor/lib64/android.hardware.secure_element@1.0-impl.so': blob_fixup()
.remove_needed('android.hidl.base@1.0.so'),
# Dolby START
'odm/bin/hw/vendor.dolby_sp.media.c2@1.0-service': blob_fixup()
.replace_needed('libcodec2_hidl@1.0.so', 'libcodec2_hidl@1.0_sp.so')
.replace_needed('libcodec2_vndk.so', 'libcodec2_vndk_sp.so'),
'odm/lib64/libcodec2_store_dolby_sp.so': blob_fixup()
.replace_needed('libcodec2_vndk.so', 'libcodec2_vndk_sp.so'),
('odm/lib64/libcodec2_soft_ac4dec_sp.so', 'odm/lib64/libcodec2_soft_ddpdec_sp.so'): blob_fixup()
.replace_needed('libcodec2_vndk.so', 'libcodec2_vndk_sp.so')
.replace_needed('libcodec2_soft_common.so', 'libcodec2_soft_common_sp.so')
.replace_needed('libstagefright_foundation.so', 'libstagefright_foundation-v33.so'),
('odm/lib64/libcodec2_soft_common_sp.so', 'odm/lib64/libcodec2_hidl_plugin_sp.so'): blob_fixup()
.replace_needed('libcodec2_vndk.so', 'libcodec2_vndk_sp.so')
.replace_needed('libstagefright_foundation.so', 'libstagefright_foundation-v33.so'),
(
'odm/lib/libdlbdsservice_v3_6.so',
'odm/lib/libstagefright_soft_ddpdec.so',
'odm/lib64/libdlbdsservice_sp.so',
'odm/lib64/libdlbdsservice_v3_6.so'
): blob_fixup().replace_needed('libstagefright_foundation.so', 'libstagefright_foundation-v33.so'),
'odm/lib64/libcodec2_vndk_sp.so': blob_fixup()
.replace_needed('libui.so', 'libui_sp.so')
.replace_needed('libstagefright_foundation.so', 'libstagefright_foundation-v33.so'),
'odm/lib64/libcodec2_hidl@1.0_sp.so': blob_fixup()
.replace_needed('libcodec2_hidl_plugin.so', 'libcodec2_hidl_plugin_sp.so')
.replace_needed('libcodec2_vndk.so', 'libcodec2_vndk_sp.so'),
'odm/lib64/libui_sp.so': blob_fixup()
.replace_needed('android.hardware.graphics.common-V3-ndk.so', 'android.hardware.graphics.common-V5-ndk.so')
.replace_needed('android.hardware.graphics.allocator-V1-ndk.so', 'android.hardware.graphics.allocator-V2-ndk.so'),
# Dolby END
} # fmt: skip
module = ExtractUtilsModule(

View File

@@ -1,19 +0,0 @@
cc_binary {
name: "vendor.lineage.fastcharge@1.0-service.venus",
relative_install_path: "hw",
init_rc: ["vendor.lineage.fastcharge@1.0-service.venus.rc"],
vintf_fragments: ["vendor.lineage.fastcharge@1.0-service.venus.xml"],
vendor: true,
shared_libs: [
"libbase",
"libbinder",
"libcutils",
"libhidlbase",
"libutils",
"vendor.lineage.fastcharge@1.0",
],
srcs: [
"FastCharge.cpp",
"service.cpp",
],
}

View File

@@ -1,59 +0,0 @@
/*
* Copyright (C) 2023 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.
*/
#define LOG_TAG "fastcharge@1.0-service.venus"
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <cstdlib>
#include "FastCharge.h"
namespace vendor {
namespace lineage {
namespace fastcharge {
namespace V1_0 {
namespace implementation {
static constexpr const char *kFastChargingProp = "persist.vendor.sec.fastchg_enabled";
static constexpr bool FASTCHARGE_DEFAULT_SETTING = true;
FastCharge::FastCharge() {
android::base::SetProperty(kFastChargingProp, "true");
system("start batterysecret");
}
android::hardware::Return<bool> FastCharge::isEnabled() {
return android::hardware::Return<bool>(android::base::GetBoolProperty(kFastChargingProp, false));
}
android::hardware::Return<bool> FastCharge::setEnabled(bool enable) {
android::base::SetProperty(kFastChargingProp, enable ? "true" : "false");
if (enable) {
system("start batterysecret");
} else {
system("stop batterysecret");
}
return android::hardware::Return<bool>(enable);
}
} // namespace implementation
} // namespace V1_0
} // namespace fastcharge
} // namespace lineage
} // namespace vendor

View File

@@ -1,50 +0,0 @@
/*
* Copyright (C) 2023 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.
*/
#pragma once
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/fastcharge/1.0/IFastCharge.h>
namespace vendor {
namespace lineage {
namespace fastcharge {
namespace V1_0 {
namespace implementation {
using ::android::sp;
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::vendor::lineage::fastcharge::V1_0::IFastCharge;
struct FastCharge : public IFastCharge {
FastCharge();
Return<bool> isEnabled() override;
Return<bool> setEnabled(bool enable) override;
};
} // namespace implementation
} // namespace V1_0
} // namespace fastcharge
} // namespace lineage
} // namespace vendor

View File

@@ -1,50 +0,0 @@
/*
* Copyright (C) 2023 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.
*/
#define LOG_TAG "fastcharge@1.0-service.venus"
#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
#include "FastCharge.h"
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using vendor::lineage::fastcharge::V1_0::IFastCharge;
using vendor::lineage::fastcharge::V1_0::implementation::FastCharge;
using android::OK;
using android::status_t;
int main() {
android::sp<FastCharge> service = new FastCharge();
configureRpcThreadpool(1, true);
status_t status = service->registerAsService();
if (status != OK) {
LOG(ERROR) << "Cannot register FastCharge HAL service.";
return 1;
}
LOG(INFO) << "FastCharge HAL service ready.";
joinRpcThreadpool();
LOG(ERROR) << "FastCharge HAL service failed to join thread pool.";
return 1;
}

View File

@@ -1,10 +0,0 @@
service vendor.fastcharge-hal-1-0 /vendor/bin/hw/vendor.lineage.fastcharge@1.0-service.venus
class hal
user system
group system
on property:persist.vendor.sec.fastchg_enabled=true
start batterysecret
on property:persist.vendor.sec.fastchg_enabled=false
stop batterysecret

View File

@@ -1,10 +1,10 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>vendor.lineage.fastcharge</name>
<name>vendor.xiaomi.hardware.fx.tunnel</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IFastCharge</name>
<name>IMiFxTunnel</name>
<instance>default</instance>
</interface>
</hal>

View File

@@ -103,6 +103,7 @@
-->
<MediaCodecs>
<Include href="media_codecs_c2_dolby_audio.xml" />
<Settings>
<Domain name="telephony" enabled="true" />
<Setting name="max-video-encoder-input-buffers" value="11" />

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
This program is protected under international and U.S. copyright laws as
an unpublished work. This program is confidential and proprietary to the
copyright owners. Reproduction or disclosure, in whole or in part, or the
production of derivative works therefrom without the express permission of
the copyright owners is prohibited.
Copyright (C) 2020-2021 by Dolby Laboratories,
All rights reserved.
-->
<Included>
<Decoders>
<!-- DOLBY_UDC -->
<MediaCodec name="c2.dolby.eac3.decoder" >
<Type name="audio/ac3">
<Alias name="OMX.dolby.ac3.decoder" />
<Limit name="channel-count" max="6" />
<Limit name="sample-rate" ranges="32000,44100,48000" />
<Limit name="bitrate" range="32000-640000" />
</Type>
<Type name="audio/eac3">
<Alias name="OMX.dolby.eac3.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="32000,44100,48000" />
<Limit name="bitrate" range="32000-6144000" />
</Type>
<Type name="audio/eac3-joc">
<Alias name="OMX.dolby.eac3-joc.decoder" />
<Limit name="channel-count" max="16" />
<Limit name="sample-rate" ranges="48000" />
<Limit name="bitrate" range="32000-6144000" />
</Type>
</MediaCodec>
<!-- DOLBY_UDC END -->
</Decoders>
</Included>

View File

@@ -83,6 +83,7 @@
-->
<MediaCodecs>
<Include href="media_codecs_c2_dolby_audio.xml" />
<Settings>
<Domain name="telephony" enabled="true" />
<Setting name="max-video-encoder-input-buffers" value="11" />

View File

@@ -75,6 +75,7 @@
-->
<MediaCodecs>
<Include href="media_codecs_c2_dolby_audio.xml" />
<Settings>
<Domain name="telephony" enabled="true" />
<Setting name="max-video-encoder-input-buffers" value="11" />

View File

@@ -1,2 +1,9 @@
# Qcom
ro.vendor.qti.va_odm.support=1
# Dolby
ro.vendor.dolby.dax.version=DAX3_3.6.0.12_r1
ro.vendor.dolby.model=PAFM00
ro.vendor.dolby.device=OP46C3
ro.vendor.dolby.manufacturer=OPLUS
ro.vendor.dolby.brand=OPLUS

View File

@@ -21,49 +21,6 @@
<!-- The restoring is handled by modem if it is true-->
<bool name="skip_restoring_network_selection">true</bool>
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
<string-array name="networkAttributes">
<item>wifi,1,1,1,-1,true</item>
<item>mobile,0,0,0,-1,true</item>
<item>mobile_mms,2,0,4,60000,true</item>
<item>mobile_supl,3,0,2,60000,true</item>
<item>mobile_dun,4,0,2,60000,true</item>
<item>mobile_hipri,5,0,3,60000,true</item>
<item>mobile_fota,10,0,2,60000,true</item>
<item>mobile_ims,11,0,2,60000,true</item>
<item>mobile_cbs,12,0,2,60000,true</item>
<item>bluetooth,7,7,2,-1,true</item>
<item>mobile_emergency,15,0,5,-1,true</item>
<item>ethernet,9,9,9,-1,true</item>
<item>wifi_slave,30,1,1,-1,true</item>
</string-array>
<!-- Configure mobile tcp buffer sizes in the form:
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
If no value is found for the rat-name in use, the system default will be applied.
-->
<string-array name="config_mobile_tcp_buffers">
<item>5gnr:2097152,6291456,16777216,512000,2097152,8388608</item>
<item>lte:2097152,4194304,8388608,262144,524288,1048576</item>
<item>lte_ca:4096,6291456,12582912,4096,1048576,2097152</item>
<item>umts:4094,87380,1220608,4096,16384,1220608</item>
<item>hspa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsupa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsdpa:4094,87380,1220608,4096,16384,1220608</item>
<item>hspap:4094,87380,1220608,4096,16384,1220608</item>
<item>edge:4093,26280,35040,4096,16384,35040</item>
<item>gprs:4092,8760,11680,4096,8760,11680</item>
<item>evdo:4094,87380,524288,4096,16384,262144</item>
</string-array>
<!-- This string array should be overridden by the device to present a list of radio
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
@@ -207,8 +164,8 @@
<item>"/system/bin/surfaceflinger"</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>
<!-- True if camera app should be pinned via Pinner Service -->
<bool name="config_pinnerCameraApp">false</bool>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (c) 2006, 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>
<dimen name="rounded_corner_content_padding">16dp</dimen>
</resources>

View File

@@ -36,7 +36,7 @@
android:persistent="true"
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true"
android:theme="@style/Theme.SubSettingsBase">
android:theme="@style/Theme.SubSettingsBase.Expressive">
<receiver android:name=".BootCompletedReceiver">
<intent-filter android:priority="1000">
@@ -45,6 +45,48 @@
</intent-filter>
</receiver>
<activity
android:name=".kamisstuff.KamisStuffActivity"
android:label="@string/kamis_stuff_title">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.system" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/kamis_stuff_summary" />
<meta-data
android:name="com.android.settings.icon"
android:resource="@drawable/ic_kami" />
</activity>
<activity
android:name=".zram.ZramActivity"
android:label="@string/zram_size_title"
android:exported="false" />
<activity
android:name=".charge.ChargeActivity"
android:label="@string/charge_bypass_title"
android:exported="false" />
<activity
android:name=".corecontrol.CoreControlActivity"
android:label="@string/core_control_title"
android:exported="false" />
<activity
android:name=".kernelmanager.KernelManagerActivity"
android:label="@string/kernel_manager_title"
android:exported="false" />
<activity
android:name=".gpumanager.GpuManagerActivity"
android:label="@string/gpu_manager_title"
android:exported="false" />
<activity
android:name=".doze.DozeSettingsActivity"
android:label="@string/ambient_display_title">
@@ -73,52 +115,9 @@
android:permission="ThermalService">
</service>
<activity
android:name=".zram.ZramActivity"
android:label="@string/zram_size_title">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.battery" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/zram_summary" />
</activity>
<activity
android:name=".charge.ChargeActivity"
android:label="@string/charge_bypass_title">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.battery" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/charge_bypass_summary" />
</activity>
<activity
android:name=".corecontrol.CoreControlActivity"
android:label="@string/core_control_title">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.battery" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/core_control_summary" />
</activity>
<activity
android:name=".touchsampling.TouchSamplingSettingsActivity"
android:label="@string/htsr_enable_title"
android:theme="@style/Theme.SubSettingsBase"
android:exported="false">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
@@ -202,8 +201,7 @@
<activity
android:name=".display.DcDimmingSettingsActivity"
android:label="@string/dc_dimming_enable_title"
android:exported="true"
android:theme="@style/Theme.SubSettingsBase">
android:exported="true">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
@@ -217,8 +215,7 @@
<activity
android:name=".hbm.HBMActivity"
android:label="@string/hbm_fragment_title"
android:exported="false"
android:theme="@style/Theme.SubSettingsBase">
android:exported="false">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M8,8h8c0.55,0 1,0.45 1,1v6c0,0.55 -0.45,1 -1,1H8c-0.55,0 -1,-0.45 -1,-1V9c0,-0.55 0.45,-1 1,-1z" />
<path android:fillColor="#000" android:pathData="M9,6h1v2H9z" />
<path android:fillColor="#000" android:pathData="M11,6h1v2h-1z" />
<path android:fillColor="#000" android:pathData="M13,6h1v2h-1z" />
<path android:fillColor="#000" android:pathData="M15,6h1v2h-1z" />
<path android:fillColor="#000" android:pathData="M9,16h1v2H9z" />
<path android:fillColor="#000" android:pathData="M11,16h1v2h-1z" />
<path android:fillColor="#000" android:pathData="M13,16h1v2h-1z" />
<path android:fillColor="#000" android:pathData="M15,16h1v2h-1z" />
<path android:fillColor="#000" android:pathData="M6,9h2v1H6z" />
<path android:fillColor="#000" android:pathData="M6,11h2v1H6z" />
<path android:fillColor="#000" android:pathData="M6,13h2v1H6z" />
<path android:fillColor="#000" android:pathData="M6,15h2v1H6z" />
<path android:fillColor="#000" android:pathData="M16,9h2v1h-2z" />
<path android:fillColor="#000" android:pathData="M16,11h2v1h-2z" />
<path android:fillColor="#000" android:pathData="M16,13h2v1h-2z" />
<path android:fillColor="#000" android:pathData="M16,15h2v1h-2z" />
<path android:fillColor="#FFF" android:pathData="M9.5,9.5h2v2h-2z" />
<path android:fillColor="#FFF" android:pathData="M12.5,9.5h2v2h-2z" />
<path android:fillColor="#FFF" android:pathData="M9.5,12.5h2v2h-2z" />
<path android:fillColor="#FFF" android:pathData="M12.5,12.5h2v2h-2z" />
</vector>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M15.67,4H14V2h-4v2H8.33C7.6,4 7,4.6 7,5.33v15.33C7,21.4 7.6,22 8.33,22h7.33c0.74,0 1.34,-0.6 1.34,-1.33V5.33C17,4.6 16.4,4 15.67,4z" />
<path
android:fillColor="#FFF"
android:pathData="M13,7h-2l-1,5h2l-1,5 3,-5h-2l1,-5z" />
</vector>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M21,16v-2l-8,-5V3.5c0,-0.83 -0.67,-1.5 -1.5,-1.5S10,2.67 10,3.5V9l-8,5v2l8,-2.5V19l-2,1.5V22l3.5,-1L15,22v-1.5L13,19v-5.5L21,16z" />
<path
android:fillColor="#000"
android:pathData="M3,3h2v2H3z" />
<path
android:fillColor="#000"
android:pathData="M19,3h2v2h-2z" />
<path
android:fillColor="#000"
android:pathData="M3,19h2v2H3z" />
<path
android:fillColor="#000"
android:pathData="M19,19h2v2h-2z" />
</vector>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z" />
</vector>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2V17zM13,9h-2V7h2V9z" />
<path
android:fillColor="#000"
android:pathData="M4,12h2v2H4z" />
<path
android:fillColor="#000"
android:pathData="M18,12h2v2h-2z" />
<path
android:fillColor="#000"
android:pathData="M12,4h2v2h-2z" />
<path
android:fillColor="#000"
android:pathData="M12,18h2v2h-2z" />
</vector>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<!-- RAM chip body -->
<path
android:fillColor="#000"
android:pathData="M4,7h16c0.55,0 1,0.45 1,1v8c0,0.55 -0.45,1 -1,1H4c-0.55,0 -1,-0.45 -1,-1V8c0,-0.55 0.45,-1 1,-1z" />
<!-- Left pins -->
<path android:fillColor="#000" android:pathData="M2,8h1v1H2z" />
<path android:fillColor="#000" android:pathData="M2,10h1v1H2z" />
<path android:fillColor="#000" android:pathData="M2,12h1v1H2z" />
<path android:fillColor="#000" android:pathData="M2,14h1v1H2z" />
<!-- Right pins -->
<path android:fillColor="#000" android:pathData="M21,8h1v1h-1z" />
<path android:fillColor="#000" android:pathData="M21,10h1v1h-1z" />
<path android:fillColor="#000" android:pathData="M21,12h1v1h-1z" />
<path android:fillColor="#000" android:pathData="M21,14h1v1h-1z" />
<!-- Internal modules -->
<path android:fillColor="#000" android:pathData="M6,9h2v6H6z" />
<path android:fillColor="#000" android:pathData="M10,9h2v6h-2z" />
<path android:fillColor="#000" android:pathData="M14,9h2v6h-2z" />
<path android:fillColor="#000" android:pathData="M18,9h1v6h-1z" />
</vector>

View File

@@ -110,4 +110,61 @@
<string name="core_5">Core 5 (Big)</string>
<string name="core_6">Core 6 (Big)</string>
<string name="core_7">Core 7 (Prime)</string>
<!-- Kamis Stuff -->
<string name="kamis_stuff_title">Kamis Stuff</string>
<string name="kamis_stuff_summary">Bricking Time!</string>
<!-- Kernel Manager -->
<string name="kernel_manager_title">Kernel Manager</string>
<string name="kernel_manager_summary">Manage CPU frequencies and governor</string>
<string name="cpu_governor_title">CPU Governor</string>
<string name="cpu_governor_summary">Current: %s</string>
<string name="cpu_min_freq_title">Minimum Frequency</string>
<string name="cpu_max_freq_title">Maximum Frequency</string>
<string name="efficiency_cluster_title">Efficiency Cluster</string>
<string name="performance_cluster_title">Performance Cluster</string>
<string name="prime_cluster_title">Prime Cluster</string>
<string name="kernel_info_category">Information</string>
<string name="kernel_info_title">About Kernel Manager</string>
<string name="kernel_info_summary">Manage CPU governor and frequency scaling for all CPU clusters. Changes may affect performance and battery life.</string>
<string name="apply_settings">Apply Settings</string>
<string name="reset_settings">Reset to Default</string>
<string name="settings_applied">Settings applied successfully</string>
<string name="settings_reset">Settings reset to default</string>
<!-- GPU Manager -->
<string name="gpu_manager_title">GPU Manager</string>
<string name="gpu_manager_summary">Manage GPU frequencies and power settings</string>
<string name="gpu_governor_title">GPU Governor</string>
<string name="gpu_governor_summary">Current: %s</string>
<string name="gpu_freq_title">GPU Frequencies</string>
<string name="gpu_min_freq_title">Minimum Frequency</string>
<string name="gpu_max_freq_title">Maximum Frequency</string>
<string name="gpu_current_freq_title">Current Frequency</string>
<string name="gpu_power_title">Power Settings</string>
<string name="gpu_force_clk_on_title">Force Clock On</string>
<string name="gpu_force_clk_on_summary">Keep GPU clock always on</string>
<string name="gpu_force_bus_on_title">Force Bus On</string>
<string name="gpu_force_bus_on_summary">Keep GPU bus always on</string>
<string name="gpu_force_rail_on_title">Force Rail On</string>
<string name="gpu_force_rail_on_summary">Keep GPU power rail always on</string>
<string name="gpu_force_no_nap_title">Force No Nap</string>
<string name="gpu_force_no_nap_summary">Disable GPU napping between frames</string>
<string name="gpu_bus_split_title">Bus Split</string>
<string name="gpu_bus_split_summary">Enable GPU bus splitting</string>
<string name="gpu_thermal_title">Thermal Settings</string>
<string name="gpu_thermal_pwrlevel_title">Thermal Power Level</string>
<string name="gpu_thermal_pwrlevel_summary">Current thermal power level</string>
<string name="gpu_temp_title">GPU Temperature</string>
<string name="gpu_info_title">GPU Information</string>
<string name="gpu_model_title">GPU Model</string>
<string name="gpu_busy_percentage_title">GPU Load</string>
<string name="gpu_reset_count_title">Reset Count</string>
<string name="gpu_preempt_count_title">Preemption Count</string>
<string name="gpu_info_category">GPU Information</string>
<string name="gpu_settings_category">GPU Settings</string>
<string name="gpu_advanced_category">Advanced Settings</string>
<string name="gpu_info_summary">Manage GPU frequency scaling and power settings. Changes may affect performance and battery life.</string>
</resources>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
<SwitchPreferenceCompat
android:key="bypass_charge"
android:title="@string/charge_bypass_title"
android:summary="@string/charge_bypass_summary"

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/clear_speaker_title">
<SwitchPreference
<SwitchPreferenceCompat
android:key="clear_speaker_pref"
android:title="@string/clear_speaker_title"
android:icon="@drawable/ic_clear_speaker"

View File

@@ -2,35 +2,35 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/core_control_title">
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_0"
android:title="@string/core_0" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_1"
android:title="@string/core_1" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_2"
android:title="@string/core_2" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_3"
android:title="@string/core_3" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_4"
android:title="@string/core_4" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_5"
android:title="@string/core_5" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_6"
android:title="@string/core_6" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="core_7"
android:title="@string/core_7" />

View File

@@ -19,7 +19,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/dc_dimming_enable_title">
<SwitchPreference
<SwitchPreferenceCompat
android:key="dc_dimming_enable"
android:defaultValue="false"
android:icon="@drawable/ic_dcdimming"

View File

@@ -24,7 +24,7 @@
android:key="doze_enable"
android:title="@string/ambient_display_enable_title" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="always_on_display"
android:disableDependentsState="true"
android:icon="@drawable/ic_doze_aod"

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/gpu_manager_title">
<!-- GPU Information -->
<PreferenceCategory android:title="@string/gpu_info_category">
<Preference
android:key="gpu_model"
android:title="@string/gpu_model_title"
android:selectable="false" />
<Preference
android:key="gpu_current_freq"
android:title="@string/gpu_current_freq_title"
android:selectable="false" />
<Preference
android:key="gpu_busy_percentage"
android:title="@string/gpu_busy_percentage_title"
android:selectable="false" />
<Preference
android:key="gpu_temperature"
android:title="@string/gpu_temp_title"
android:selectable="false" />
</PreferenceCategory>
<!-- GPU Governor -->
<PreferenceCategory android:title="@string/gpu_governor_title">
<ListPreference
android:key="gpu_governor"
android:title="@string/gpu_governor_title"
android:summary="@string/gpu_governor_summary" />
</PreferenceCategory>
<!-- GPU Frequencies -->
<PreferenceCategory android:title="@string/gpu_freq_title">
<ListPreference
android:key="gpu_min_freq"
android:title="@string/gpu_min_freq_title" />
<ListPreference
android:key="gpu_max_freq"
android:title="@string/gpu_max_freq_title" />
</PreferenceCategory>
<!-- Power Settings -->
<PreferenceCategory android:title="@string/gpu_power_title">
<SwitchPreferenceCompat
android:key="gpu_force_clk_on"
android:title="@string/gpu_force_clk_on_title"
android:summary="@string/gpu_force_clk_on_summary" />
<SwitchPreferenceCompat
android:key="gpu_force_bus_on"
android:title="@string/gpu_force_bus_on_title"
android:summary="@string/gpu_force_bus_on_summary" />
<SwitchPreferenceCompat
android:key="gpu_force_rail_on"
android:title="@string/gpu_force_rail_on_title"
android:summary="@string/gpu_force_rail_on_summary" />
<SwitchPreferenceCompat
android:key="gpu_force_no_nap"
android:title="@string/gpu_force_no_nap_title"
android:summary="@string/gpu_force_no_nap_summary" />
<SwitchPreferenceCompat
android:key="gpu_bus_split"
android:title="@string/gpu_bus_split_title"
android:summary="@string/gpu_bus_split_summary" />
</PreferenceCategory>
<!-- Thermal Settings -->
<PreferenceCategory android:title="@string/gpu_thermal_title">
<Preference
android:key="gpu_thermal_pwrlevel"
android:title="@string/gpu_thermal_pwrlevel_title"
android:summary="@string/gpu_thermal_pwrlevel_summary"
android:selectable="false" />
</PreferenceCategory>
<PreferenceCategory>
<Preference
android:key="apply_gpu_settings"
android:title="@string/apply_settings"
android:summary="Apply current GPU settings" />
<Preference
android:key="reset_gpu_settings"
android:title="@string/reset_settings"
android:summary="Reset all GPU settings to default values" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/kernel_info_category">
<Preference
android:title="@string/gpu_info_title"
android:summary="@string/gpu_info_summary"
android:selectable="false" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -20,13 +20,13 @@
android.title="@string/hbm_fragment_title">
<PreferenceCategory>
<SwitchPreference
<SwitchPreferenceCompat
android:key="hbm"
android:title="@string/hbm_mode_title"
android:summary="@string/hbm_mode_summary"
android:defaultValue="false" />
<SwitchPreference
<SwitchPreferenceCompat
android:key="auto_hbm"
android:title="@string/auto_hbm_title"
android:summary="@string/auto_hbm_summary" />

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/kamis_stuff_title">
<Preference
android:key="core_control"
android:title="@string/core_control_title"
android:summary="@string/core_control_summary"
android:icon="@drawable/ic_cpu" />
<Preference
android:key="bypass_charge"
android:title="@string/charge_bypass_title"
android:summary="@string/charge_bypass_summary"
android:icon="@drawable/ic_fast_charge" />
<Preference
android:key="zram"
android:title="@string/zram_size_title"
android:summary="@string/zram_summary"
android:icon="@drawable/ic_zram" />
<Preference
android:key="kernel_manager"
android:title="@string/kernel_manager_title"
android:summary="@string/kernel_manager_summary"
android:icon="@drawable/ic_kernel_manager" />
<Preference
android:key="gpu_manager"
android:title="@string/gpu_manager_title"
android:summary="@string/gpu_manager_summary"
android:icon="@drawable/ic_gpu_manager" />
</PreferenceScreen>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/kernel_manager_title">
<PreferenceCategory android:title="@string/cpu_governor_title">
<ListPreference
android:key="cpu_governor"
android:title="@string/cpu_governor_title"
android:summary="@string/cpu_governor_summary" />
</PreferenceCategory>
<!-- Efficiency Cluster -->
<PreferenceCategory android:title="@string/efficiency_cluster_title">
<ListPreference
android:key="efficiency_min_freq"
android:title="@string/cpu_min_freq_title" />
<ListPreference
android:key="efficiency_max_freq"
android:title="@string/cpu_max_freq_title" />
</PreferenceCategory>
<!-- Performance Cluster -->
<PreferenceCategory android:title="@string/performance_cluster_title">
<ListPreference
android:key="performance_min_freq"
android:title="@string/cpu_min_freq_title" />
<ListPreference
android:key="performance_max_freq"
android:title="@string/cpu_max_freq_title" />
</PreferenceCategory>
<!-- Prime Cluster -->
<PreferenceCategory android:title="@string/prime_cluster_title">
<ListPreference
android:key="prime_min_freq"
android:title="@string/cpu_min_freq_title" />
<ListPreference
android:key="prime_max_freq"
android:title="@string/cpu_max_freq_title" />
</PreferenceCategory>
<PreferenceCategory>
<Preference
android:key="apply_settings"
android:title="@string/apply_settings"
android:summary="Apply current frequency and governor settings" />
<Preference
android:key="reset_settings"
android:title="@string/reset_settings"
android:summary="Reset all settings to default values" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/kernel_info_category">
<Preference
android:title="@string/kernel_info_title"
android:summary="@string/kernel_info_summary"
android:selectable="false" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -20,7 +20,7 @@ import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import androidx.preference.SwitchPreferenceCompat;
import org.lineageos.settings.R;
@@ -28,7 +28,7 @@ public class ChargeSettingsFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener {
private static final String KEY_BYPASS_CHARGE = "bypass_charge";
private SwitchPreference mBypassChargePreference;
private SwitchPreferenceCompat mBypassChargePreference;
private ChargeUtils mChargeUtils;
@Override
@@ -36,7 +36,7 @@ public class ChargeSettingsFragment extends PreferenceFragment
setPreferencesFromResource(R.xml.charge_settings, rootKey);
mChargeUtils = new ChargeUtils(getActivity());
mBypassChargePreference = (SwitchPreference) findPreference(KEY_BYPASS_CHARGE);
mBypassChargePreference = (SwitchPreferenceCompat) findPreference(KEY_BYPASS_CHARGE);
boolean bypassChargeSupported = mChargeUtils.isBypassChargeSupported();

View File

@@ -21,7 +21,7 @@ import android.util.Log;
import android.widget.Toast;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import androidx.preference.SwitchPreferenceCompat;
import org.lineageos.settings.R;
@@ -31,7 +31,7 @@ public class CoreControlFragment extends PreferenceFragment implements Preferenc
private static final String TAG = "CoreControlFragment";
private static final int NUM_CORES = 8;
private SwitchPreference[] mCorePrefs = new SwitchPreference[NUM_CORES];
private SwitchPreferenceCompat[] mCorePrefs = new SwitchPreferenceCompat[NUM_CORES];
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
@@ -39,7 +39,7 @@ public class CoreControlFragment extends PreferenceFragment implements Preferenc
for (int i = 0; i < NUM_CORES; i++) {
String key = "core_" + i;
mCorePrefs[i] = (SwitchPreference) findPreference(key);
mCorePrefs[i] = (SwitchPreferenceCompat) findPreference(key);
if (mCorePrefs[i] != null) {
mCorePrefs[i].setOnPreferenceChangeListener(this);
mCorePrefs[i].setChecked(isCoreOnline(i));

View File

@@ -28,7 +28,7 @@ import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import androidx.preference.SwitchPreference;
import androidx.preference.SwitchPreferenceCompat;
import android.provider.Settings;
import org.lineageos.settings.R;
@@ -39,7 +39,7 @@ import java.io.File;
public class DcDimmingSettingsFragment extends PreferenceFragment implements
OnPreferenceChangeListener {
private SwitchPreference mDcDimmingPreference;
private SwitchPreferenceCompat mDcDimmingPreference;
private static final String DC_DIMMING_ENABLE_KEY = "dc_dimming_enable";
private static final String DC_DIMMING_NODE = "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/dimlayer_exposure";
private static final String HBM = "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm";

View File

@@ -33,7 +33,7 @@ import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import androidx.preference.SwitchPreferenceCompat;
import com.android.settingslib.widget.MainSwitchPreference;
@@ -44,7 +44,7 @@ public class DozeSettingsFragment extends PreferenceFragment
implements OnPreferenceChangeListener, OnCheckedChangeListener {
private MainSwitchPreference mSwitchBar;
private SwitchPreference mAlwaysOnDisplayPreference;
private SwitchPreferenceCompat mAlwaysOnDisplayPreference;
private ListPreference mDozeBrightnessPreference;
private Handler mHandler = new Handler();
@@ -65,7 +65,7 @@ public class DozeSettingsFragment extends PreferenceFragment
mSwitchBar.addOnSwitchChangeListener(this);
mSwitchBar.setChecked(dozeEnabled);
mAlwaysOnDisplayPreference = (SwitchPreference) findPreference(DozeUtils.ALWAYS_ON_DISPLAY);
mAlwaysOnDisplayPreference = (SwitchPreferenceCompat) findPreference(DozeUtils.ALWAYS_ON_DISPLAY);
mAlwaysOnDisplayPreference.setEnabled(dozeEnabled);
mAlwaysOnDisplayPreference.setChecked(DozeUtils.isAlwaysOnEnabled(getActivity()));
mAlwaysOnDisplayPreference.setOnPreferenceChangeListener(this);

View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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
*/
package org.lineageos.settings.gpumanager;
import android.os.Bundle;
import android.view.MenuItem;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class GpuManagerActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_GPU_MANAGER = "gpu_manager";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(
com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new GpuManagerFragment(), TAG_GPU_MANAGER).commit();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}
return false;
}
}

View File

@@ -0,0 +1,301 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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
*/
package org.lineageos.settings.gpumanager;
import android.os.Bundle;
import android.os.Handler;
import android.widget.Toast;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreferenceCompat;
import org.lineageos.settings.R;
public class GpuManagerFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener {
private static final String KEY_GPU_GOVERNOR = "gpu_governor";
private static final String KEY_GPU_MIN_FREQ = "gpu_min_freq";
private static final String KEY_GPU_MAX_FREQ = "gpu_max_freq";
private static final String KEY_GPU_CURRENT_FREQ = "gpu_current_freq";
private static final String KEY_GPU_MODEL = "gpu_model";
private static final String KEY_GPU_BUSY_PERCENTAGE = "gpu_busy_percentage";
private static final String KEY_GPU_TEMPERATURE = "gpu_temperature";
private static final String KEY_GPU_THERMAL_PWRLEVEL = "gpu_thermal_pwrlevel";
private static final String KEY_GPU_FORCE_CLK_ON = "gpu_force_clk_on";
private static final String KEY_GPU_FORCE_BUS_ON = "gpu_force_bus_on";
private static final String KEY_GPU_FORCE_RAIL_ON = "gpu_force_rail_on";
private static final String KEY_GPU_FORCE_NO_NAP = "gpu_force_no_nap";
private static final String KEY_GPU_BUS_SPLIT = "gpu_bus_split";
private static final String KEY_APPLY_GPU_SETTINGS = "apply_gpu_settings";
private static final String KEY_RESET_GPU_SETTINGS = "reset_gpu_settings";
private GpuManagerUtils mGpuUtils;
private Handler mHandler;
private Runnable mUpdateRunnable;
// Preferences
private ListPreference mGovernorPreference;
private ListPreference mMinFreqPreference, mMaxFreqPreference;
private Preference mCurrentFreqPreference;
private Preference mGpuModelPreference;
private Preference mGpuBusyPreference;
private Preference mGpuTemperaturePreference;
private Preference mThermalPowerLevelPreference;
private SwitchPreferenceCompat mForceClkOnPreference;
private SwitchPreferenceCompat mForceBusOnPreference;
private SwitchPreferenceCompat mForceRailOnPreference;
private SwitchPreferenceCompat mForceNoNapPreference;
private SwitchPreferenceCompat mBusSplitPreference;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
setPreferencesFromResource(R.xml.gpu_manager_settings, rootKey);
mGpuUtils = new GpuManagerUtils();
mHandler = new Handler();
initializePreferences();
loadCurrentSettings();
startPeriodicUpdates();
}
@Override
public void onDestroy() {
super.onDestroy();
stopPeriodicUpdates();
}
private void initializePreferences() {
mGovernorPreference = (ListPreference) findPreference(KEY_GPU_GOVERNOR);
mMinFreqPreference = (ListPreference) findPreference(KEY_GPU_MIN_FREQ);
mMaxFreqPreference = (ListPreference) findPreference(KEY_GPU_MAX_FREQ);
mCurrentFreqPreference = findPreference(KEY_GPU_CURRENT_FREQ);
mGpuModelPreference = findPreference(KEY_GPU_MODEL);
mGpuBusyPreference = findPreference(KEY_GPU_BUSY_PERCENTAGE);
mGpuTemperaturePreference = findPreference(KEY_GPU_TEMPERATURE);
mThermalPowerLevelPreference = findPreference(KEY_GPU_THERMAL_PWRLEVEL);
mForceClkOnPreference = (SwitchPreferenceCompat) findPreference(KEY_GPU_FORCE_CLK_ON);
mForceBusOnPreference = (SwitchPreferenceCompat) findPreference(KEY_GPU_FORCE_BUS_ON);
mForceRailOnPreference = (SwitchPreferenceCompat) findPreference(KEY_GPU_FORCE_RAIL_ON);
mForceNoNapPreference = (SwitchPreferenceCompat) findPreference(KEY_GPU_FORCE_NO_NAP);
mBusSplitPreference = (SwitchPreferenceCompat) findPreference(KEY_GPU_BUS_SPLIT);
// Set listeners
if (mGovernorPreference != null) {
mGovernorPreference.setOnPreferenceChangeListener(this);
}
if (mMinFreqPreference != null) {
mMinFreqPreference.setOnPreferenceChangeListener(this);
}
if (mMaxFreqPreference != null) {
mMaxFreqPreference.setOnPreferenceChangeListener(this);
}
// Switch preferences
if (mForceClkOnPreference != null) {
mForceClkOnPreference.setOnPreferenceChangeListener(this);
}
if (mForceBusOnPreference != null) {
mForceBusOnPreference.setOnPreferenceChangeListener(this);
}
if (mForceRailOnPreference != null) {
mForceRailOnPreference.setOnPreferenceChangeListener(this);
}
if (mForceNoNapPreference != null) {
mForceNoNapPreference.setOnPreferenceChangeListener(this);
}
if (mBusSplitPreference != null) {
mBusSplitPreference.setOnPreferenceChangeListener(this);
}
// Apply and Reset buttons
Preference applyPref = findPreference(KEY_APPLY_GPU_SETTINGS);
if (applyPref != null) {
applyPref.setOnPreferenceClickListener(preference -> {
applySettings();
return true;
});
}
Preference resetPref = findPreference(KEY_RESET_GPU_SETTINGS);
if (resetPref != null) {
resetPref.setOnPreferenceClickListener(preference -> {
resetSettings();
return true;
});
}
}
private void loadCurrentSettings() {
// Load GPU model
if (mGpuModelPreference != null) {
String gpuModel = mGpuUtils.getGpuModel();
mGpuModelPreference.setSummary(gpuModel);
}
// Load available governors
String[] governors = mGpuUtils.getAvailableGovernors();
if (governors != null && mGovernorPreference != null) {
mGovernorPreference.setEntries(governors);
mGovernorPreference.setEntryValues(governors);
String currentGovernor = mGpuUtils.getCurrentGovernor();
mGovernorPreference.setValue(currentGovernor);
mGovernorPreference.setSummary(getString(R.string.gpu_governor_summary, currentGovernor));
}
// Load available frequencies
loadFrequencies();
// Load switch states
loadSwitchStates();
// Update dynamic info
updateDynamicInfo();
}
private void loadFrequencies() {
String[] frequencies = mGpuUtils.getAvailableFrequencies();
if (frequencies != null) {
String[] frequencyLabels = new String[frequencies.length];
for (int i = 0; i < frequencies.length; i++) {
int freqMhz = Integer.parseInt(frequencies[i]) / 1000000;
frequencyLabels[i] = freqMhz + " MHz";
}
if (mMinFreqPreference != null) {
mMinFreqPreference.setEntries(frequencyLabels);
mMinFreqPreference.setEntryValues(frequencies);
String currentMinFreq = mGpuUtils.getCurrentMinFrequency();
mMinFreqPreference.setValue(currentMinFreq);
int minFreqMhz = Integer.parseInt(currentMinFreq) / 1000000;
mMinFreqPreference.setSummary(minFreqMhz + " MHz");
}
if (mMaxFreqPreference != null) {
mMaxFreqPreference.setEntries(frequencyLabels);
mMaxFreqPreference.setEntryValues(frequencies);
String currentMaxFreq = mGpuUtils.getCurrentMaxFrequency();
mMaxFreqPreference.setValue(currentMaxFreq);
int maxFreqMhz = Integer.parseInt(currentMaxFreq) / 1000000;
mMaxFreqPreference.setSummary(maxFreqMhz + " MHz");
}
}
}
private void loadSwitchStates() {
if (mForceClkOnPreference != null) {
mForceClkOnPreference.setChecked(mGpuUtils.getForceClkOn());
}
if (mForceBusOnPreference != null) {
mForceBusOnPreference.setChecked(mGpuUtils.getForceBusOn());
}
if (mForceRailOnPreference != null) {
mForceRailOnPreference.setChecked(mGpuUtils.getForceRailOn());
}
if (mForceNoNapPreference != null) {
mForceNoNapPreference.setChecked(mGpuUtils.getForceNoNap());
}
if (mBusSplitPreference != null) {
mBusSplitPreference.setChecked(mGpuUtils.getBusSplit());
}
}
private void updateDynamicInfo() {
// Update current frequency
if (mCurrentFreqPreference != null) {
String currentFreq = mGpuUtils.getCurrentFrequency();
if (!currentFreq.equals("0")) {
int freqMhz = Integer.parseInt(currentFreq) / 1000000;
mCurrentFreqPreference.setSummary(freqMhz + " MHz");
} else {
mCurrentFreqPreference.setSummary("Unknown");
}
}
// Update GPU busy percentage
if (mGpuBusyPreference != null) {
String busyPercentage = mGpuUtils.getGpuBusyPercentage();
mGpuBusyPreference.setSummary(busyPercentage);
}
// Update GPU temperature
if (mGpuTemperaturePreference != null) {
String temperature = mGpuUtils.getGpuTemperature();
if (!temperature.equals("0")) {
mGpuTemperaturePreference.setSummary(temperature + "°C");
} else {
mGpuTemperaturePreference.setSummary("Unknown");
}
}
// Update thermal power level
if (mThermalPowerLevelPreference != null) {
String thermalLevel = mGpuUtils.getThermalPowerLevel();
mThermalPowerLevelPreference.setSummary("Level " + thermalLevel);
}
}
private void startPeriodicUpdates() {
mUpdateRunnable = new Runnable() {
@Override
public void run() {
updateDynamicInfo();
mHandler.postDelayed(this, 2000); // Update every 2 seconds
}
};
mHandler.post(mUpdateRunnable);
}
private void stopPeriodicUpdates() {
if (mHandler != null && mUpdateRunnable != null) {
mHandler.removeCallbacks(mUpdateRunnable);
}
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
if (KEY_GPU_GOVERNOR.equals(key)) {
String value = (String) newValue;
mGovernorPreference.setSummary(getString(R.string.gpu_governor_summary, value));
return true;
} else if (KEY_GPU_MIN_FREQ.equals(key) || KEY_GPU_MAX_FREQ.equals(key)) {
String value = (String) newValue;
int freqMhz = Integer.parseInt(value) / 1000000;
preference.setSummary(freqMhz + " MHz");
return true;
}
return true;
}
private void applySettings() {
// Apply governor
if (mGovernorPreference != null) {
String governor = mGovernorPreference.getValue();
mGpuUtils.setGovernor(governor);
}
// Apply frequencies
if (mMinFreqPreference != null && mMaxFreqPreference != null) {
mGpuUtils.setFrequencyRange(mMinFreqPreference.getValue(), mMaxFreqPreference.getValue());
}
Toast.makeText(getContext(), R.string.settings_applied, Toast.LENGTH_SHORT).show();
}
private void resetSettings() {
mGpuUtils.resetToDefaults();
loadCurrentSettings();
Toast.makeText(getContext(), R.string.settings_reset, Toast.LENGTH_SHORT).show();
}
}

View File

@@ -0,0 +1,273 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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
*/
package org.lineageos.settings.gpumanager;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class GpuManagerUtils {
private static final String GPU_BASE_PATH = "/sys/class/kgsl/kgsl-3d0";
private static final String DEVFREQ_PATH = GPU_BASE_PATH + "/devfreq";
private static final String DEFAULT_GOVERNOR = "msm-adreno-tz";
// GPU paths
private static final String GPU_MODEL = "/gpu_model";
private static final String GPU_AVAILABLE_FREQUENCIES = "/gpu_available_frequencies";
private static final String GPU_CURRENT_FREQ = "/gpuclk";
private static final String GPU_MIN_FREQ = "/devfreq/min_freq";
private static final String GPU_MAX_FREQ = "/devfreq/max_freq";
private static final String GPU_GOVERNOR = "/devfreq/governor";
private static final String GPU_AVAILABLE_GOVERNORS = "/devfreq/available_governors";
private static final String GPU_BUSY_PERCENTAGE = "/gpu_busy_percentage";
private static final String GPU_TEMPERATURE = "/temp";
private static final String GPU_THERMAL_PWRLEVEL = "/thermal_pwrlevel";
private static final String GPU_FORCE_CLK_ON = "/force_clk_on";
private static final String GPU_FORCE_BUS_ON = "/force_bus_on";
private static final String GPU_FORCE_RAIL_ON = "/force_rail_on";
private static final String GPU_FORCE_NO_NAP = "/force_no_nap";
private static final String GPU_BUS_SPLIT = "/bus_split";
private static final String GPU_MAX_GPUCLK = "/max_gpuclk";
private static final String GPU_MIN_CLOCK_MHZ = "/min_clock_mhz";
private static final String GPU_MAX_CLOCK_MHZ = "/max_clock_mhz";
public String getGpuModel() {
try {
return readFile(GPU_BASE_PATH + GPU_MODEL).trim();
} catch (Exception e) {
return "Unknown GPU";
}
}
public String[] getAvailableGovernors() {
try {
String governors = readFile(GPU_BASE_PATH + GPU_AVAILABLE_GOVERNORS);
return governors.trim().split("\\s+");
} catch (Exception e) {
return new String[]{"msm-adreno-tz", "performance", "powersave", "simple_ondemand"};
}
}
public String[] getAvailableFrequencies() {
try {
String frequencies = readFile(GPU_BASE_PATH + GPU_AVAILABLE_FREQUENCIES);
return frequencies.trim().split("\\s+");
} catch (Exception e) {
return null;
}
}
public String getCurrentGovernor() {
try {
return readFile(GPU_BASE_PATH + GPU_GOVERNOR).trim();
} catch (Exception e) {
return DEFAULT_GOVERNOR;
}
}
public String getCurrentFrequency() {
try {
return readFile(GPU_BASE_PATH + GPU_CURRENT_FREQ).trim();
} catch (Exception e) {
return "0";
}
}
public String getCurrentMinFrequency() {
try {
return readFile(GPU_BASE_PATH + GPU_MIN_FREQ).trim();
} catch (Exception e) {
return "0";
}
}
public String getCurrentMaxFrequency() {
try {
return readFile(GPU_BASE_PATH + GPU_MAX_FREQ).trim();
} catch (Exception e) {
return "0";
}
}
public String getGpuBusyPercentage() {
try {
return readFile(GPU_BASE_PATH + GPU_BUSY_PERCENTAGE).trim();
} catch (Exception e) {
return "0";
}
}
public String getGpuTemperature() {
try {
String rawTemp = readFile(GPU_BASE_PATH + GPU_TEMPERATURE).trim();
int tempMilliCelsius = Integer.parseInt(rawTemp);
// Convert millidegrees Celsius to degrees Celsius
double tempCelsius = tempMilliCelsius / 1000.0;
return String.format("%.1f", tempCelsius);
} catch (Exception e) {
return "0";
}
}
public String getThermalPowerLevel() {
try {
return readFile(GPU_BASE_PATH + GPU_THERMAL_PWRLEVEL).trim();
} catch (Exception e) {
return "0";
}
}
public boolean getForceClkOn() {
try {
String value = readFile(GPU_BASE_PATH + GPU_FORCE_CLK_ON).trim();
return "1".equals(value);
} catch (Exception e) {
return false;
}
}
public boolean getForceBusOn() {
try {
String value = readFile(GPU_BASE_PATH + GPU_FORCE_BUS_ON).trim();
return "1".equals(value);
} catch (Exception e) {
return false;
}
}
public boolean getForceRailOn() {
try {
String value = readFile(GPU_BASE_PATH + GPU_FORCE_RAIL_ON).trim();
return "1".equals(value);
} catch (Exception e) {
return false;
}
}
public boolean getForceNoNap() {
try {
String value = readFile(GPU_BASE_PATH + GPU_FORCE_NO_NAP).trim();
return "1".equals(value);
} catch (Exception e) {
return false;
}
}
public boolean getBusSplit() {
try {
String value = readFile(GPU_BASE_PATH + GPU_BUS_SPLIT).trim();
return "1".equals(value);
} catch (Exception e) {
return false;
}
}
public void setGovernor(String governor) {
try {
writeFile(GPU_BASE_PATH + GPU_GOVERNOR, governor);
} catch (Exception e) {
// Ignore errors
}
}
public void setFrequencyRange(String minFreq, String maxFreq) {
try {
writeFile(GPU_BASE_PATH + GPU_MIN_FREQ, minFreq);
writeFile(GPU_BASE_PATH + GPU_MAX_FREQ, maxFreq);
} catch (Exception e) {
// Ignore errors
}
}
public void setForceClkOn(boolean enabled) {
try {
writeFile(GPU_BASE_PATH + GPU_FORCE_CLK_ON, enabled ? "1" : "0");
} catch (Exception e) {
// Ignore errors
}
}
public void setForceBusOn(boolean enabled) {
try {
writeFile(GPU_BASE_PATH + GPU_FORCE_BUS_ON, enabled ? "1" : "0");
} catch (Exception e) {
// Ignore errors
}
}
public void setForceRailOn(boolean enabled) {
try {
writeFile(GPU_BASE_PATH + GPU_FORCE_RAIL_ON, enabled ? "1" : "0");
} catch (Exception e) {
// Ignore errors
}
}
public void setForceNoNap(boolean enabled) {
try {
writeFile(GPU_BASE_PATH + GPU_FORCE_NO_NAP, enabled ? "1" : "0");
} catch (Exception e) {
// Ignore errors
}
}
public void setBusSplit(boolean enabled) {
try {
writeFile(GPU_BASE_PATH + GPU_BUS_SPLIT, enabled ? "1" : "0");
} catch (Exception e) {
// Ignore errors
}
}
public void resetToDefaults() {
setGovernor(DEFAULT_GOVERNOR);
String[] frequencies = getAvailableFrequencies();
if (frequencies != null && frequencies.length > 0) {
String minFreq = frequencies[0];
String maxFreq = frequencies[frequencies.length - 1];
setFrequencyRange(minFreq, maxFreq);
}
// Reset power settings
setForceClkOn(false);
setForceBusOn(false);
setForceRailOn(false);
setForceNoNap(false);
setBusSplit(false);
}
private String readFile(String path) throws IOException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(path));
return reader.readLine();
} finally {
if (reader != null) {
reader.close();
}
}
}
private void writeFile(String path, String value) throws IOException {
FileWriter writer = null;
try {
writer = new FileWriter(path);
writer.write(value);
writer.flush();
} finally {
if (writer != null) {
writer.close();
}
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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.
*/
package org.lineageos.settings.kamisstuff;
import android.os.Bundle;
import android.view.MenuItem;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class KamisStuffActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_KAMIS_STUFF = "kamis_stuff";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(
com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new KamisStuffFragment(), TAG_KAMIS_STUFF).commit();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}
return false;
}
}

View File

@@ -0,0 +1,92 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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.
*/
package org.lineageos.settings.kamisstuff;
import android.content.Intent;
import android.os.Bundle;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import org.lineageos.settings.R;
import org.lineageos.settings.corecontrol.CoreControlActivity;
import org.lineageos.settings.charge.ChargeActivity;
import org.lineageos.settings.zram.ZramActivity;
import org.lineageos.settings.kernelmanager.KernelManagerActivity;
import org.lineageos.settings.gpumanager.GpuManagerActivity;
public class KamisStuffFragment extends PreferenceFragment {
private static final String KEY_CORE_CONTROL = "core_control";
private static final String KEY_BYPASS_CHARGE = "bypass_charge";
private static final String KEY_ZRAM = "zram";
private static final String KEY_KERNEL_MANAGER = "kernel_manager";
private static final String KEY_GPU_MANAGER = "gpu_manager";
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
setPreferencesFromResource(R.xml.kamis_stuff_settings, rootKey);
// Core Control preference
Preference coreControlPref = findPreference(KEY_CORE_CONTROL);
if (coreControlPref != null) {
coreControlPref.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(getActivity(), CoreControlActivity.class);
startActivity(intent);
return true;
});
}
// Charge preference
Preference bypassChargePref = findPreference(KEY_BYPASS_CHARGE);
if (bypassChargePref != null) {
bypassChargePref.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(getActivity(), ChargeActivity.class);
startActivity(intent);
return true;
});
}
// ZRAM preference
Preference zramPref = findPreference(KEY_ZRAM);
if (zramPref != null) {
zramPref.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(getActivity(), ZramActivity.class);
startActivity(intent);
return true;
});
}
// Kernel Manager preference
Preference kernelManagerPref = findPreference(KEY_KERNEL_MANAGER);
if (kernelManagerPref != null) {
kernelManagerPref.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(getActivity(), KernelManagerActivity.class);
startActivity(intent);
return true;
});
}
// GPU Manager preference
Preference gpuManagerPref = findPreference(KEY_GPU_MANAGER);
if (gpuManagerPref != null) {
gpuManagerPref.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(getActivity(), GpuManagerActivity.class);
startActivity(intent);
return true;
});
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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
*/
package org.lineageos.settings.kernelmanager;
import android.os.Bundle;
import android.view.MenuItem;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class KernelManagerActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_KERNEL_MANAGER = "kernel_manager";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(
com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new KernelManagerFragment(), TAG_KERNEL_MANAGER).commit();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}
return false;
}
}

View File

@@ -0,0 +1,187 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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
*/
package org.lineageos.settings.kernelmanager;
import android.os.Bundle;
import android.widget.Toast;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import org.lineageos.settings.R;
public class KernelManagerFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener {
private static final String KEY_CPU_GOVERNOR = "cpu_governor";
private static final String KEY_EFFICIENCY_MIN_FREQ = "efficiency_min_freq";
private static final String KEY_EFFICIENCY_MAX_FREQ = "efficiency_max_freq";
private static final String KEY_PERFORMANCE_MIN_FREQ = "performance_min_freq";
private static final String KEY_PERFORMANCE_MAX_FREQ = "performance_max_freq";
private static final String KEY_PRIME_MIN_FREQ = "prime_min_freq";
private static final String KEY_PRIME_MAX_FREQ = "prime_max_freq";
private static final String KEY_APPLY_SETTINGS = "apply_settings";
private static final String KEY_RESET_SETTINGS = "reset_settings";
private KernelManagerUtils mKernelUtils;
private ListPreference mGovernorPreference;
private ListPreference mEfficiencyMinFreq, mEfficiencyMaxFreq;
private ListPreference mPerformanceMinFreq, mPerformanceMaxFreq;
private ListPreference mPrimeMinFreq, mPrimeMaxFreq;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
setPreferencesFromResource(R.xml.kernel_manager_settings, rootKey);
mKernelUtils = new KernelManagerUtils();
initializePreferences();
loadCurrentSettings();
}
private void initializePreferences() {
mGovernorPreference = (ListPreference) findPreference(KEY_CPU_GOVERNOR);
mEfficiencyMinFreq = (ListPreference) findPreference(KEY_EFFICIENCY_MIN_FREQ);
mEfficiencyMaxFreq = (ListPreference) findPreference(KEY_EFFICIENCY_MAX_FREQ);
mPerformanceMinFreq = (ListPreference) findPreference(KEY_PERFORMANCE_MIN_FREQ);
mPerformanceMaxFreq = (ListPreference) findPreference(KEY_PERFORMANCE_MAX_FREQ);
mPrimeMinFreq = (ListPreference) findPreference(KEY_PRIME_MIN_FREQ);
mPrimeMaxFreq = (ListPreference) findPreference(KEY_PRIME_MAX_FREQ);
// Set listeners
if (mGovernorPreference != null) {
mGovernorPreference.setOnPreferenceChangeListener(this);
}
setFrequencyPreferenceListeners();
// Apply and Reset buttons
Preference applyPref = findPreference(KEY_APPLY_SETTINGS);
if (applyPref != null) {
applyPref.setOnPreferenceClickListener(preference -> {
applySettings();
return true;
});
}
Preference resetPref = findPreference(KEY_RESET_SETTINGS);
if (resetPref != null) {
resetPref.setOnPreferenceClickListener(preference -> {
resetSettings();
return true;
});
}
}
private void setFrequencyPreferenceListeners() {
if (mEfficiencyMinFreq != null) mEfficiencyMinFreq.setOnPreferenceChangeListener(this);
if (mEfficiencyMaxFreq != null) mEfficiencyMaxFreq.setOnPreferenceChangeListener(this);
if (mPerformanceMinFreq != null) mPerformanceMinFreq.setOnPreferenceChangeListener(this);
if (mPerformanceMaxFreq != null) mPerformanceMaxFreq.setOnPreferenceChangeListener(this);
if (mPrimeMinFreq != null) mPrimeMinFreq.setOnPreferenceChangeListener(this);
if (mPrimeMaxFreq != null) mPrimeMaxFreq.setOnPreferenceChangeListener(this);
}
private void loadCurrentSettings() {
// Load available governors
String[] governors = mKernelUtils.getAvailableGovernors();
if (governors != null && mGovernorPreference != null) {
mGovernorPreference.setEntries(governors);
mGovernorPreference.setEntryValues(governors);
String currentGovernor = mKernelUtils.getCurrentGovernor(KernelManagerUtils.EFFICIENCY_CLUSTER);
mGovernorPreference.setValue(currentGovernor);
mGovernorPreference.setSummary(getString(R.string.cpu_governor_summary, currentGovernor));
}
// Load available frequencies for each cluster
loadFrequenciesForCluster(KernelManagerUtils.EFFICIENCY_CLUSTER, mEfficiencyMinFreq, mEfficiencyMaxFreq);
loadFrequenciesForCluster(KernelManagerUtils.PERFORMANCE_CLUSTER, mPerformanceMinFreq, mPerformanceMaxFreq);
loadFrequenciesForCluster(KernelManagerUtils.PRIME_CLUSTER, mPrimeMinFreq, mPrimeMaxFreq);
}
private void loadFrequenciesForCluster(int cluster, ListPreference minPref, ListPreference maxPref) {
String[] frequencies = mKernelUtils.getAvailableFrequencies(cluster);
if (frequencies != null) {
String[] frequencyLabels = new String[frequencies.length];
for (int i = 0; i < frequencies.length; i++) {
int freqMhz = Integer.parseInt(frequencies[i]) / 1000;
frequencyLabels[i] = freqMhz + " MHz";
}
if (minPref != null) {
minPref.setEntries(frequencyLabels);
minPref.setEntryValues(frequencies);
String currentMinFreq = mKernelUtils.getCurrentMinFrequency(cluster);
minPref.setValue(currentMinFreq);
int minFreqMhz = Integer.parseInt(currentMinFreq) / 1000;
minPref.setSummary(minFreqMhz + " MHz");
}
if (maxPref != null) {
maxPref.setEntries(frequencyLabels);
maxPref.setEntryValues(frequencies);
String currentMaxFreq = mKernelUtils.getCurrentMaxFrequency(cluster);
maxPref.setValue(currentMaxFreq);
int maxFreqMhz = Integer.parseInt(currentMaxFreq) / 1000;
maxPref.setSummary(maxFreqMhz + " MHz");
}
}
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
String value = (String) newValue;
if (KEY_CPU_GOVERNOR.equals(key)) {
mGovernorPreference.setSummary(getString(R.string.cpu_governor_summary, value));
return true;
} else if (key.contains("freq")) {
int freqMhz = Integer.parseInt(value) / 1000;
preference.setSummary(freqMhz + " MHz");
return true;
}
return false;
}
private void applySettings() {
// Apply governor
if (mGovernorPreference != null) {
String governor = mGovernorPreference.getValue();
mKernelUtils.setGovernor(governor);
}
// Apply frequencies
applyFrequencySettings();
Toast.makeText(getContext(), R.string.settings_applied, Toast.LENGTH_SHORT).show();
}
private void applyFrequencySettings() {
if (mEfficiencyMinFreq != null && mEfficiencyMaxFreq != null) {
mKernelUtils.setEfficiencyClusterFrequency(
mEfficiencyMinFreq.getValue(), mEfficiencyMaxFreq.getValue());
}
if (mPerformanceMinFreq != null && mPerformanceMaxFreq != null) {
mKernelUtils.setPerformanceClusterFrequency(
mPerformanceMinFreq.getValue(), mPerformanceMaxFreq.getValue());
}
if (mPrimeMinFreq != null && mPrimeMaxFreq != null) {
mKernelUtils.setPrimeClusterFrequency(
mPrimeMinFreq.getValue(), mPrimeMaxFreq.getValue());
}
}
private void resetSettings() {
mKernelUtils.resetToDefaults();
loadCurrentSettings();
Toast.makeText(getContext(), R.string.settings_reset, Toast.LENGTH_SHORT).show();
}
}

View File

@@ -0,0 +1,158 @@
/*
* Copyright (C) 2025 KamiKaonashi
*
* 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
*/
package org.lineageos.settings.kernelmanager;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class KernelManagerUtils {
public static final int EFFICIENCY_CLUSTER = 0; // Policy 0 - Little cores (A55)
public static final int PERFORMANCE_CLUSTER = 4; // Policy 4 - Big cores (A78)
public static final int PRIME_CLUSTER = 7; // Policy 7 - Prime core (X1)
private static final int[] POLICIES = {EFFICIENCY_CLUSTER, PERFORMANCE_CLUSTER, PRIME_CLUSTER};
private static final String DEFAULT_GOVERNOR = "schedutil";
// CPU frequency and governor paths
private static final String CPU_BASE_PATH = "/sys/devices/system/cpu/cpufreq/policy";
private static final String SCALING_GOVERNOR = "/scaling_governor";
private static final String SCALING_MIN_FREQ = "/scaling_min_freq";
private static final String SCALING_MAX_FREQ = "/scaling_max_freq";
private static final String SCALING_AVAILABLE_GOVERNORS = "/scaling_available_governors";
private static final String SCALING_AVAILABLE_FREQUENCIES = "/scaling_available_frequencies";
public String[] getAvailableGovernors() {
try {
String governors = readFile(CPU_BASE_PATH + EFFICIENCY_CLUSTER + SCALING_AVAILABLE_GOVERNORS);
return governors.trim().split("\\s+");
} catch (Exception e) {
return new String[]{"schedutil", "performance", "powersave", "ondemand", "conservative"};
}
}
public String[] getAvailableFrequencies(int cluster) {
try {
String frequencies = readFile(CPU_BASE_PATH + cluster + SCALING_AVAILABLE_FREQUENCIES);
return frequencies.trim().split("\\s+");
} catch (Exception e) {
return null;
}
}
public String getCurrentGovernor(int cluster) {
try {
return readFile(CPU_BASE_PATH + cluster + SCALING_GOVERNOR).trim();
} catch (Exception e) {
return DEFAULT_GOVERNOR;
}
}
public String getCurrentMinFrequency(int cluster) {
try {
return readFile(CPU_BASE_PATH + cluster + SCALING_MIN_FREQ).trim();
} catch (Exception e) {
// If we can't read, try to get the lowest available frequency
String[] frequencies = getAvailableFrequencies(cluster);
if (frequencies != null && frequencies.length > 0) {
return frequencies[0];
}
return "0";
}
}
public String getCurrentMaxFrequency(int cluster) {
try {
return readFile(CPU_BASE_PATH + cluster + SCALING_MAX_FREQ).trim();
} catch (Exception e) {
// If we can't read, try to get the highest available frequency
String[] frequencies = getAvailableFrequencies(cluster);
if (frequencies != null && frequencies.length > 0) {
return frequencies[frequencies.length - 1];
}
return "0";
}
}
public void setGovernor(String governor) {
for (int cluster : POLICIES) {
try {
writeFile(CPU_BASE_PATH + cluster + SCALING_GOVERNOR, governor);
} catch (Exception e) {
// Continue with other clusters
}
}
}
public void setFrequencyRange(int cluster, String minFreq, String maxFreq) {
try {
// Set min frequency first
writeFile(CPU_BASE_PATH + cluster + SCALING_MIN_FREQ, minFreq);
// Then set max frequency
writeFile(CPU_BASE_PATH + cluster + SCALING_MAX_FREQ, maxFreq);
} catch (Exception e) {
// Ignore errors
}
}
// Cluster-specific helper methods
public void setEfficiencyClusterFrequency(String minFreq, String maxFreq) {
setFrequencyRange(EFFICIENCY_CLUSTER, minFreq, maxFreq);
}
public void setPerformanceClusterFrequency(String minFreq, String maxFreq) {
setFrequencyRange(PERFORMANCE_CLUSTER, minFreq, maxFreq);
}
public void setPrimeClusterFrequency(String minFreq, String maxFreq) {
setFrequencyRange(PRIME_CLUSTER, minFreq, maxFreq);
}
public void resetToDefaults() {
setGovernor(DEFAULT_GOVERNOR);
// Reset frequencies to available range
for (int cluster : POLICIES) {
String[] frequencies = getAvailableFrequencies(cluster);
if (frequencies != null && frequencies.length > 0) {
String minFreq = frequencies[0];
String maxFreq = frequencies[frequencies.length - 1];
setFrequencyRange(cluster, minFreq, maxFreq);
}
}
}
private String readFile(String path) throws IOException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(path));
return reader.readLine();
} finally {
if (reader != null) {
reader.close();
}
}
}
private void writeFile(String path, String value) throws IOException {
FileWriter writer = null;
try {
writer = new FileWriter(path);
writer.write(value);
writer.flush();
} finally {
if (writer != null) {
writer.close();
}
}
}
}

View File

@@ -15,12 +15,12 @@
*/
package org.lineageos.settings.refreshrate;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
@@ -36,6 +36,7 @@ import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceFragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -96,6 +97,19 @@ public class RefreshSettingsFragment extends PreferenceFragment
mAppsRecyclerView.setAdapter(mAllPackagesAdapter);
}
@Override
public void setDivider(@Nullable final Drawable divider) {
RecyclerView list = getListView();
if (list == null) {
View root = getView();
if (root != null) {
root.post(() -> setDivider(divider));
}
return;
}
super.setDivider(divider);
}
@Override
public void onResume() {

View File

@@ -29,7 +29,7 @@ import android.util.Log;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import androidx.preference.SwitchPreferenceCompat;
import org.lineageos.settings.R;
@@ -45,13 +45,13 @@ public class ClearSpeakerFragment extends PreferenceFragment implements
private AudioManager mAudioManager;
private Handler mHandler;
private MediaPlayer mMediaPlayer;
private SwitchPreference mClearSpeakerPref;
private SwitchPreferenceCompat mClearSpeakerPref;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.clear_speaker_settings);
mClearSpeakerPref = (SwitchPreference) findPreference(PREF_CLEAR_SPEAKER);
mClearSpeakerPref = (SwitchPreferenceCompat) findPreference(PREF_CLEAR_SPEAKER);
mClearSpeakerPref.setOnPreferenceChangeListener(this);
mHandler = new Handler();

View File

@@ -15,12 +15,12 @@
*/
package org.lineageos.settings.thermal;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
@@ -36,6 +36,7 @@ import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceFragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -96,6 +97,19 @@ public class ThermalSettingsFragment extends PreferenceFragment
mAppsRecyclerView.setAdapter(mAllPackagesAdapter);
}
@Override
public void setDivider(@Nullable final Drawable divider) {
RecyclerView list = getListView();
if (list == null) {
View root = getView();
if (root != null) {
root.post(() -> setDivider(divider));
}
return;
}
super.setDivider(divider);
}
@Override
public void onResume() {

View File

@@ -11,6 +11,8 @@ system_ext/etc/permissions/audiosphere.xml
system_ext/framework/audiosphere.jar
vendor/lib/soundfx/libasphere.so
vendor/lib/soundfx/libshoebox.so
vendor/lib/soundfx/libmisoundfx.so
vendor/lib64/soundfx/libmisoundfx.so
# Bluetooth
vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti
@@ -169,6 +171,44 @@ vendor/lib64/vendor.display.color@1.4.so
vendor/lib64/vendor.display.color@1.5.so
vendor/lib64/vendor.display.postproc@1.0.so
# Dolby Atmos - from OnePlus 9RT MT2111_14.0.0.730(EX01)
odm/bin/hw/vendor.dolby_v3_6.hardware.dms360@2.0-service|7951f0ede5108f0080bb8abb18651058db9e46ae
odm/etc/dolby/multimedia_dolby_dax_default.xml|be49c4cde1bc41f67fbfa2c49ba6d8f4e40eb8dc
odm/etc/init/vendor.dolby_v3_6.hardware.dms360@2.0-service.rc|5da96cf855061860f27dff6399505f8d1f1daeee
odm/etc/vintf/manifest/manifest_dax_dolby_v3_6.xml|c4704e5bc4da7cdf291c79389f379c8355eaf730
odm/lib/libdapparamstorage_v3_6.so|c6c36fba280f2373034cf754870611614bf0f22f
odm/lib/libdeccfg_v3_6.so|742cadaf61aea20eabdac099668bfd43ddf4bb35
odm/lib/libdlbdsservice_v3_6.so|eac269dfbf334f4cc9d5900fb1c53dbfbaea4d6b
odm/lib/libstagefright_soft_ddpdec_v3_6.so:odm/lib/libstagefright_soft_ddpdec.so;FIX_SONAME|7b9a91a1d15c90a0d804d372554e561380cd109e|acc62e6a3d78451da99243aba0dfe3f436d5b9a2
odm/lib/soundfx/libhwdap_v3_6.so|1992eea271d67bef7482377605a2efa4c2f6dba8
odm/lib/soundfx/libswdap_v3_6.so|3e521eb43ea5b43e2436f2c46d7b8f169b2f1553
odm/lib/vendor.dolby_v3_6.hardware.dms360@2.0.so|d6f89d6499661023dc8fe451ca5c55f1a3ba7d55
odm/lib64/libdapparamstorage_v3_6.so|d0c9e16ec5a589a9e47a8d3907d7949fd4fdb439
odm/lib64/libdeccfg_v3_6.so|25a64da2aa3bf9cb2b6fd644547ba1e94cdb47f4
odm/lib64/libdlbdsservice_v3_6.so|08ae454ff029791ba436f750ca6c717cb6d7bf36|a81056b8a7cf90df84368b8086691f38950613fc
odm/lib64/vendor.dolby_v3_6.hardware.dms360@2.0-impl.so|5b5f4b383c03a6aaa759b1cc7f6f0aea7d1f6ba0
odm/lib64/vendor.dolby_v3_6.hardware.dms360@2.0.so|e62f04117fead61eea7f2593e7ccbb565436a0ee
# Dolby Media - from OnePlus 11 CPH2447_15.0.0.401(EX01)
odm/bin/hw/vendor.dolby_sp.hardware.dmssp@2.0-service|1240cecce2ad8943c2aa5b96381ebeb5e1bac43d
odm/bin/hw/vendor.dolby_sp.media.c2@1.0-service|cafd800a4e83afa206347886cfed48cdb50cb80c|970da07e08143319ccc01e6e8ac4e262a064618d
odm/etc/init/vendor.dolby.media.c2@1.0-service.rc|6af989419070ea6b4646f47ab78849d7549abda3
odm/etc/init/vendor.dolby_sp.hardware.dmssp@2.0-service.rc|94c85fbfc93527395fcc1bb7bfb58734f245d4f3
odm/etc/vintf/manifest/vendor.dolby.hardware.dms.xml|dc9ebef89624d524fe76724e9a220b5d2affe62b
odm/lib64/libcodec2_hidl@1.0.so:odm/lib64/libcodec2_hidl@1.0_sp.so;FIX_SONAME|4b662f2ecc5c66874f93407c48f492b2d09ce47c|1ad0150db808b8400483fb4edfb4ba90a11b4541
odm/lib64/libcodec2_hidl_plugin.so:odm/lib64/libcodec2_hidl_plugin_sp.so;FIX_SONAME|2dbcfda2c7d867edf106fc72d02b11c719f676fb|3e6fe60c3b77a121b6dd69962a1883b2165d51f3
odm/lib64/libcodec2_soft_ac4dec_sp.so|b22d228a84b1698bca8c95aaf67324f47a8262bb|de7b1476d8d3e88fa23831fb0730e9f36bcb29a6
odm/lib64/libcodec2_soft_common.so:odm/lib64/libcodec2_soft_common_sp.so;FIX_SONAME|5cce54ffe4e82ca9d6ca6606ac66b599ac28ea71|ccae9dbfb18b67d2f08c1789fa0f4e2dcf15d743
odm/lib64/libcodec2_soft_ddpdec_sp.so|c2034f16911dd7ae4c58c4e05c4f54b4293faef3|411ad092081442607b5196b3d25cb97d75387ba7
odm/lib64/libcodec2_store_dolby_sp.so|4b9e3bd2fd8ffd49d50b81926cb89f7916c7a212|aa83fb43acda11d8ca7a5f67cef230c2be196672
odm/lib64/libdapparamstorage_sp.so|f275e0f47c40b72890ee1cde373e60b4b2ffd711
odm/lib64/libdeccfg_sp.so|e7f27c1009baecf84835deee1a7e296c5dc3f4e6
odm/lib64/libdlbdsservice_sp.so|7c1847cce3d0c7f4ce5658090d752e493e8570ea
odm/lib64/libui.so:odm/lib64/libui_sp.so;FIX_SONAME|88b8584db2fa78d0ec06d89f623f8321721051e1|ede189be946ec3ca1502188e2895be944fe6e4ae
odm/lib64/vendor.dolby_sp.hardware.dmssp@2.0-impl.so|b51e6a885a738023ce6ec97b702d6733b70d0a15
odm/lib64/vendor.dolby_sp.hardware.dmssp@2.0.so|2173d68717cbcdaab98e1cf15a0d410ea00d0271
vendor/lib64/libcodec2_vndk.so:odm/lib64/libcodec2_vndk_sp.so;FIX_SONAME|d9d17fd476ee2c3593b0f123af957132e34211af|c96cf0b2b4253505c7b4a0febbea1d5e6984a88d
# DPM
system/framework/tcmclient.jar
system_ext/bin/dpmd
@@ -202,7 +242,7 @@ vendor/lib64/libdrmtime.so
vendor/lib64/libminkdescriptor.so
vendor/lib64/libminksocket.so
vendor/lib64/liboemcrypto.so
vendor/lib64/libops.so
vendor/lib64/libops.so|9b33ca1cf66aaf879dc6e9386fcc35f08324b234
vendor/lib64/libqcbor.so
vendor/lib64/libqisl.so
vendor/lib64/librpmb.so
@@ -388,6 +428,9 @@ vendor/lib/libgcs-osal.so
vendor/lib/libgcs.so
vendor/lib/liblistensoundmodel2.so
vendor/lib/libmulawdec.so
vendor/lib64/libcapiv2svacnn.so
vendor/lib64/libcapiv2svarnn.so
vendor/lib64/libcapiv2vop.so
# Media
system_ext/lib64/libmmosal.so
@@ -483,7 +526,6 @@ vendor/bin/hw/android.hardware.neuralnetworks@1.3-service-qti
vendor/etc/init/android.hardware.neuralnetworks@1.3-service-qti.rc
vendor/etc/vintf/manifest/android.hardware.neuralnetworks@1.3-service-qti.xml
vendor/lib64/libQnnHtpAltPrepStub.so
vendor/lib64/libQnnHtpStub.so
vendor/lib64/unnhal-acc-common.so
vendor/lib64/unnhal-acc-gpu.so
vendor/lib64/unnhal-acc-htp.so
@@ -664,6 +706,17 @@ vendor/lib64/jcos_nq_client.so
vendor/lib64/ls_nq_client.so
vendor/lib64/se_nq_extn_client.so
# Sensors
vendor/lib64/libssccalapi.so;DUMMY_SHARED_LIB
# Sensors (citsensor)
vendor/bin/hw/vendor.xiaomi.hardware.citsensorservice@1.1-service
vendor/etc/init/vendor.xiaomi.hardware.citsensorservice@1.1-service.rc
vendor/etc/vintf/manifest/vendor.xiaomi.hardware.citsensorservice@1.1-service.xml
vendor/lib64/hw/vendor.xiaomi.hardware.citsensorservice@1.1-impl.so
vendor/lib64/vendor.xiaomi.hardware.citsensorservice@1.0.so
vendor/lib64/vendor.xiaomi.hardware.citsensorservice@1.1.so
# Snapdragon Computer Vision Engine
vendor/lib/libscveCommon.so
vendor/lib/libscveCommon_stub.so
@@ -693,9 +746,6 @@ vendor/lib/libthermalclient.so
vendor/lib64/libthermalclient.so
# Time services
vendor/app/TimeService/TimeService.apk
vendor/bin/time_daemon
vendor/etc/init/init.time_daemon.rc
vendor/lib64/libtime_genoff.so
# Trusted Execution Environment connector

View File

@@ -83,7 +83,6 @@ on boot
chmod 2770 /dev/socket/qmux_radio
mkdir /mnt/vendor/persist/alarm 0770 system system
mkdir /mnt/vendor/persist/time 0770 system system
mkdir /mnt/vendor/persist/secnvm 0770 system system
mkdir /mnt/vendor/persist/iar_db 0770 system system
mkdir /mnt/vendor/spunvm 0770 system system
@@ -190,9 +189,6 @@ on post-fs-data
mkdir /dev/socket/wifihal 0770 wifi wifi
chmod 2770 /dev/socket/wifihal
# Create /data/time folder for time-services
mkdir /data/vendor/time/ 0700 system system
mkdir /data/vendor/secure_element 0777 system system
# Mark the copy complete flag to not completed
@@ -291,6 +287,46 @@ on property:sys.boot_completed=1
chmod 0660 /sys/devices/system/cpu/cpu5/online
chmod 0660 /sys/devices/system/cpu/cpu6/online
chmod 0660 /sys/devices/system/cpu/cpu7/online
# Kernel Manager
chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
chown system system /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq
chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
chown system system /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
chown system system /sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq
# GPU Manager
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/governor
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
chown system system /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
chown system system /sys/class/kgsl/kgsl-3d0/force_clk_on
chown system system /sys/class/kgsl/kgsl-3d0/force_bus_on
chown system system /sys/class/kgsl/kgsl-3d0/force_rail_on
chown system system /sys/class/kgsl/kgsl-3d0/force_no_nap
chown system system /sys/class/kgsl/kgsl-3d0/bus_split
chmod 0664 /sys/class/kgsl/kgsl-3d0/devfreq/governor
chmod 0664 /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
chmod 0664 /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
chmod 0664 /sys/class/kgsl/kgsl-3d0/force_clk_on
chmod 0664 /sys/class/kgsl/kgsl-3d0/force_bus_on
chmod 0664 /sys/class/kgsl/kgsl-3d0/force_rail_on
chmod 0664 /sys/class/kgsl/kgsl-3d0/force_no_nap
chmod 0664 /sys/class/kgsl/kgsl-3d0/bus_split
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
class core

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,9 @@
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
# Load ADSP firmware for PMIC
mkdir /firmware
mount vfat /dev/block/bootdevice/by-name/modem${ro.boot.slot_suffix} /firmware ro context=u:object_r:firmware_file:s0
on init
setprop sys.usb.configfs 1
@@ -8,3 +11,6 @@ on init
on property:ro.boot.usbcontroller=*
setprop sys.usb.controller ${ro.boot.usbcontroller}
write /sys/class/udc/${ro.boot.usbcontroller}/device/../mode peripheral
on property:dev.mnt.blk.firmware=*
write /sys/kernel/boot_adsp/boot 1

View File

@@ -0,0 +1,9 @@
//
// SPDX-FileCopyrightText: The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "DeviceAsWebcamOverlaySM8350",
device_specific: true,
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.DeviceAsWebcam.overlay.sm8350">
<overlay
android:isStatic="true"
android:priority="800"
android:targetPackage="com.android.DeviceAsWebcam" />
</manifest>

View File

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

View File

@@ -0,0 +1,9 @@
//
// SPDX-FileCopyrightText: The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "FrameworkOverlayUDFPS",
device_specific: true,
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.overlay.sm8350.udfps">
<overlay android:targetPackage="android" />
</manifest>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Type of the udfps long press sensor. Empty if long press is not supported. -->
<string name="config_dozeUdfpsLongPressSensorType" translatable="false">org.lineageos.sensor.udfps</string>
<!-- Whether to enable fp unlock when screen turns off on udfps devices -->
<bool name="config_screen_off_udfps_enabled">true</bool>
<!-- Default value for fp screen off unlock toggle, it only works for the devices that support
fp screen off unlock-->
<bool name="config_screen_off_udfps_default_on">true</bool>
</resources>

View File

@@ -0,0 +1,9 @@
//
// Copyright (C) 2025 PixelOS
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "XiaomiDolbyResCommon",
device_specific: true,
}

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 PixelOS
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.aospa.dolby.xiaomi.overlay">
<overlay
android:isStatic="true"
android:priority="300"
android:targetPackage="co.aospa.dolby.xiaomi" />
</manifest>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 PixelOS
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Dolby Atmos -->
<string-array name="dolby_profile_entries">
<item>@string/dolby_profile_dynamic</item>
<item>@string/dolby_profile_video</item>
<item>@string/dolby_profile_music</item>
<item>@string/dolby_profile_game1</item>
<item>@string/dolby_profile_game2</item>
<item>@string/dolby_profile_voice</item>
</string-array>
<string-array name="dolby_profile_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
</resources>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023-24 Paranoid Android
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Dolby profiles -->
<string name="dolby_profile_dynamic">Dynamic</string>
<string name="dolby_profile_video">Movie/Video</string>
<string name="dolby_profile_music">Music</string>
<string name="dolby_profile_game1">Game1</string>
<string name="dolby_profile_game2">Game2</string>
<string name="dolby_profile_voice">Voice</string>
</resources>

View File

@@ -10,3 +10,8 @@ attribute vendor_hal_camerapostproc_xiaomi_server;
attribute vendor_hal_citsensorservice_xiaomi;
attribute vendor_hal_citsensorservice_xiaomi_client;
attribute vendor_hal_citsensorservice_xiaomi_server;
# Dolby
attribute hal_dms;
attribute hal_dms_client;
attribute hal_dms_server;

View File

@@ -1,4 +0,0 @@
get_prop(audioserver, vendor_audio_prop) # If Google or MTK device skip line
allow audioserver unlabeled:file { read write open getattr };
allow hal_audio_default hal_audio_default:process { execmem };

View File

@@ -25,6 +25,12 @@
# Core Control
/sys/devices/system/cpu/cpu[0-7]/online u:object_r:vendor_sysfs_corecontrol:s0
# Dolby
/data/vendor/dolby(/.*)? u:object_r:vendor_data_file:s0
/(odm|vendor/odm)/bin/hw/vendor\.dolby_v3_6\.hardware\.dms360@2\.0-service u:object_r:hal_dms_default_exec:s0
/(odm|vendor/odm)/bin/hw/vendor\.dolby_sp\.hardware\.dmssp@2\.0-service u:object_r:hal_dms_default_exec:s0
/(vendor|odm)/bin/hw/vendor\.dolby_sp\.media\.c2@1\.0-service u:object_r:mediacodec_exec:s0
# Hexagon DSP-side executable needed for Halide operation
# This is labeled as public_adsprpcd_file as it needs to be read by apps
# (e.g. Google Camera App)
@@ -45,9 +51,6 @@
# HTSR
/sys/devices/virtual/touch/touch_dev/bump_sample_rate u:object_r:sysfs_htsr:s0
# Fastcharge HAL
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.fastcharge@[0-9]\.[0-9]-service\.venus u:object_r:hal_lineage_fastcharge_default_exec:s0
# Mlipay
/vendor/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0

View File

@@ -4,6 +4,9 @@ genfscon sysfs /devices/system/cpu/cpu[0-7]/online u:object_r:vendor_sysfs_cor
# Display
genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display-primary u:object_r:vendor_sysfs_graphics:s0
# Extcon
genfscon sysfs /devices/platform/soc/soc:extcon_usb1/extcon u:object_r:sysfs_extcon:s0
# Fingerprint
genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc u:object_r:vendor_sysfs_fingerprint:s0
@@ -16,12 +19,9 @@ genfscon sysfs /devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qco
# Wakeup nodes
genfscon sysfs /devices/platform/goodix_ts.0/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys6/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/188101c.qcom,spss/subsys5/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/188101c.qcom,spss/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/4080000.qcom,mss/subsys8/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/subsys7/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/890000.qcom,qup_uart/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/984000.i2c/i2c-0/0-0028/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/998000.i2c/i2c-0/0-005a/wakeup u:object_r:sysfs_wakeup:s0
@@ -43,7 +43,6 @@ genfscon sysfs /devices/platform/soc/abb0000.qcom,evass/subsys2/wakeup u:object_
genfscon sysfs /devices/platform/soc/abb0000.qcom,evass/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/subsys10/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/b0000000.qcom,cnss-qca6490/subsys8/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pmk8350@0:pon_pbs@800/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-03/c440000.qcom,spmi:qcom,pm8350b@3:qcom,amoled/wakeup u:object_r:sysfs_wakeup:s0
# note: Labelling /devices/platform/soc/soc:fingerprint_fpc/wakeup relabels the wakeup_enable node
genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/wakeup/wakeup u:object_r:sysfs_wakeup:s0

20
sepolicy/vendor/hal_dms.te vendored Normal file
View File

@@ -0,0 +1,20 @@
type hal_dms_hwservice, hwservice_manager_type, protected_hwservice;
type hal_dms_default, domain;
hal_server_domain(hal_dms_default, hal_dms)
type hal_dms_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_dms_default)
hal_attribute_hwservice(hal_dms, hal_dms_hwservice)
binder_call(hal_dms_client, hal_dms_server)
binder_call(hal_dms_server, hal_dms_client)
hal_client_domain(hal_audio_default, hal_dms)
hal_client_domain(mediacodec, hal_dms)
allow hal_dms_default vendor_data_file:dir rw_dir_perms;
allow hal_dms_default vendor_data_file:file create_file_perms;
set_prop(hal_dms_default, vendor_audio_prop)

View File

@@ -12,6 +12,9 @@ allow hal_fingerprint_default vendor_hal_perf_hwservice:hwservice_manager find;
# Netlink_socket
allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl;
# Capability
allow hal_fingerprint_default self:capability { sys_nice };
# Props
set_prop(hal_fingerprint_default, vendor_fp_prop)
set_prop(hal_fingerprint_default, vendor_fp_info_prop)

View File

@@ -1,9 +0,0 @@
get_prop(hal_lineage_fastcharge, vendor_fastcharge_prop)
set_prop(hal_lineage_fastcharge, vendor_fastcharge_prop)
# Fast Charge Node Service Permissions
allow hal_lineage_fastcharge_default sysfs_battery_supply:dir search;
allow hal_lineage_fastcharge_default sysfs_battery_supply:file rw_file_perms;
allow hal_lineage_fastcharge_default vendor_sysfs_battery_supply:dir search;
allow hal_lineage_fastcharge_default vendor_sysfs_battery_supply:file rw_file_perms;

View File

@@ -2,8 +2,11 @@
vendor.xiaomi.hardware.cameraperf::IMiCameraPerfService u:object_r:vendor_hal_cameraperf_hwservice:s0
vendor.xiaomi.hardware.campostproc::IMiPostProcService u:object_r:vendor_hal_camerapostproc_xiaomi_hwservice:s0
# Dolby
vendor.dolby_v3_6.hardware.dms360::IDms u:object_r:hal_dms_hwservice:s0
vendor.dolby_sp.hardware.dmssp::IDms u:object_r:hal_dms_hwservice:s0
# Fingerprint
vendor.xiaomi.hardware.dtool::IDtool u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0
vendor.xiaomi.hardware.fx.tunnel::IMiFxTunnel u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0
vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0
com.fingerprints.extension::IFingerprintEngineering u:object_r:vendor_hal_fingerprint_hwservice_xiaomi:s0

View File

@@ -1,5 +1,2 @@
# Fastcharge
vendor_internal_prop(vendor_fastcharge_prop);
# ZRAM
vendor_internal_prop(vendor_zram_prop);

View File

@@ -9,9 +9,6 @@ ro.boot.camera. u:object_r:vendor_camera_prop:s0
ro.boot.camera.config u:object_r:vendor_camera_sensor_prop:s0
ro.vendor.audio.us.proximity u:object_r:vendor_camera_prop:s0
# Fastcharge HAL
persist.vendor.sec.fastchg_enabled u:object_r:vendor_fastcharge_prop:s0
# Fingerprint
persist.vendor.sys.fp. u:object_r:vendor_fp_prop:s0
persist.vendor.sys.fp.info u:object_r:vendor_fp_info_prop:s0

View File

@@ -36,3 +36,14 @@ allow system_app vendor_sysfs_battery_supply:file { getattr open read write };
# Core Control
allow system_app vendor_sysfs_corecontrol:dir search;
allow system_app vendor_sysfs_corecontrol:file { getattr open read write };
# Kernel Manager
allow system_app sysfs_devices_system_cpu:file { open read write };
allow system_app sysfs_devices_system_cpu:dir search;
# GPU Manager
allow system_app vendor_sysfs_kgsl:file { getattr open read write };
allow system_app vendor_sysfs_kgsl:dir search;
allow system_app vendor_sysfs_kgsl_gpuclk:file { getattr open read write };
allow system_app vendor_sysfs_kgsl_gpuclk:dir search;
allow system_app vendor_sysfs_kgsl:lnk_file read;

View File

@@ -1,6 +1,5 @@
//
// Copyright (C) 2022 The LineageOS Project
//
// SPDX-FileCopyrightText: The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//

View File

@@ -1,6 +1,5 @@
/*
* Copyright (C) 2022 The LineageOS Project
*
* SPDX-FileCopyrightText: The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
@@ -8,10 +7,12 @@
#include <aidl/android/hardware/biometrics/fingerprint/BnFingerprint.h>
#include <android-base/logging.h>
#include <android-base/unique_fd.h>
#include <fcntl.h>
#include <fstream>
#include <poll.h>
#include <fstream>
#include <mutex>
#include <thread>
#include "UdfpsHandler.h"
@@ -21,21 +22,17 @@
#define PARAM_NIT_UDFPS 1
#define PARAM_NIT_NONE 0
// Touchscreen and HBM
#define FOD_HBM_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_hbm"
#define FOD_STATUS_PATH "/sys/devices/virtual/touch/tp_dev/fod_status"
#define FOD_UI_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui"
#define FOD_PRESS_STATUS_PATH "/sys/class/touch/touch_dev/fod_press_status"
#define FOD_HBM_OFF 0
#define FOD_HBM_ON 1
#define FOD_STATUS_OFF 0
#define FOD_STATUS_ON 1
#define COMMAND_FOD_PRESS_STATUS 1
#define PARAM_FOD_PRESSED 1
#define PARAM_FOD_RELEASED 0
// Touchscreen and HBM
#define FOD_HBM_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_hbm"
#define FOD_UI_PATH "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui"
#define FOD_HBM_OFF 0
#define FOD_HBM_ON 1
using ::aidl::android::hardware::biometrics::fingerprint::AcquiredInfo;
template <typename T>
@@ -69,77 +66,78 @@ class XiaomiUdfpsHandler : public UdfpsHandler {
mDevice = device;
std::thread([this]() {
int fodUiFd = open(FOD_UI_PATH, O_RDONLY);
int fodPressStatusFd = open(FOD_PRESS_STATUS_PATH, O_RDONLY);
if (fodUiFd < 0) {
LOG(ERROR) << "failed to open fodUiFd, err: " << fodUiFd;
android::base::unique_fd fd(open(FOD_UI_PATH, O_RDONLY));
if (fd < 0) {
LOG(ERROR) << "failed to open " << FOD_UI_PATH << " , err: " << fd;
return;
}
if (fodPressStatusFd < 0) {
LOG(ERROR) << "failed to open fodPressStatusFd, err: " << fodPressStatusFd;
return;
}
struct pollfd fds[2] = {
{fodUiFd, .events = POLLERR | POLLPRI, .revents = 0},
{fodPressStatusFd, .events = POLLERR | POLLPRI, .revents = 0},
struct pollfd fodUiPoll = {
.fd = fd.get(),
.events = POLLERR | POLLPRI,
.revents = 0,
};
while (true) {
int rc = poll(fds, 2, -1);
int rc = poll(&fodUiPoll, 1, -1);
if (rc < 0) {
if (fds[0].revents & POLLERR) {
LOG(ERROR) << "failed to poll fodUiFd, err: " << rc;
}
if (fds[1].revents & POLLERR) {
LOG(ERROR) << "failed to poll fodPressStatusFd, err: " << rc;
}
LOG(ERROR) << "failed to poll " << FOD_UI_PATH << ", err: " << rc;
continue;
}
if (fds[0].revents & (POLLERR | POLLPRI)) {
bool nitState = readBool(fodUiFd);
mDevice->extCmd(mDevice, COMMAND_NIT, nitState ? PARAM_NIT_UDFPS : PARAM_NIT_NONE);
}
if (fds[1].revents & (POLLERR | POLLPRI)) {
bool pressState = readBool(fodPressStatusFd);
mDevice->extCmd(mDevice, COMMAND_FOD_PRESS_STATUS, pressState ? PARAM_FOD_PRESSED : PARAM_FOD_RELEASED);
if (fodUiPoll.revents & (POLLERR | POLLPRI)) {
bool nitState = readBool(fd.get());
mDevice->extCmd(mDevice, COMMAND_NIT,
nitState ? PARAM_NIT_UDFPS : PARAM_NIT_NONE);
}
}
}).detach();
}
void onFingerDown(uint32_t /*x*/, uint32_t /*y*/, float /*minor*/, float /*major*/) {
set(FOD_STATUS_PATH, FOD_STATUS_ON);
if (mAuthSuccess) return;
set(FOD_HBM_PATH, FOD_HBM_ON);
mDevice->extCmd(mDevice, COMMAND_FOD_PRESS_STATUS, PARAM_FOD_PRESSED);
}
void onFingerUp() {
set(FOD_STATUS_PATH, FOD_STATUS_OFF);
set(FOD_HBM_PATH, FOD_HBM_OFF);
mDevice->extCmd(mDevice, COMMAND_FOD_PRESS_STATUS, PARAM_FOD_RELEASED);
}
void onAcquired(int32_t result, int32_t vendorCode) {
if (static_cast<AcquiredInfo>(result) == AcquiredInfo::GOOD) {
set(FOD_HBM_PATH, FOD_HBM_OFF);
set(FOD_STATUS_PATH, FOD_STATUS_OFF);
} else if (vendorCode == 21) {
/*
* vendorCode = 21 waiting for finger
* vendorCode = 22 finger down
* vendorCode = 23 finger up
*/
set(FOD_STATUS_PATH, FOD_STATUS_ON);
void onAcquired(int32_t result, int32_t /*vendorCode*/) {
switch (static_cast<AcquiredInfo>(result)) {
case AcquiredInfo::GOOD:
case AcquiredInfo::PARTIAL:
case AcquiredInfo::INSUFFICIENT:
case AcquiredInfo::SENSOR_DIRTY:
case AcquiredInfo::TOO_SLOW:
case AcquiredInfo::TOO_FAST:
case AcquiredInfo::TOO_DARK:
case AcquiredInfo::TOO_BRIGHT:
case AcquiredInfo::IMMOBILE:
case AcquiredInfo::LIFT_TOO_SOON:
onFingerUp();
break;
default:
break;
}
}
void cancel() {
set(FOD_STATUS_PATH, FOD_STATUS_OFF);
set(FOD_HBM_PATH, FOD_HBM_OFF);
void onAuthenticationSucceeded() {
mAuthSuccess = true;
onFingerUp();
std::thread([this]() {
std::this_thread::sleep_for(std::chrono::milliseconds(500));
mAuthSuccess = false;
}).detach();
}
void onAuthenticationFailed() { onFingerUp(); }
private:
fingerprint_device_t* mDevice;
bool mAuthSuccess = false;
};
static UdfpsHandler* create() {

View File

@@ -146,6 +146,8 @@ ro.bluetooth.a2dp_offload.supported=true
# Camera
camera.disable_zsl_mode=true
persist.vendor.camera.logLevel=0
persist.vendor.camera.sensor=0
ro.hardware.camera=xiaomi
# Chipset
@@ -164,8 +166,8 @@ persist.vendor.dpm.idletimer.mode=default
persist.vendor.dpm.nsrm.bkg.evt=3955
persist.vendor.dpmhalservice.enable=1
# FRP
ro.frp.pst=/dev/block/bootdevice/by-name/frp
# Enable DeviceAsWebcam support
ro.usb.uvc.enabled=true
# FUSE passthrough
persist.sys.fuse.passthrough.enable=true
@@ -220,8 +222,13 @@ vendor.display.use_layer_ext=0
vendor.display.use_smooth_motion=0
vendor.gralloc.disable_ubwc=0
# LMK
ro.config.low_ram=false
# Logs
persist.log.tag.OpenGLRenderer=S
persist.log.tag.QC2Buf=W
persist.log.tag.QC2V4l2Codec=E
# Media
debug.stagefright.c2inputsurface=-1
@@ -276,7 +283,16 @@ ro.incremental.enable=yes
vendor.sys.thermal.data.path=/data/vendor/thermal/
# USB
sys.usb.mtp.batchcancel=1
vendor.usb.controller=a600000.dwc3
vendor.usb.diag.func.name=ffs
vendor.usb.dpl.inst.name=dpl
vendor.usb.qdss.inst.name=qdss_sw
vendor.usb.rmnet.func.name=gsi
vendor.usb.rmnet.inst.name=rmnet
vendor.usb.rndis.func.name=gsi
vendor.usb.use_ffs_mtp=1
vendor.usb.use_gadget_hal=1
# Wifi
wifi.aware.interface=wifi-aware0