From af1e763da944395472d2ca9faeb2936bfa94beb8 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Thu, 18 Sep 2025 14:55:32 +0800 Subject: [PATCH 01/76] tama-common: Migrate to AIDL LiveDisplay HAL Change-Id: I4e8be836e94d442b40c63a1ac7dade3c9d9c784c Signed-off-by: Sorayukii --- common.mk | 3 ++- manifest.xml | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/common.mk b/common.mk index 0d8399d..50abf57 100644 --- a/common.mk +++ b/common.mk @@ -274,7 +274,8 @@ PRODUCT_PACKAGES += \ # LiveDisplay PRODUCT_PACKAGES += \ - vendor.lineage.livedisplay@2.0-service-sdm + vendor.lineage.livedisplay-service.sdm +$(call soong_config_set,livedisplay_sdm,enable_dm,false) # Lights PRODUCT_PACKAGES += \ diff --git a/manifest.xml b/manifest.xml index c1d1a54..ff6123c 100644 --- a/manifest.xml +++ b/manifest.xml @@ -170,12 +170,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. hwbinder @1.0::IDisplayPostproc/default - - vendor.lineage.livedisplay - hwbinder - @2.0::IDisplayModes/default - @2.0::IPictureAdjustment/default - vendor.qti.data.factory hwbinder From 6048b37da4e98850f0b5ff81a03d36eec56f5a28 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Wed, 17 Aug 2022 08:27:57 +0000 Subject: [PATCH 02/76] tama-common: Import CXD-224 NFC Signed-off-by: Sorayukii --- common.mk | 9 ++++++++- configs/init.tama.nfc.rc | 6 ++++++ manifest.xml | 5 +++++ proprietary-files.txt | 13 ++++++++++++- rootdir/etc/ueventd.qcom.rc | 8 -------- sepolicy/vendor/file_contexts | 4 +++- system.prop | 3 +++ 7 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 configs/init.tama.nfc.rc diff --git a/common.mk b/common.mk index 50abf57..b46b124 100644 --- a/common.mk +++ b/common.mk @@ -326,13 +326,20 @@ PRODUCT_PACKAGES += \ # NFC PRODUCT_PACKAGES += \ - android.hardware.nfc-service.nxp \ + android.hardware.nfc@1.1.vendor \ com.android.nfc_extras \ Tag +# Secure Element +PRODUCT_PACKAGES += \ + android.hardware.secure_element@1.0.vendor + PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nci.conf +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/init.tama.nfc.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.tama.nfc.rc + # Power PRODUCT_PACKAGES += \ android.hardware.power-service.lineage-libperfmgr \ diff --git a/configs/init.tama.nfc.rc b/configs/init.tama.nfc.rc new file mode 100644 index 0000000..fa2cce4 --- /dev/null +++ b/configs/init.tama.nfc.rc @@ -0,0 +1,6 @@ +on post-fs-data + setprop ro.support.felica 1 + +# FeliCa/NFC + chown nfc nfc /dev/cxd224x-i2c + chown nfc nfc /dev/bd7602-i2c diff --git a/manifest.xml b/manifest.xml index ff6123c..378d87f 100644 --- a/manifest.xml +++ b/manifest.xml @@ -97,6 +97,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @1.2::IDevice/qti-dsp @1.2::IDevice/qti-gpu + + android.hardware.nfc + hwbinder + @1.1::INfc/default + android.hardware.radio hwbinder diff --git a/proprietary-files.txt b/proprietary-files.txt index 12af053..dc07450 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -968,7 +968,18 @@ vendor/lib64/unnhal-acc-common.so vendor/lib64/unnhal-acc-hvx.so # NFC -vendor/lib64/libpn553_fw.so:vendor/lib/libpn553_fw.so +system/etc/libnfc-nci.conf +system/etc/felica/common.cfg +system/etc/felica/mfm.cfg +system/etc/felica/mfs.cfg +vendor/bin/hw/android.hardware.nfc@1.1-service.cxd22xx +vendor/etc/libnfc-cxd22xx.conf +vendor/etc/libnfc-cxd-224x02010010.conf +vendor/etc/libnfc-cxd-224x02310011.conf +vendor/etc/nfc_settings.conf +vendor/etc/init/android.hardware.nfc@1.1-service.cxd22xx.rc +vendor/firmware/cxd224x_firmware_ES1.1.bin +vendor/firmware/cxd224x_firmware_ES1.0.bin # Peripheral manager vendor/bin/pm-proxy diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc index cb75446..09a3579 100644 --- a/rootdir/etc/ueventd.qcom.rc +++ b/rootdir/etc/ueventd.qcom.rc @@ -301,14 +301,6 @@ firmware_directories /vendor/firmware_mnt/image/ /sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system /sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system -#nfc permissions -#/dev/nfc-nci 0660 nfc nfc -#/dev/nq-nci 0660 nfc nfc -#/dev/assd 0660 nfc nfc - -# NFC -/dev/pn553 0660 nfc nfc - # UIO devices /dev/uio0 0660 system system /dev/uio1 0660 system system diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 9f1aedc..c726e91 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -44,7 +44,9 @@ /mnt/idd/startup-prober(/.*)? u:object_r:startupprober_file:s0 # NFC -/dev/pn553 u:object_r:nfc_device:s0 +/(vendor|system/vendor)/bin/hw/android.hardware.nfc@1.1-service.cxd22xx u:object_r:hal_nfc_default_exec:s0 +/dev/bd7602-i2c u:object_r:nfc_device:s0 +/dev/cxd224x-i2c u:object_r:nfc_device:s0 # PERSIST /mnt/vendor/persist/credmgr/credmgr2.db u:object_r:persist_credmgr_file:s0 diff --git a/system.prop b/system.prop index 3e38aa1..a1e6f0f 100644 --- a/system.prop +++ b/system.prop @@ -30,6 +30,9 @@ debug.sf.latch_unsignaled=1 # Media media.settings.xml=/vendor/etc/media_profiles_vendor.xml +# NFC +ro.nfc.port=I2C + # QC framework value-adds ro.vendor.qti.va_aosp.support=1 From af76a2dd7e004c327754f83aaefa8b03c136f677 Mon Sep 17 00:00:00 2001 From: Chenyang Zhong Date: Sun, 7 Nov 2021 06:34:30 -0500 Subject: [PATCH 03/76] tama-common: sepolicy: allow system_server to get app_zygote pgid avc: denied { getpgid } for scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0 Appeared during UiBench. Change-Id: Ia3314677b2f7f35b19679285db60af12e3fb38a1 Signed-off-by: Chenyang Zhong Signed-off-by: Sorayukii --- sepolicy/private/system_server.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/private/system_server.te diff --git a/sepolicy/private/system_server.te b/sepolicy/private/system_server.te new file mode 100644 index 0000000..3bdf438 --- /dev/null +++ b/sepolicy/private/system_server.te @@ -0,0 +1 @@ +allow system_server app_zygote:process getpgid; From 4a365ba4c0333c4788c10add8ce65f55670fe12f Mon Sep 17 00:00:00 2001 From: Pig Date: Tue, 21 Apr 2020 22:36:28 +0200 Subject: [PATCH 04/76] tama-common: sepolicy: ignore hardless QCOM denials Change-Id: Ie8f74bde8aeedbd134b11307221c1f930ea4f5dc Signed-off-by: Chenyang Zhong Signed-off-by: Sorayukii --- sepolicy/vendor/dontaudit.te | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sepolicy/vendor/dontaudit.te diff --git a/sepolicy/vendor/dontaudit.te b/sepolicy/vendor/dontaudit.te new file mode 100644 index 0000000..b6a29e4 --- /dev/null +++ b/sepolicy/vendor/dontaudit.te @@ -0,0 +1,8 @@ +# Ignore harmless QCOM denials +dontaudit { + init + priv_app +} { + bt_firmware_file + firmware_file +}:filesystem getattr; From f085d729d791455bbd2da222bcaed54cdbe07da9 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Mon, 5 Sep 2022 12:23:16 +0000 Subject: [PATCH 05/76] tama-common: sepolicy: Address dpmd denial Adresses avc: denied { write } for comm="DPMReceiver" name="dpmd" dev="tmpfs" ino=35932 scontext=u:r:radio:s0 tcontext=u:object_r:vendor_dpmd_socket:s0 tclass=sock_file permissive=0 Signed-off-by: Sorayukii --- sepolicy/private/radio.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/private/radio.te diff --git a/sepolicy/private/radio.te b/sepolicy/private/radio.te new file mode 100644 index 0000000..330394e --- /dev/null +++ b/sepolicy/private/radio.te @@ -0,0 +1 @@ +allow radio vendor_dpmd_socket:sock_file write; From 2efe3473e40f10653c734e768bdf44670c6c1dbb Mon Sep 17 00:00:00 2001 From: ekkusa Date: Mon, 5 Sep 2022 12:36:28 +0000 Subject: [PATCH 06/76] tama-common: sepolicy: Address hal_health_default Signed-off-by: Sorayukii --- sepolicy/vendor/hal_health_default.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/hal_health_default.te diff --git a/sepolicy/vendor/hal_health_default.te b/sepolicy/vendor/hal_health_default.te new file mode 100644 index 0000000..ce030d1 --- /dev/null +++ b/sepolicy/vendor/hal_health_default.te @@ -0,0 +1 @@ +allow hal_health_default sysfs:file { read }; From 40bcf39aae4761aa2925ad0cafb52b1985cb990f Mon Sep 17 00:00:00 2001 From: David Viteri Date: Thu, 24 Jan 2019 15:08:24 +0100 Subject: [PATCH 07/76] tama-common: sepolicy: label wireless_charger as sysfs_batteryinfo health is trying to access it to read /type akari:/sys/class/power_supply # ls -l lrwxrwxrwx 1 root root 0 1970-10-30 11:07 wireless -> ../../devices/platform/soc/a88000.i2c/i2c-0/0-0061/power_supply/wireless Signed-off-by: David Viteri Signed-off-by: Sorayukii --- sepolicy/vendor/genfs_contexts | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts index e0cd715..6d0e25c 100644 --- a/sepolicy/vendor/genfs_contexts +++ b/sepolicy/vendor/genfs_contexts @@ -20,6 +20,7 @@ genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.q genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/jeita_wlc_thresh_hot u:object_r:sysfs_batteryinfo:s0 genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/jeita_wlc_thresh_warm u:object_r:sysfs_batteryinfo:s0 genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qpnp,fg/battery_soc u:object_r:sysfs_batteryinfo:s0 +genfscon sysfs /devices/platform/soc/a88000.i2c/i2c-0/0-0061/power_supply/wireless/type u:object_r:sysfs_batteryinfo:s0 genfscon sysfs /devices/virtual/switch/lid/state u:object_r:sysfs_switch_lid:s0 From cee450687a53627d5b69e0c8459e77c587350cac Mon Sep 17 00:00:00 2001 From: ekkusa Date: Wed, 7 Sep 2022 12:12:38 +0000 Subject: [PATCH 08/76] tama-common: sepolicy: Address lmkd denial [ 429.331558] type=1400 audit(1662552347.556:4879): avc: denied { sys_admin } for comm="lmkd" capability=21 scontext=u:r:lmkd:s0 tcontext=u:r:lmkd:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/lmdk.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/lmdk.te diff --git a/sepolicy/vendor/lmdk.te b/sepolicy/vendor/lmdk.te new file mode 100644 index 0000000..fa9620e --- /dev/null +++ b/sepolicy/vendor/lmdk.te @@ -0,0 +1 @@ +allow lmkd lmkd:capability { sys_admin }; From 88a8ca3a99fca8831970c3afd0a642ba8616f4e2 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Wed, 7 Sep 2022 12:18:14 +0000 Subject: [PATCH 09/76] tama-common: sepolicy: Allow vold to write to sysfs_mmc_host 10-10 22:34:00.851 352 352 W Binder:352_2: type=1400 audit(0.0:9): avc: denied { write } for name="read_ahead_kb" dev="sysfs" ino=24687 scontext=u:r:vold:s0 tcontext=u:object_r:sysfs_mmc_host:s0 tclass=file permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/vold.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/vold.te diff --git a/sepolicy/vendor/vold.te b/sepolicy/vendor/vold.te new file mode 100644 index 0000000..4617915 --- /dev/null +++ b/sepolicy/vendor/vold.te @@ -0,0 +1 @@ +allow vold sysfs_mmc_host:file { write }; From 203af0488ce3e60cc32ad5940506384a3ab58128 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Wed, 7 Sep 2022 22:54:25 +0000 Subject: [PATCH 10/76] tama-common: sepolicy: Allow surfaceflinger to search hal_graphics_composer_default [log] avc: denied { search } dev="proc" scontext=u:r:surfaceflinger:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=dir permissive=0 Bug: 154688047 Change-Id: Ia9735f2b938f57c37f741d6f0526cf29df180fcb Signed-off-by: Sorayukii --- sepolicy/vendor/surfaceflinger.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/surfaceflinger.te diff --git a/sepolicy/vendor/surfaceflinger.te b/sepolicy/vendor/surfaceflinger.te new file mode 100644 index 0000000..02fa07f --- /dev/null +++ b/sepolicy/vendor/surfaceflinger.te @@ -0,0 +1 @@ +allow surfaceflinger hal_graphics_composer_default:dir search; From cdbcbcf8b735417f3de9c64a00e403448f1f62b4 Mon Sep 17 00:00:00 2001 From: Hikari-no-Tenshi Date: Tue, 19 Apr 2022 19:38:46 +0600 Subject: [PATCH 11/76] tama-common: sepolicy: Address netutils_wrapper sysadmin spam Signed-off-by: Sorayukii --- sepolicy/vendor/netutils_wrapper.te | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sepolicy/vendor/netutils_wrapper.te diff --git a/sepolicy/vendor/netutils_wrapper.te b/sepolicy/vendor/netutils_wrapper.te new file mode 100644 index 0000000..7900c24 --- /dev/null +++ b/sepolicy/vendor/netutils_wrapper.te @@ -0,0 +1,3 @@ +# disable logspam +dontaudit netutils_wrapper vendor_file:file r_file_perms; +dontaudit netutils_wrapper { netutils_wrapper netutils_wrapper }:capability sys_admin; From 99ee36465a2c27372e9f0456684447fccc414a72 Mon Sep 17 00:00:00 2001 From: "Kevin F. Haggerty" Date: Sat, 5 Sep 2020 05:26:22 -0600 Subject: [PATCH 12/76] tama-common: sepolicy: Allow system_app to access zram sysfs nodes avc: denied { search } for name="zram0" dev="sysfs" ino=20744 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0 avc: denied { open } for name="mem_used_total" dev="sysfs" ino=20804 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0 avc: denied { read } for name="mem_used_total" dev="sysfs" ino=20804 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0 Change-Id: Ide9b1a9488b26fa69e7a2c8e73a8e657c8b28beb Signed-off-by: Sorayukii --- sepolicy/vendor/system_app.te | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sepolicy/vendor/system_app.te diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te new file mode 100644 index 0000000..2b520dc --- /dev/null +++ b/sepolicy/vendor/system_app.te @@ -0,0 +1,3 @@ +# allow system app to access zram sysfs nodes +allow system_app sysfs_zram:dir search; +allow system_app sysfs_zram:file r_file_perms; From c6b50cea76706fea6f18d6e5eedfb403978d5cfd Mon Sep 17 00:00:00 2001 From: "Kevin F. Haggerty" Date: Fri, 4 Sep 2020 15:05:29 -0600 Subject: [PATCH 13/76] tama-common: sepolicy: Quiet system_app attempts to find disallowed services Change-Id: I6a17bef88c3b9fe9f075dc0ef3de5e203f5d9ce3 Signed-off-by: Sorayukii --- sepolicy/vendor/system_app.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te index 2b520dc..ae0f60a 100644 --- a/sepolicy/vendor/system_app.te +++ b/sepolicy/vendor/system_app.te @@ -1,3 +1,8 @@ # allow system app to access zram sysfs nodes allow system_app sysfs_zram:dir search; allow system_app sysfs_zram:file r_file_perms; + +dontaudit system_app { + apex_service + system_suspend_control_service +}:service_manager find; From 64219b89a927febc9c55694b651960d7c75b54ce Mon Sep 17 00:00:00 2001 From: "Kevin F. Haggerty" Date: Fri, 4 Sep 2020 14:55:59 -0600 Subject: [PATCH 14/76] tama-common: sepolicy: Allow system_app to read /proc/pagetypeinfo avc: denied { read } for name="pagetypeinfo" dev="proc" ino=4026543033 scontext=u:r:system_app:s0 tcontext=u:object_r:proc_pagetypeinfo:s0 tclass=file permissive=0 Change-Id: I16465eb9acca9ff64a755d47f86f4ff424ebe4de Signed-off-by: Sorayukii --- sepolicy/vendor/system_app.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te index ae0f60a..bc3e607 100644 --- a/sepolicy/vendor/system_app.te +++ b/sepolicy/vendor/system_app.te @@ -2,6 +2,9 @@ allow system_app sysfs_zram:dir search; allow system_app sysfs_zram:file r_file_perms; +# allow system app to read /proc/pagetypeinfo +allow system_app proc_pagetypeinfo:file r_file_perms; + dontaudit system_app { apex_service system_suspend_control_service From 7473df29d229c97c00f551e3e74c8135daadd1ed Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Wed, 3 Mar 2021 03:25:01 +0100 Subject: [PATCH 15/76] tama-common: sepolicy: Resolve vmallocinfo denial avc: denied { read } for name="vmallocinfo" dev="proc" ino=4026534195 scontext=u:r:system_app:s0 tcontext=u:object_r:proc_vmallocinfo:s0 tclass=file permissive=0 Change-Id: Ia452034156635255fc91022a9836863136b324b4 Signed-off-by: Sorayukii --- sepolicy/vendor/system_app.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te index bc3e607..8f16e86 100644 --- a/sepolicy/vendor/system_app.te +++ b/sepolicy/vendor/system_app.te @@ -5,6 +5,9 @@ allow system_app sysfs_zram:file r_file_perms; # allow system app to read /proc/pagetypeinfo allow system_app proc_pagetypeinfo:file r_file_perms; +# allow system app to read vmallocinfo +allow system_app proc_vmallocinfo:file r_file_perms; + dontaudit system_app { apex_service system_suspend_control_service From 1731a343b7fad28aa434e982d36e65259ebeddca Mon Sep 17 00:00:00 2001 From: ekkusa Date: Fri, 9 Sep 2022 13:06:54 +0000 Subject: [PATCH 16/76] tama-common: sepolicy: Address thermal-engine binder call [12065.068485] type=1400 audit(1662723627.591:10514): avc: denied { call } for comm="thermal-engine" scontext=u:r:thermal-engine:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/thermal-engine.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sepolicy/vendor/thermal-engine.te b/sepolicy/vendor/thermal-engine.te index 7d72657..93eb22c 100644 --- a/sepolicy/vendor/thermal-engine.te +++ b/sepolicy/vendor/thermal-engine.te @@ -4,3 +4,5 @@ allow thermal-engine sysfs_devfreq:dir r_dir_perms; r_dir_file(thermal-engine, sysfs) get_prop(thermal-engine, hwservicemanager_prop) + +binder_call(thermal-engine, hwservicemanager) From 4a48eda5d3c409086880204ce162b1fa1ec6fc1a Mon Sep 17 00:00:00 2001 From: Elektroschmock Date: Sun, 17 Apr 2022 04:08:26 +0700 Subject: [PATCH 17/76] tama-common: sepolicy: Fix isolated_app denial [ 246.285320] type=1400 audit(1662729263.666:7887): avc: denied { setattr } for comm="ThreadPoolForeg" name="crs.pb" dev="sda73" ino=39478 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c253,c256,c512,c768 tclass=file permissive=0 [ 246.285658] type=1400 audit(1662729263.670:7888): avc: denied { setattr } for comm="ThreadPoolForeg" name="ct_config.pb" dev="sda73" ino=26375 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c253,c256,c512,c768 tclass=file permissive=0 [ 246.286498] type=1400 audit(1662729263.670:7889): avc: denied { setattr } for comm="ThreadPoolForeg" name="kp_pinslist.pb" dev="sda73" ino=34892 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c253,c256,c512,c768 tclass=file permissive=0 [ 246.287160] type=1400 audit(1662729263.670:7890): avc: denied { setattr } for comm="ThreadPoolForeg" name="manifest.json" dev="sda73" ino=34899 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c253,c256,c512,c768 tclass=file permissive=0 [ 246.289090] type=1400 audit(1662729263.674:7891): avc: denied { setattr } for comm="ThreadPoolForeg" name="verified_contents.json" dev="sda73" ino=43171 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c253,c256,c512,c768 tclass=file permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/isolated_app.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/isolated_app.te diff --git a/sepolicy/vendor/isolated_app.te b/sepolicy/vendor/isolated_app.te new file mode 100644 index 0000000..2c4640b --- /dev/null +++ b/sepolicy/vendor/isolated_app.te @@ -0,0 +1 @@ +allow isolated_app app_data_file:file { setattr }; From 63321d72e87906a10f1fd1a58bc12fcdc5fb059b Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Tue, 20 Oct 2020 13:23:41 +0530 Subject: [PATCH 18/76] tama-common: sepolicy: Address init denials regarding socket_device [ 9.346918] type=1400 audit(71454275.960:7): avc: denied { create } for comm="init" name="dpmwrapper" scontext=u:r:init:s0 tcontext=u:object_r:socket_device:s0 tclass=sock_file permissive=0 Ref: [0]: https://source.codeaurora.org/quic/la/device/qcom/sepolicy/commit/?h=LA.UM.9.2.1.r1-03800-sdm660.0&id=79488292273efa5ab89bc405a5f6ae4dec5d011d Signed-off-by: Aayush Gupta Change-Id: I262b06821c0625978b3685d0666bd2cf599fbf98 Signed-off-by: Sorayukii --- sepolicy/vendor/init.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sepolicy/vendor/init.te b/sepolicy/vendor/init.te index dffcd8f..194b7b2 100644 --- a/sepolicy/vendor/init.te +++ b/sepolicy/vendor/init.te @@ -8,3 +8,5 @@ allow init hal_fpc_fingerprint_socket:sock_file create_file_perms; allow init tad_socket:sock_file create_file_perms; allow init qns_data_file:dir mounton; + +allow init socket_device:sock_file { unlink setattr create }; From 7ff4973a4ad59f68c33278c19270ef3ca8171184 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Fri, 9 Sep 2022 13:32:18 +0000 Subject: [PATCH 19/76] tama-common: sepolicy: dontaudit unnecessary fsck rules [ 10.299826] type=1400 audit(16083046.175:3142): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299842] type=1400 audit(16083046.175:3143): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299858] type=1400 audit(16083046.175:3144): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299874] type=1400 audit(16083046.175:3145): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299889] type=1400 audit(16083046.175:3146): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299932] type=1400 audit(16083046.175:3147): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299949] type=1400 audit(16083046.175:3148): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299964] type=1400 audit(16083046.175:3149): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299981] type=1400 audit(16083046.175:3150): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.299997] type=1400 audit(16083046.175:3151): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300012] type=1400 audit(16083046.175:3152): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300042] type=1400 audit(16083046.175:3153): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300059] type=1400 audit(16083046.175:3154): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300075] type=1400 audit(16083046.175:3155): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300090] type=1400 audit(16083046.175:3156): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300106] type=1400 audit(16083046.175:3157): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300121] type=1400 audit(16083046.175:3158): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300137] type=1400 audit(16083046.175:3159): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300250] type=1400 audit(16083046.179:3160): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300267] type=1400 audit(16083046.179:3161): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300284] type=1400 audit(16083046.179:3162): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300300] type=1400 audit(16083046.179:3163): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300315] type=1400 audit(16083046.179:3164): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300331] type=1400 audit(16083046.179:3165): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300346] type=1400 audit(16083046.179:3166): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300362] type=1400 audit(16083046.179:3167): avc: denied { dac_read_search } for comm="e2fsck" capability=2 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 [ 10.300378] type=1400 audit(16083046.179:3168): avc: denied { dac_override } for comm="e2fsck" capability=1 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/fsck.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/vendor/fsck.te b/sepolicy/vendor/fsck.te index 73cce87..17e0200 100644 --- a/sepolicy/vendor/fsck.te +++ b/sepolicy/vendor/fsck.te @@ -4,3 +4,4 @@ allow fsck { appslog_block_device diag_block_device qnovo_block_device }:blk_fil # Allow fsck to getattr on idd_rca_dir, idd_root_dir, idd_data_file, qns_data_file allow fsck { idd_rca_dir idd_root_dir idd_data_file qns_data_file }:dir getattr; +dontaudit fsck self:capability { dac_override dac_read_search }; From a79b7164af9d89251c2c90e934065171c23c656c Mon Sep 17 00:00:00 2001 From: ekkusa Date: Fri, 9 Sep 2022 13:36:45 +0000 Subject: [PATCH 20/76] tama-common: sepolicy: Address fsck sys_admin denial [ 154.478676] type=1400 audit(1662729171.862:3274): avc: denied { sys_admin } for comm="e2fsck" capability=21 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/fsck.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/vendor/fsck.te b/sepolicy/vendor/fsck.te index 17e0200..f515045 100644 --- a/sepolicy/vendor/fsck.te +++ b/sepolicy/vendor/fsck.te @@ -4,4 +4,5 @@ allow fsck { appslog_block_device diag_block_device qnovo_block_device }:blk_fil # Allow fsck to getattr on idd_rca_dir, idd_root_dir, idd_data_file, qns_data_file allow fsck { idd_rca_dir idd_root_dir idd_data_file qns_data_file }:dir getattr; +allow fsck self:capability sys_admin; dontaudit fsck self:capability { dac_override dac_read_search }; From 478bb2a78f915bec3dccab69c7850efbb59c3bd1 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Fri, 9 Sep 2022 13:42:38 +0000 Subject: [PATCH 21/76] tama-common: sepolicy: Address vendor_dpmd sys_admin denial avc: denied { sys_admin } for comm="dpmd" capability=21 scontext=u:r:vendor_dpmd:s0 tcontext=u:r:vendor_dpmd:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/vendor_dpmd.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/vendor_dpmd.te diff --git a/sepolicy/vendor/vendor_dpmd.te b/sepolicy/vendor/vendor_dpmd.te new file mode 100644 index 0000000..f20a635 --- /dev/null +++ b/sepolicy/vendor/vendor_dpmd.te @@ -0,0 +1 @@ +allow vendor_dpmd vendor_dpmd:capability sys_admin; From 1216a27f2d3d7618d352a79cb3fa200f56d5cf97 Mon Sep 17 00:00:00 2001 From: baunilla <49725678+baunilla@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:18:20 +0100 Subject: [PATCH 22/76] tama-common: sepolicy: Grant capabilities to vold_prepare_subdirs W vold_prepare_su: type=1400 audit(0.0:4): avc: denied { kill } for capability=5 scontext=u:r:vold_prepare_subdirs:s0 tcontext=u:r:vold_prepare_subdirs:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/private/vold_prepare_subdirs.te | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sepolicy/private/vold_prepare_subdirs.te diff --git a/sepolicy/private/vold_prepare_subdirs.te b/sepolicy/private/vold_prepare_subdirs.te new file mode 100644 index 0000000..6a2cc72 --- /dev/null +++ b/sepolicy/private/vold_prepare_subdirs.te @@ -0,0 +1,2 @@ +#============= vold_prepare_subdirs ============== +allow vold_prepare_subdirs self:capability { kill sys_admin }; From 105ea90674647cb240dbde7f19e6cc1b8b3466ff Mon Sep 17 00:00:00 2001 From: ekkusa Date: Fri, 9 Sep 2022 13:56:56 +0000 Subject: [PATCH 23/76] tama-common: sepolicy: Address blkid sys_admin denial [ 156.960480] type=1400 audit(1662729174.342:7581): avc: denied { sys_admin } for comm="blkid" capability=21 scontext=u:r:blkid_untrusted:s0 tcontext=u:r:blkid_untrusted:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/blkid_untrusted.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/blkid_untrusted.te diff --git a/sepolicy/vendor/blkid_untrusted.te b/sepolicy/vendor/blkid_untrusted.te new file mode 100644 index 0000000..4429139 --- /dev/null +++ b/sepolicy/vendor/blkid_untrusted.te @@ -0,0 +1 @@ +allow blkid_untrusted blkid_untrusted:capability { sys_admin }; From 68308bc3b87cd70de537d29b80145fe4c350b3b7 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Fri, 16 Dec 2022 19:47:09 +0530 Subject: [PATCH 24/76] tama-common: sepolicy: dontaudit untrusted_app to open ashmem_device - Fixes scroll lag in many apps, such as Twitter: W RenderThread: type=1400 audit(0.0:12371): avc: denied { open } for path=/dev/ashmem dev=tmpfs ino=10848 scontext=u:r:untrusted_app:s0:c123,c256,c512,c768 tcontext=u:object_r:ashmem_device:s0 tclass=chr_file permissive=0 app=com.twitter.android - Apps are no longer allowed open access to /dev/ashmem, unless they target API level < Q. - https://android.googlesource.com/platform/system/sepolicy/+/8b12ff5f218139102d8eec90c91b114078be4402 Signed-off-by: Sorayukii --- sepolicy/vendor/dontaudit.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sepolicy/vendor/dontaudit.te b/sepolicy/vendor/dontaudit.te index b6a29e4..ce78499 100644 --- a/sepolicy/vendor/dontaudit.te +++ b/sepolicy/vendor/dontaudit.te @@ -6,3 +6,7 @@ dontaudit { bt_firmware_file firmware_file }:filesystem getattr; + +# Apps are no longer allowed open access to /dev/ashmem, unless they +# target API level < Q. +dontaudit untrusted_app ashmem_device:chr_file open; \ No newline at end of file From ea06583ccc638e0798dadc8b01c3aebc69cd68c3 Mon Sep 17 00:00:00 2001 From: aryan <66957409+basamaryan@users.noreply.github.com> Date: Mon, 9 Jan 2023 19:22:16 +0530 Subject: [PATCH 25/76] tama-common: sepolicy: address kernel denial * W kworker/u16:5: type=1400 audit(0.0:15): avc: denied { create } for scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=socket permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/kernel.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sepolicy/vendor/kernel.te b/sepolicy/vendor/kernel.te index 9ba3537..6d25ca9 100644 --- a/sepolicy/vendor/kernel.te +++ b/sepolicy/vendor/kernel.te @@ -1 +1,4 @@ allow kernel debugfs_wlan:dir search; + +allow kernel kernel:capability { kill }; +allow kernel self:socket create; From 373d6de715ccb11645d1abc5d32e53ce64beaa4b Mon Sep 17 00:00:00 2001 From: aryan <66957409+basamaryan@users.noreply.github.com> Date: Mon, 9 Jan 2023 19:30:37 +0530 Subject: [PATCH 26/76] tama-common: sepolicy: diag_device access * type=1400 audit(0.0:14): avc: denied { read write } for name="diag" dev="tmpfs" ino=24648 scontext=u:r:rild:s0 tcontext=u:object_r:diag_device:s0 tclass=chr_file permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/ims.te | 1 + sepolicy/vendor/rild.te | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 sepolicy/vendor/ims.te diff --git a/sepolicy/vendor/ims.te b/sepolicy/vendor/ims.te new file mode 100644 index 0000000..d0609dd --- /dev/null +++ b/sepolicy/vendor/ims.te @@ -0,0 +1 @@ +allow ims diag_device:chr_file rw_file_perms; diff --git a/sepolicy/vendor/rild.te b/sepolicy/vendor/rild.te index ec52115..9ee27d2 100644 --- a/sepolicy/vendor/rild.te +++ b/sepolicy/vendor/rild.te @@ -1,6 +1,9 @@ # Allow rild to find hal_secd_hwservice allow rild hal_secd_hwservice:hwservice_manager find; +allow rild diag_device:chr_file rw_file_perms; +allow rild diag_device:chr_file { read write }; + # Allow rild to add hal_somc_radio_hwservice add_hwservice(rild, hal_somc_radio_hwservice) From bd2c9b4dfd43f41f37ddf41e24d7bd9899ea8492 Mon Sep 17 00:00:00 2001 From: RahulGorai0206 Date: Thu, 15 Sep 2022 02:27:35 +0530 Subject: [PATCH 27/76] tama-common: sepolicy: Allow hal_graphics_composer_default to read bootanima_system_prop * avc: denied { read } for name="u:object_r:bootanim_system_prop:s0" dev="tmpfs" ino=12855 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:bootanim_system_prop:s0 tclass=file permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/hal_graphics_composer_default.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/hal_graphics_composer_default.te diff --git a/sepolicy/vendor/hal_graphics_composer_default.te b/sepolicy/vendor/hal_graphics_composer_default.te new file mode 100644 index 0000000..c9df45d --- /dev/null +++ b/sepolicy/vendor/hal_graphics_composer_default.te @@ -0,0 +1 @@ +get_prop(hal_graphics_composer_default, bootanim_system_prop) From 91146d63bb415440ea45838275b1b987471b583f Mon Sep 17 00:00:00 2001 From: Han Sol Jin Date: Sat, 13 Aug 2022 17:45:47 -0700 Subject: [PATCH 28/76] tama-common: sepolicy: shut flags health check up It's not critical but it's spamming the living hell out of logs. Go away. Change-Id: I5777263ab8bf820fe3c362c92da80177bf48745e Signed-off-by: Sorayukii --- sepolicy/vendor/flags_health_check.te | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sepolicy/vendor/flags_health_check.te diff --git a/sepolicy/vendor/flags_health_check.te b/sepolicy/vendor/flags_health_check.te new file mode 100644 index 0000000..c7bcea0 --- /dev/null +++ b/sepolicy/vendor/flags_health_check.te @@ -0,0 +1,2 @@ +# Please shut up. +dontaudit flags_health_check property_type:file { getattr open read map }; From 22ade25ba420a81b954c11752c6ce7b96e88fa76 Mon Sep 17 00:00:00 2001 From: boedhack99 Date: Fri, 10 Feb 2023 13:38:50 +0800 Subject: [PATCH 29/76] tama-common: sepolicy: Allow odrefresh to kill * avc: denied { kill } for comm=odrefresh capability=5 scontext=u:r:odrefresh:s0 tcontext=u:r:odrefresh:s0 tclass=capability permissive=0 Change-Id: Id24f51e8570dcb32a6b35c57c8f4b6c2be626673 Signed-off-by: Sorayukii --- sepolicy/private/odrefresh.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/private/odrefresh.te diff --git a/sepolicy/private/odrefresh.te b/sepolicy/private/odrefresh.te new file mode 100644 index 0000000..89ebef5 --- /dev/null +++ b/sepolicy/private/odrefresh.te @@ -0,0 +1 @@ +allow odrefresh self:capability kill; From 1a7291eefe1fa4df9a9e47508fff3a5457ef8647 Mon Sep 17 00:00:00 2001 From: baunilla Date: Sun, 12 Dec 2021 20:28:22 +0000 Subject: [PATCH 30/76] tama-common: sepolicy: Address qti_init_shell denials * Allow qti_init_shell write access to sysfs nodes avc: denied { setattr } for comm="chown" name="secure_mode" dev="sysfs" ino=20771 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 avc: denied { setattr } for comm="chown" name="secure_mode" dev="sysfs" ino=20845 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:sysfs_leds:s0 tclass=file permissive=1 Signed-off-by: Sorayukii --- sepolicy/vendor/qti_init_shell.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/vendor/qti_init_shell.te b/sepolicy/vendor/qti_init_shell.te index b8643cd..c391e21 100644 --- a/sepolicy/vendor/qti_init_shell.te +++ b/sepolicy/vendor/qti_init_shell.te @@ -1,2 +1,3 @@ allow qti_init_shell proc_sched:file w_file_perms; allow qti_init_shell sysfs:file { setattr write }; +allow qti_init_shell { sysfs_leds sysfs }:file { setattr write }; \ No newline at end of file From ec6cfc8a0af2a5a1df21030170c1796469ee5a77 Mon Sep 17 00:00:00 2001 From: ekkusa Date: Fri, 9 Sep 2022 13:24:48 +0000 Subject: [PATCH 31/76] tama-common: sepolicy: Address wvkbd binder call [ 13.442185] type=1400 audit(1662729030.826:3237): avc: denied { call } for comm="wvkbd" scontext=u:r:wvkbd:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0 [ 13.524050] type=1400 audit(1662729030.906:3238): avc: denied { call } for comm="wvkbd" scontext=u:r:wvkbd:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0 [ 13.603310] type=1400 audit(1662729030.986:3239): avc: denied { call } for comm="wvkbd" scontext=u:r:wvkbd:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0 [ 13.690051] type=1400 audit(1662729031.074:3240): avc: denied { call } for comm="wvkbd" scontext=u:r:wvkbd:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0 [ 13.775781] type=1400 audit(1662729031.158:3241): avc: denied { call } for comm="wvkbd" scontext=u:r:wvkbd:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/wvkbd.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/vendor/wvkbd.te b/sepolicy/vendor/wvkbd.te index 0cbd1fd..eef4d4d 100644 --- a/sepolicy/vendor/wvkbd.te +++ b/sepolicy/vendor/wvkbd.te @@ -7,6 +7,7 @@ get_prop(wvkbd, hwservicemanager_prop) get_prop(wvkbd, vendor_tee_listener_prop) binder_call(wvkbd, hal_secd_default) +binder_call(wvkbd, hwservicemanager) allow wvkbd hal_secd_hwservice:hwservice_manager find; From b1ff759dc539ffa50d539c21f986da97270c19c9 Mon Sep 17 00:00:00 2001 From: ZeeLog Date: Wed, 19 Jan 2022 13:29:51 +0100 Subject: [PATCH 32/76] tama-common: sepolicy: allow vendor_init & zygote to kill Signed-off-by: Sorayukii --- sepolicy/vendor/vendor_init.te | 1 + sepolicy/vendor/zygote.te | 1 + 2 files changed, 2 insertions(+) create mode 100644 sepolicy/vendor/zygote.te diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te index d144add..3fa0acb 100644 --- a/sepolicy/vendor/vendor_init.te +++ b/sepolicy/vendor/vendor_init.te @@ -22,3 +22,4 @@ allow vendor_init sysfs_ssr_toggle:file w_file_perms; allow vendor_init proc_sched:file w_file_perms; allow vendor_init proc_watermark_scale_factor:file w_file_perms; +allow vendor_init self:capability kill; diff --git a/sepolicy/vendor/zygote.te b/sepolicy/vendor/zygote.te new file mode 100644 index 0000000..9c4ec15 --- /dev/null +++ b/sepolicy/vendor/zygote.te @@ -0,0 +1 @@ +allow zygote self:capability kill; From 841f07ce22c7489da9f11092a53231996e29e44f Mon Sep 17 00:00:00 2001 From: wshamroukh Date: Wed, 15 Mar 2023 07:13:11 +0000 Subject: [PATCH 33/76] tama-common: sepolicy: Allow mkswap to kill W mkswap : type=1400 audit(0.0:9): avc: denied { kill } for capability=5 scontext=u:r:toolbox:s0 tcontext=u:r:toolbox:s0 tclass=capability permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/toolbox.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/vendor/toolbox.te diff --git a/sepolicy/vendor/toolbox.te b/sepolicy/vendor/toolbox.te new file mode 100644 index 0000000..2bf13c3 --- /dev/null +++ b/sepolicy/vendor/toolbox.te @@ -0,0 +1 @@ +allow toolbox self:capability kill; \ No newline at end of file From ba5f86f50a93376c2a70d8977fb68fdcf04b626a Mon Sep 17 00:00:00 2001 From: Hemant Sachdeva Date: Wed, 5 May 2021 14:01:21 +0530 Subject: [PATCH 34/76] tama-common: sepolicy: Allow fsck to self kill capability 06-26 18:25:31.739 696 696 W e2fsck : type=1400 audit(0.0:25): avc: denied { kill } for capability=5 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 06-26 18:25:31.779 706 706 W e2fsck : type=1400 audit(0.0:26): avc: denied { kill } for capability=5 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 06-26 18:25:31.799 709 709 W e2fsck : type=1400 audit(0.0:27): avc: denied { kill } for capability=5 scontext=u:r:fsck:s0 tcontext=u:r:fsck:s0 tclass=capability permissive=0 Signed-off-by: Hemant Sachdeva Signed-off-by: Sorayukii --- sepolicy/vendor/fsck.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/vendor/fsck.te b/sepolicy/vendor/fsck.te index f515045..06ae33d 100644 --- a/sepolicy/vendor/fsck.te +++ b/sepolicy/vendor/fsck.te @@ -5,4 +5,5 @@ allow fsck { appslog_block_device diag_block_device qnovo_block_device }:blk_fil allow fsck { idd_rca_dir idd_root_dir idd_data_file qns_data_file }:dir getattr; allow fsck self:capability sys_admin; +allow fsck self:capability kill; dontaudit fsck self:capability { dac_override dac_read_search }; From 9214b8d5af6d5a0ae6d599f02200ca42aaf047fa Mon Sep 17 00:00:00 2001 From: Chenyang Zhong Date: Thu, 29 Jul 2021 18:03:54 +0400 Subject: [PATCH 35/76] tama-common: sepolicy: allow vendor_init to write to blkio avc: denied { write } for comm="init" name="blkio.weight" dev="tmpfs" ino=672 scontext=u:r:vendor_init:s0 tcontext=u:object_r:device:s0 tclass=file permissive=0 avc: denied { write } for comm="init" name="blkio.group_idle" dev="tmpfs" ino=674 scontext=u:r:vendor_init:s0 tcontext=u:object_r:device:s0 tclass=file permissive=0 Signed-off-by: Chenyang Zhong Signed-off-by: Sorayukii --- sepolicy/vendor/file.te | 3 +++ sepolicy/vendor/file_contexts | 3 +++ sepolicy/vendor/vendor_init.te | 2 ++ 3 files changed, 8 insertions(+) diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te index b6f5737..8a62289 100644 --- a/sepolicy/vendor/file.te +++ b/sepolicy/vendor/file.te @@ -1,6 +1,9 @@ # Audio type audio_hweffect_device, file_type; +# files +type blkio_file, file_type; + # Camera type hal_camera_somc_socket, file_type; type sony_camera_device, file_type; diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index c726e91..1c148f6 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -11,6 +11,9 @@ # Dev /dev/socket/tad u:object_r:tad_socket:s0 +# Block IO +/dev/blkio(/.*)? u:object_r:blkio_file:s0 + # DATA /data/vendor/etc/wlan.* u:object_r:wifi_vendor_data_file:s0 /data/vendor/etc/bluetooth.* u:object_r:bluetooth_vendor_data_file:s0 diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te index 3fa0acb..ca3a7bf 100644 --- a/sepolicy/vendor/vendor_init.te +++ b/sepolicy/vendor/vendor_init.te @@ -14,6 +14,8 @@ allow vendor_init block_device:lnk_file relabelfrom; allow vendor_init tad_block_device:blk_file setattr; allow vendor_init tad_block_device:lnk_file relabelto; +allow vendor_init blkio_file:file w_file_perms; + # Allow vendor init to set cust_system_prop set_prop(vendor_init, cust_system_prop) From b4401f7778f0a2db61985511787167881bdf2d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A8raystef66=C2=A8?= Date: Sat, 18 Feb 2023 09:44:39 +0100 Subject: [PATCH 36/76] tama-common: sepolicy: Adress isolated_app denial * SELinux : avc: denied { find } for pid=19014 uid=99025 name=content_capture scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:content_capture_service:s0 tclass=service_manager permissive=0 * SELinux : avc: denied { find } for pid=11474 uid=99937 name=content_capture scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:content_capture_service:s0 tclass=service_manager permissive=0 Signed-off-by: RobertGarciaa Change-Id: Ia59e3989a9f0c2aae930f61ed9e266659f6c92fa Signed-off-by: Sorayukii --- sepolicy/private/isolated_app.te | 1 + 1 file changed, 1 insertion(+) create mode 100644 sepolicy/private/isolated_app.te diff --git a/sepolicy/private/isolated_app.te b/sepolicy/private/isolated_app.te new file mode 100644 index 0000000..1b9d684 --- /dev/null +++ b/sepolicy/private/isolated_app.te @@ -0,0 +1 @@ +dontaudit isolated_app content_capture_service:service_manager find; \ No newline at end of file From d16e3c3a660c61ccb9b91f298122a44115faf3b2 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:21:57 +0800 Subject: [PATCH 37/76] tama-common: sepolicy: Fix up setsched denials [ 260.672834] type=1400 audit(1759664517.049:1046): avc: denied { setsched } for comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:app_zygote:s0:c512,c768 tclass=process permissive=0 10-03 10:11:35.619 1817 1817 W ActivityManager: type=1400 audit(0.0:2941): avc: denied { setsched } for scontext=u:r:system_server:s0 tcontext=u:r:webview_zygote:s0 tclass=process permissive=0 Signed-off-by: Sorayukii --- sepolicy/vendor/system_app.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te index 8f16e86..527a608 100644 --- a/sepolicy/vendor/system_app.te +++ b/sepolicy/vendor/system_app.te @@ -1,3 +1,7 @@ +# web browser crashes +allow system_server webview_zygote:process setsched; +allow system_server app_zygote:process setsched; + # allow system app to access zram sysfs nodes allow system_app sysfs_zram:dir search; allow system_app sysfs_zram:file r_file_perms; From c462f7761831d5d6d4dde8d7cc02b8294321c5c6 Mon Sep 17 00:00:00 2001 From: uwu-gl Date: Sat, 6 Dec 2025 20:38:07 +0800 Subject: [PATCH 38/76] tama-common: sepolicy: Allow system_server to adjust {webview,app}_zygote scheduling This fixes chrome and hotspot. Change-Id: I6b112cea6d96f11fe89e4a5283e7e3b82e1325e4 Signed-off-by: uwu-gl Signed-off-by: Sorayukii --- sepolicy/vendor/system_server.te | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sepolicy/vendor/system_server.te diff --git a/sepolicy/vendor/system_server.te b/sepolicy/vendor/system_server.te new file mode 100644 index 0000000..55f7bfe --- /dev/null +++ b/sepolicy/vendor/system_server.te @@ -0,0 +1,3 @@ +allow system_server webview_zygote:process setsched; +allow system_server app_zygote:process setsched; + From 0ec62215e32f8e7474996d032e0c06928cb57b17 Mon Sep 17 00:00:00 2001 From: ozturkmutlu65 Date: Wed, 11 Feb 2026 23:39:03 +0800 Subject: [PATCH 39/76] tama-common: sepolicy: Add com.android.bluetooth context to seapp_contexts Signed-off-by: Sorayukii --- sepolicy/vendor/seapp_contexts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sepolicy/vendor/seapp_contexts b/sepolicy/vendor/seapp_contexts index 6cca5ae..8b07899 100644 --- a/sepolicy/vendor/seapp_contexts +++ b/sepolicy/vendor/seapp_contexts @@ -1 +1,3 @@ user=_app seinfo=platform name=com.sony.opentelephony.modemconfig isPrivApp=true domain=modemconfig_app type=app_data_file + +user=bluetooth seinfo=default name=com.android.bluetooth domain=bluetooth type=bluetooth_data_file levelFrom=all isPrivApp=true From 3911514720872976782a353bf1430e5686f3b7ad Mon Sep 17 00:00:00 2001 From: namaskaragusthi Date: Sun, 22 May 2022 18:34:15 +0600 Subject: [PATCH 40/76] tama-common: overlay: Improve UI Smoothness Signed-off-by: Sorayukii --- .../frameworks/base/core/res/res/values/config.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index a8c64f2..c12bbb6 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -295,4 +295,15 @@ true + + + true + + + true From 9a534e3a4cae2ea0da8fbe3ee6d1df84825aafd5 Mon Sep 17 00:00:00 2001 From: kdrag0n Date: Sat, 3 Sep 2022 10:12:06 +0530 Subject: [PATCH 41/76] tama-common: overlay: Offload WM shell to another thread Android 12 added this config to offload some window management to a dedicated thread. Enable it to improve performance when the main System UI thread is busy. Change-Id: I9eef4cdbc26d0880f3a9aaf875d5e36ebd693238 Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index c12bbb6..46952c2 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -306,4 +306,7 @@ Off by default, since the framebuffer readback used to implement the fading edges is prohibitively expensive on most GPUs. --> true + + + true From 2eb198e21e9ad23f66ed04d703f6c5a76580201f Mon Sep 17 00:00:00 2001 From: Terminator-J Date: Wed, 23 Mar 2022 20:46:08 +0200 Subject: [PATCH 42/76] tama-common: overlay: Fix hyper orange night light Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 46952c2..981f7e8 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -309,4 +309,12 @@ true + + + true + + + 6500 From 8e128b38c5b26e976910e38f428aef711bd2f5b5 Mon Sep 17 00:00:00 2001 From: arco Date: Sat, 1 Apr 2023 20:03:36 +0530 Subject: [PATCH 43/76] tama-common: overlay: Set config_use16BitTaskSnapshotPixelFormat to true Change-Id: I203c6f54953744e1af67e5b37a72b5b095eabb65 Signed-off-by: Christopher Signed-off-by: kssrao13882 Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 981f7e8..556acdc 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -317,4 +317,8 @@ 6500 + + + true + From 957810dfbe34ebffe0fc0d3fe8f20c5505af6dde Mon Sep 17 00:00:00 2001 From: mikeNG Date: Sat, 22 Jul 2023 08:04:23 +0530 Subject: [PATCH 44/76] tama-common: overlay: Enable performant auth feature Change-Id: I76f0c3242f7cb16b4ddc8ed5e4bfcb35b65cc8ff Signed-off-by: kssrao13882 Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 556acdc..dbd4847 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -321,4 +321,7 @@ true + + true + From 1edb11b759c85e5c358a4e1e2261370a914f78b4 Mon Sep 17 00:00:00 2001 From: FPSensor Date: Tue, 31 Oct 2023 21:51:12 +0000 Subject: [PATCH 45/76] tama-common: overlay: Set config_use_large_screen_shade_header to true * it reduces QS Lags a lot Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index dbd4847..7b08f3e 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -324,4 +324,7 @@ true + + true + From e950031ef63ad575402f5f422eef2ce2c35eb395 Mon Sep 17 00:00:00 2001 From: JYRRC Date: Thu, 22 Feb 2024 20:39:35 +0100 Subject: [PATCH 46/76] tama-common: overlay: Add config_wallpaperMaxScale overlay - This should fix QS lag when pulling it down Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 7b08f3e..608288f 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -327,4 +327,7 @@ true + + 1 + From 3352bba5a9dbb2ce69d6d3a4bd539d4342be5451 Mon Sep 17 00:00:00 2001 From: Chiawei Wang Date: Fri, 18 Oct 2024 16:09:41 +0800 Subject: [PATCH 47/76] tama-common: overlay: Add the customized max cached processes number Bug: 190531672 Test: make Test: dumpsys activity | grep CUR_MAX_CACHED_PROCESSES Change-Id: Ie1c17312a0eadb2c3f033c8a674ceb234abeadb3 Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 608288f..07fa281 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -330,4 +330,7 @@ 1 + + 64 + From 3d943eca68c103fae21ea1b7b91bcb0e763643f1 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:03:00 +0700 Subject: [PATCH 48/76] tama-common: overlay: Add overlay for battery information Signed-off-by: Sorayukii --- .../apps/Settings/res/values/config.xml | 30 +++++++++++++++++++ sepolicy/vendor/system_app.te | 3 ++ 2 files changed, 33 insertions(+) create mode 100644 overlay/packages/apps/Settings/res/values/config.xml diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml new file mode 100644 index 0000000..3c58cbb --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + + + + true + /sys/class/power_supply/bms/charge_full + /sys/class/power_supply/bms/charge_full_design + /sys/class/power_supply/bms/cycle_count + + diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te index 527a608..b01ec4e 100644 --- a/sepolicy/vendor/system_app.te +++ b/sepolicy/vendor/system_app.te @@ -1,3 +1,6 @@ +# allow system apps to read battery status +r_dir_file(system_app, sysfs_battery_supply) + # web browser crashes allow system_server webview_zygote:process setsched; allow system_server app_zygote:process setsched; From 8995d0004a56ab4fe349f03dc1eea57e0ba5a5e9 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Thu, 23 Apr 2026 20:55:11 +0000 Subject: [PATCH 49/76] tama-common: overlay: Enable burn in protection Signed-off-by: Sorayukii --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 07fa281..8e976c2 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -327,6 +327,9 @@ true + + true + 1 From d21bf5aa48be319191215df92747f70906f41e31 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Tue, 5 May 2026 17:52:28 +0000 Subject: [PATCH 50/76] tama-common: overlay: Add color mode Signed-off-by: Sorayukii --- .../base/core/res/res/values/config.xml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 8e976c2..6103ccb 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -330,6 +330,51 @@ true + + + 0 + 1 + 2 + 3 + + + + 2 + + + + 0 + 1 + 2 + 3 + + + 0 + 0 + 0 + 9 + + + + true + + + true + 1 From 560232415bc76f58857d913f130c34df0508443d Mon Sep 17 00:00:00 2001 From: me-cafebabe Date: Thu, 12 Feb 2026 00:05:21 +0800 Subject: [PATCH 51/76] tama-common: overlay: Disable high performance transitions --- overlay/frameworks/base/core/res/res/values/config.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 6103ccb..ad844e5 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -381,4 +381,8 @@ 64 + + false + From 2419ee4b370a2518a1f84dc661192173c1f68dd7 Mon Sep 17 00:00:00 2001 From: Tasos Sahanidis Date: Thu, 12 Feb 2026 11:33:18 +0800 Subject: [PATCH 52/76] tama-common: overlay: Disable turbulence noise This helps with jank when pulling down the status bar. Change-Id: Ifb7043492e9a38a58d7b1351355b47ec590ee5c7 --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index ad844e5..87dcca6 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -385,4 +385,7 @@ (lower-end devices may want to disable) --> false + + false + From 4a4a7b15449888cda789808935016b68264d727f Mon Sep 17 00:00:00 2001 From: aoitsme Date: Sat, 23 May 2026 11:25:21 +0000 Subject: [PATCH 53/76] tama-common: overlay: Import config_defaultPinnerServiceFiles from pixel --- .../base/core/res/res/values/config.xml | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 87dcca6..8c65ff4 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -225,21 +225,14 @@ 600 - + - "/system/framework/framework.jar" - "/system/framework/services.jar" - "/apex/com.android.art/javalib/core-oj.jar" - "/apex/com.android.art/javalib/core-libart.jar" - "/system_ext/priv-app/SystemUI/SystemUI.apk" - "/system/bin/surfaceflinger" - /system/lib64/libRScpp.so - /system/lib64/libRS.so - /system/lib64/libRS_internal.so - /system/lib64/libbcinfo.so - /system/lib64/libRSDriver.so - /system/lib64/libRSCpuRef.so - /system/lib64/libblas.so + /apex/com.android.art/javalib/core-oj.jar + /apex/com.android.art/javalib/core-libart.jar + /system/framework/framework.jar + /system/framework/services.jar + /system/bin/surfaceflinger + /system_ext/priv-app/SystemUI/SystemUI.apk From ba445e54023f94587da9cd9c3809af379350ca08 Mon Sep 17 00:00:00 2001 From: aoitsme Date: Thu, 21 May 2026 23:20:28 +0000 Subject: [PATCH 54/76] tama-common: prop: Disable sf backpressure --- system.prop | 1 + 1 file changed, 1 insertion(+) diff --git a/system.prop b/system.prop index a1e6f0f..5968822 100644 --- a/system.prop +++ b/system.prop @@ -26,6 +26,7 @@ ro.vendor.use_data_netmgrd=true # Graphics debug.sf.enable_hwc_vds=1 debug.sf.latch_unsignaled=1 +debug.sf.disable_backpressure=1 # Media media.settings.xml=/vendor/etc/media_profiles_vendor.xml From a5d9b254776e68dded3d2633f042774de64e54c6 Mon Sep 17 00:00:00 2001 From: aoitsme Date: Sat, 23 May 2026 11:27:07 +0000 Subject: [PATCH 55/76] tama-common: prop: Don't kill heaviest task --- product.prop | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product.prop b/product.prop index ff8bc53..86d36a7 100644 --- a/product.prop +++ b/product.prop @@ -2,4 +2,6 @@ ro.telephony.block_binder_thread_on_incoming_calls=false # LMKD +ro.lmk.kill_heaviest_task=false +ro.lmk.kill_timeout_ms=100 ro.lmk.log_stats=true From 572252fbe71b8a63c6ca811bc7420997e80c5138 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Thu, 23 Apr 2026 21:03:49 +0000 Subject: [PATCH 56/76] tama-common: init: Remove duplicate Gold L3 ratio ceil Signed-off-by: Sorayukii --- rootdir/etc/init.qcom.power.rc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index 0f46e69..766daa0 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -204,9 +204,7 @@ on enable-low-power write /sys/class/devfreq/soc:qcom,l3-cdsp/governor "userspace" chown system /sys/class/devfreq/soc:qcom,l3-cdsp/userspace/set_freq - # Gold L3 ratio ceil - write /sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil 4000 - + # Enable compute governor for mincpubw write /sys/class/devfreq/soc:qcom,mincpubw/governor "compute" write /sys/class/devfreq/soc:qcom,mincpubw/polling_interval 10 From f7c749f6ca9cb31067128bceca873e64a290be3f Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Fri, 21 Nov 2025 19:14:36 +0700 Subject: [PATCH 57/76] tama-common: init: Hack bms temperature limit Useful when charging Signed-off-by: Sorayukii --- rootdir/etc/init.qcom.power.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index 766daa0..fb92925 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -96,6 +96,10 @@ on boot # locks and process hints until it doesn't exists or it is empty. setprop vendor.post_boot.parsed 1 + # Increase bms temperature + write /sys/class/power_supply/bms/temp_warm 500 + write /sys/class/power_supply/bms/temp_hot 550 + on post-fs # Disable sched autogroup write /proc/sys/kernel/sched_autogroup_enabled 0 From 60ab3fd6d12d172d306f85531b5ed172577568b0 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Sat, 22 Nov 2025 16:44:52 +0700 Subject: [PATCH 58/76] tama-common: init: Tune cpufreq Signed-off-by: Sorayukii --- rootdir/etc/init.qcom.power.rc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index fb92925..fef041c 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -61,12 +61,18 @@ on init write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "schedutil" write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500 write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 576000 + write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq 1132800 + write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load 90 + write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/pl 1 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 # Configure governor settings for big cluster write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor "schedutil" write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/up_rate_limit_us 500 write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/down_rate_limit_us 20000 + write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq 1612800 + write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load 90 + write /sys/devices/system/cpu/cpu4/cpufreq/schedutil/pl 1 write /sys/devices/system/cpu/cpu4cpufreq/scaling_min_freq 825000 # Set default schedTune value for foreground/top-app From ea3d334d03fefaa818338cca4589c73e0ef7a97a Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:29:00 +0700 Subject: [PATCH 59/76] tama-common: init: Add cpuset for audio and camera Signed-off-by: Sorayukii --- rootdir/etc/init.qcom.power.rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index fef041c..81f9eb0 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -221,6 +221,8 @@ on enable-low-power # Set cpuset parameters write /dev/cpuset/background/cpus 0-1 write /dev/cpuset/system-background/cpus 0-3 + write /dev/cpuset/audio-app/cpus 0-3 + write /dev/cpuset/camera-daemon/cpus 0-3 write /dev/cpuset/foreground/boost/cpus 0-3,6-7 write /dev/cpuset/foreground/cpus 0-3,6-7 write /dev/cpuset/top-app/cpus 0-7 From 4f82ef57069b58fe941652a37904224a3baa1d90 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:15:31 +0700 Subject: [PATCH 60/76] tama-common: init: Refine virtual memory - set zram 3gb - remove duplicate swappines Signed-off-by: Sorayukii --- rootdir/etc/fstab.qcom | 2 +- rootdir/etc/init.qcom.power.rc | 3 --- rootdir/etc/init.qcom.rc | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom index abe2117..032a596 100644 --- a/rootdir/etc/fstab.qcom +++ b/rootdir/etc/fstab.qcom @@ -53,4 +53,4 @@ # and fails if it does not find it. /dev/block/bootdevice/by-name/frp /persistent emmc defaults defaults /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults -/dev/block/zram0 none swap defaults zramsize=25% +/dev/block/zram0 none swap defaults zramsize=3221225472 diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index 81f9eb0..545ecad 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -253,9 +253,6 @@ on enable-low-power write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 1 write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1 - write /proc/sys/vm/swappiness 100 - write /proc/sys/vm/watermark_scale_factor 120 - # Enable PowerHAL hint processing setprop vendor.powerhal.init 1 diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 8656e82..3d2ed55 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -62,9 +62,10 @@ on early-init write /sys/devices/platform/soc/soc:fpc1145/uevent add - # change the compression algorithm for zRAM + # zRAM write /sys/block/zram0/comp_algorithm lz4 write /proc/sys/vm/page-cluster 0 + write /proc/sys/vm/swappiness 100 on init # Support legacy paths @@ -97,8 +98,6 @@ on init # Bluetooth address setting setprop ro.vendor.bt.bdaddr_path "/data/vendor/etc/bluetooth_bdaddr" - write /proc/sys/vm/swappiness 100 - on late-init setprop vendor.keyprovd.suntory.prov "false" From 65ea487680b35bc9a8c5b3229409c020429212f7 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Thu, 9 Apr 2026 09:42:12 +0000 Subject: [PATCH 61/76] tama-common: init: Set mmcblk0 io read_ahead to 4096 Signed-off-by: Sorayukii --- rootdir/etc/init.qcom.power.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index 545ecad..c593718 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -260,6 +260,7 @@ on enable-low-power on property:sys.boot_completed=1 trigger enable-low-power + write /sys/block/mmcblk0/queue/read_ahead_kb 4096 write /sys/block/sda/queue/read_ahead_kb 512 write /sys/block/sdb/queue/read_ahead_kb 512 write /sys/block/sdc/queue/read_ahead_kb 512 From a047daaca290247cc21758bf9e5bdbda8b4458c0 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Sun, 12 Apr 2026 15:05:28 +0000 Subject: [PATCH 62/76] tama-common: Tune powerhint Signed-off-by: Sorayukii --- configs/powerhint.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configs/powerhint.json b/configs/powerhint.json index 3f271f7..74cc5ec 100644 --- a/configs/powerhint.json +++ b/configs/powerhint.json @@ -20,7 +20,7 @@ "1420800", "1324800", "1132800", - "576000" + "300000" ], "ResetOnInit": true }, @@ -65,7 +65,8 @@ "Values": [ "520000000", "342000000", - "257000000" + "257000000", + "180000000" ], "ResetOnInit": true }, @@ -452,7 +453,7 @@ "PowerHint": "EXPENSIVE_RENDERING", "Node": "GPUMinFreq", "Duration": 0, - "Value": "520000000" + "Value": "257000000" }, { "PowerHint": "EXPENSIVE_RENDERING", From 0ec70d8c4841824101a0eb5b06d3b5c343ee3663 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Tue, 28 Apr 2026 06:05:01 +0700 Subject: [PATCH 63/76] tama-common: Set color mode to DCI-P3 by default Signed-off-by: Sorayukii --- vendor.prop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor.prop b/vendor.prop index 0650017..ec6f5a2 100644 --- a/vendor.prop +++ b/vendor.prop @@ -126,7 +126,7 @@ ro.hardware.egl=adreno ro.hardware.vulkan=sdm845 ro.opengles.version=196610 persist.demo.hdmirotationlock=false -persist.sys.sf.native_mode=0 +persist.sys.sf.native_mode=2 ro.surface_flinger.enable_frame_rate_override=false ro.surface_flinger.has_wide_color_display=true ro.surface_flinger.has_HDR_display=true From 1773ae277712b0f252b9a1ea7ed8dbb3e444ec67 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Thu, 9 Apr 2026 10:11:37 +0000 Subject: [PATCH 64/76] tama-common: Disable postrender cleanup Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 5053bd4..2c384a9 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -99,6 +99,9 @@ TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs MAX_EGL_CACHE_KEY_SIZE := 12*1024 MAX_EGL_CACHE_SIZE := 2048*1024 +# Disable Postrender Cleanup +TARGET_DISABLE_POSTRENDER_CLEANUP := true + # HIDL DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ $(COMMON_PATH)/framework_compatibility_matrix.xml \ From 55236069805663b0fd54f7b378eafd1366676623 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:33:50 +0700 Subject: [PATCH 65/76] tama-common: Merge ueventd.tama to ueventd.qcom Signed-off-by: Sorayukii --- common.mk | 3 +-- rootdir/Android.bp | 10 ---------- rootdir/etc/ueventd.qcom.rc | 3 +++ rootdir/etc/ueventd.tama.rc | 8 -------- 4 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 rootdir/Android.bp delete mode 100644 rootdir/etc/ueventd.tama.rc diff --git a/common.mk b/common.mk index b46b124..ae31524 100644 --- a/common.mk +++ b/common.mk @@ -188,8 +188,7 @@ PRODUCT_PACKAGES += \ init.target.rc \ qns.fstab \ sensor_json_transfer.sh \ - ueventd.qcom.rc \ - ueventd.tama.rc + ueventd.qcom.rc # Configstore PRODUCT_PACKAGES += \ diff --git a/rootdir/Android.bp b/rootdir/Android.bp deleted file mode 100644 index 9648750..0000000 --- a/rootdir/Android.bp +++ /dev/null @@ -1,10 +0,0 @@ -// -// Copyright (C) 2022 The LineageOS Project -// SPDX-License-Identifier: Apache-2.0 -// -prebuilt_etc { - name: "ueventd.tama.rc", - filename: "ueventd.rc", - src: "etc/ueventd.tama.rc", - device_specific: true, -} diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc index 09a3579..d90477a 100644 --- a/rootdir/etc/ueventd.qcom.rc +++ b/rootdir/etc/ueventd.qcom.rc @@ -239,6 +239,9 @@ firmware_directories /vendor/firmware_mnt/image/ /dev/tsc_mux0 0660 media media /dev/tsc_ci0 0660 media media +# Charger +/sys/class/power_supply/battery charging_enabled 0660 system system + # sensors /dev/sensors 0660 system system /sys/devices/i2c-12/12-* pollrate_ms 0664 system system diff --git a/rootdir/etc/ueventd.tama.rc b/rootdir/etc/ueventd.tama.rc deleted file mode 100644 index 73d5a17..0000000 --- a/rootdir/etc/ueventd.tama.rc +++ /dev/null @@ -1,8 +0,0 @@ -# -# Copyright (C) 2022-2023 The LineageOS Project -# -# SPDX-License-Identifier: Apache-2.0 -# -# Charger -/sys/class/power_supply/battery charging_enabled 0660 system system - From 2dbc727eb86e5d5e4353e5a5d6703d6b7a24331a Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:36:05 +0700 Subject: [PATCH 66/76] tama-common: Set vendor security patch to platform Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 2c384a9..3d55400 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -159,7 +159,7 @@ TARGET_PROVIDES_QTI_TELEPHONY_JAR := true TARGET_USES_PRE_UPLINK_FEATURES_NETMGRD := true # Security patch level -VENDOR_SECURITY_PATCH := 2020-09-01 +VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) # SELinux include device/lineage/sepolicy/libperfmgr/sepolicy.mk From c8f6e7b27460190929c04ff87807ff47df680d78 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:34:57 +0700 Subject: [PATCH 67/76] tama-common: Add quick-tap features Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 3 +++ common.mk | 7 +++++++ configs/quick_tap.xml | 9 +++++++++ 3 files changed, 19 insertions(+) create mode 100644 configs/quick_tap.xml diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 3d55400..655d04d 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -81,6 +81,9 @@ TARGET_USES_QTI_CAMERA_DEVICE := true TARGET_USES_MEDIA_EXTENSIONS := true MALLOC_SVELTE_FOR_LIBC32 := true +# Quick Tap +TARGET_SUPPORTS_QUICK_TAP := true + # Dalvik TARGET_HAS_6GB_RAM ?= false diff --git a/common.mk b/common.mk index ae31524..ebdbb7f 100644 --- a/common.mk +++ b/common.mk @@ -389,6 +389,13 @@ PRODUCT_PACKAGES += \ android.hardware.sensors@2.0.vendor \ libsensorndkbridge +# Quick Tap +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/quick_tap.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/quick_tap.xml + +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + persist.columbus.use_ap_sensor=false + # Soong namespaces PRODUCT_SOONG_NAMESPACES += \ $(LOCAL_PATH) \ diff --git a/configs/quick_tap.xml b/configs/quick_tap.xml new file mode 100644 index 0000000..445f43a --- /dev/null +++ b/configs/quick_tap.xml @@ -0,0 +1,9 @@ + + + + + + + From a076b2e376abfdba6ed2fe43d8d375b8ca70f9a1 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 19 Nov 2025 22:36:41 +0700 Subject: [PATCH 68/76] tama-common: Resize system partition Because docomo have different system partition size Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 655d04d..db980f4 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -122,7 +122,7 @@ TARGET_USES_ION := true # Partitions BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000 BOARD_DTBOIMG_PARTITION_SIZE := 8388608 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4227858432 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3825205248 BOARD_VENDORIMAGE_PARTITION_SIZE := 1056714752 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_VENDORIMAGE_JOURNAL_SIZE := 0 From 0d84bb000e44cbf171f1c48cd0277d75effbf77d Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Sat, 20 Dec 2025 16:58:40 +0000 Subject: [PATCH 69/76] tama-common: Rename xz2c to apollo Signed-off-by: Sorayukii --- Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index 7263491..c3949d1 100644 --- a/Android.mk +++ b/Android.mk @@ -6,7 +6,7 @@ LOCAL_PATH := $(call my-dir) -ifneq ($(filter akari xz2c akatsuki aurora,$(TARGET_DEVICE)),) +ifneq ($(filter akari apollo akatsuki aurora,$(TARGET_DEVICE)),) include $(call all-makefiles-under,$(LOCAL_PATH)) include $(CLEAR_VARS) From 32bc4a66d777564c29fa0ca67be98dbcacdf2679 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Wed, 1 Apr 2026 22:49:23 +0700 Subject: [PATCH 70/76] tama-common: Switch to AOSP WFD Signed-off-by: Sorayukii --- common.mk | 10 --- configs/qti_whitelist.xml | 3 - extract-files.py | 9 --- manifest.xml | 10 --- .../base/core/res/res/values/config.xml | 12 ---- .../system_ext-privapp-permissions-qti.xml | 4 -- proprietary-files.txt | 72 ------------------- 7 files changed, 120 deletions(-) diff --git a/common.mk b/common.mk index ebdbb7f..b5f64ba 100644 --- a/common.mk +++ b/common.mk @@ -461,16 +461,6 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \ $(LOCAL_PATH)/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini -# WiFi Display -PRODUCT_PACKAGES += \ - libnl \ - libpng.vendor \ - libprocessgroup.vendor \ - libwfdaac_vendor \ - libavservices_minijail \ - libavservices_minijail_vendor \ - libavservices_minijail.vendor - PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.surface_flinger.force_hwc_copy_for_virtual_displays=true \ ro.surface_flinger.max_virtual_display_dimension=4096 diff --git a/configs/qti_whitelist.xml b/configs/qti_whitelist.xml index c97fda8..734f829 100644 --- a/configs/qti_whitelist.xml +++ b/configs/qti_whitelist.xml @@ -64,7 +64,4 @@ - - - diff --git a/extract-files.py b/extract-files.py index 4059078..4c482dc 100755 --- a/extract-files.py +++ b/extract-files.py @@ -60,8 +60,6 @@ lib_fixups: lib_fixups_user_type = { } blob_fixups: blob_fixups_user_type = { - 'system_ext/bin/wfdservice': blob_fixup() - .add_needed('libwfdservice_shim.so'), ( 'system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml', 'system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml', @@ -70,15 +68,8 @@ blob_fixups: blob_fixups_user_type = { 'system_ext/etc/permissions/telephonyservice.xml' ): blob_fixup() .regex_replace('/product/framework/', '/system_ext/framework/'), - 'system_ext/lib/libwfdmmsrc_system.so': blob_fixup() - .add_needed('libgui_shim.so'), - 'system_ext/lib/libwfdservice.so': blob_fixup() - .replace_needed('android.media.audio.common.types-V2-cpp.so', 'android.media.audio.common.types-V4-cpp.so'), ('system_ext/lib/lib-imsvideocodec.so', 'system_ext/lib64/lib-imsvideocodec.so'): blob_fixup() .add_needed('libgui_shim.so'), - 'system_ext/lib64/libwfdnative.so': blob_fixup() - .add_needed('libbinder_shim.so') - .add_needed('libinput_shim.so'), 'vendor/bin/hw/android.hardware.drm@1.1-service.widevine': blob_fixup() .replace_needed('libhidltransport.so', 'libhidlbase.so') .remove_needed('libhwbinder.so'), diff --git a/manifest.xml b/manifest.xml index 378d87f..d678ad4 100644 --- a/manifest.xml +++ b/manifest.xml @@ -61,8 +61,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. hwbinder @1.1::ICryptoFactory/widevine @1.1::IDrmFactory/widevine - @1.3::ICryptoFactory/wfdhdcp - @1.3::IDrmFactory/wfdhdcp android.hardware.gatekeeper @@ -312,14 +310,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. hwbinder @1.0::IWifiStats/wifiStats - - vendor.qti.hardware.wifidisplaysession - hwbinder - @1.0::IWifiDisplaySession/wifidisplaysession - @1.0::IWifiDisplaySessionAudioTrack/wifidisplaysessionaudiotrack - @1.0::IWifiDisplaySessionImageTrack/wifidisplaysessionimagetrack - @1.0::IWifiDisplaySessionVideoTrack/wifidisplaysessionvideotrack - vendor.qti.ims.callinfo hwbinder diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 8c65ff4..44be35e 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -87,18 +87,6 @@ --> true - - true - true diff --git a/permissions/system_ext-privapp-permissions-qti.xml b/permissions/system_ext-privapp-permissions-qti.xml index 7597c7d..7833f3e 100644 --- a/permissions/system_ext-privapp-permissions-qti.xml +++ b/permissions/system_ext-privapp-permissions-qti.xml @@ -38,10 +38,6 @@ It allows additional grants on top of privapp-permissions-platform.xml - - - - diff --git a/proprietary-files.txt b/proprietary-files.txt index dc07450..ef1242e 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1410,87 +1410,15 @@ vendor/bin/cnss-daemon vendor/bin/cnss_diag # WiFi Display (system) - from lemonadep - UKQ1.230924.001 -system/framework/WfdCommon.jar;BOOT_JAR|a661c494d064b79a3f71579592411fada1ea232f -system_ext/bin/wfdservice|400d123df78c1ed2e9643ff3ddf5ee5748f954fe|8a0be1b9478adf4b44a1ba34f045b1871f64ac5c -system_ext/etc/init/wfdservice.rc|907def8565d8f91f531ca7dfad880af05d540b0c -system_ext/etc/seccomp_policy/wfdservice.policy|5b3592c965f16b2d55ac89d56d8d3c49a6b5800b -system_ext/etc/wfdconfigsink.xml|cb78df66948314a75080a4161321fb3111a0785a -system_ext/lib/com.qualcomm.qti.wifidisplayhal@1.0.so|cb88bc73bf9f44d7da000a41d38b309ffdf71370 system_ext/lib/libmmosal.so|e806f8040b4e59c6e08e437734a2176090a94ae3 system_ext/lib/libmmparser_lite.so|61bbc90e3a26a64007eb9b0871b43cce72ee6b7e -system_ext/lib/libmmrtpdecoder.so|4fc76315f11ff5fe416f36b66c9422ef05eae182 -system_ext/lib/libmmrtpencoder.so|0fa2096eec29eec395f6bd88d7d1049a127e090c -system_ext/lib/libwfdavenhancements.so|581db496334d2adb76e6c6af67620f49ca24eabd -system_ext/lib/libwfdclient.so|a9639d9f269880700bac6fc06e8302702fb0ab32 -system_ext/lib/libwfdcommonutils.so|b738182e77f3e7faf72460f09ebdfca7de5e0c23 -system_ext/lib/libwfdconfigutils.so|a52a96e2699f3a5ad79838e356cd90838e26218b -system_ext/lib/libwfddisplayconfig.so|f46fe63fb3d58c143dc92741a962167af3d8b928 -system_ext/lib/libwfdmminterface.so|5844114d7cc823090a70fe4f44cbda0ddf585ebd -system_ext/lib/libwfdmmsink.so|23fb5c836fc06865b229c30b46998e41c0624dac -system_ext/lib/libwfdmmsrc_system.so|0adfc69a5560158f3a6803ba720acc795d6d05dc|f4395e4a22bed41fdbe86c988caba7d46cf0c8bf -system_ext/lib/libwfdrtsp.so|afd69963c2bd59bdb3ff23e01710c61ed90c5d87 -system_ext/lib/libwfdservice.so|07e6d0e00393a8c068f75b46531d2e75fdaebde2|679e2cb2b25374a57dfd860286da96abeee04f36 -system_ext/lib/libwfdsinksm.so|875171cc6ae534dd941eec1c87b78d5961e19c06 -system_ext/lib/libwfduibcinterface.so|e90fa4920b010bd6ef2bd78c2d2644cbd0fcbffa -system_ext/lib/libwfduibcsink.so|91af548471c395a958e6155dd9be19cccbe482d3 -system_ext/lib/libwfduibcsinkinterface.so|bc0e7dca28d1e5cbc6caf5bd5378f3e6db3b460c -system_ext/lib/libwfduibcsrc.so|a0b1c73015c449468db0d2776fdfcc56dfeee53b -system_ext/lib/libwfduibcsrcinterface.so|2e24ec6a075407664488b4214eef35cb2ca845f4 -system_ext/lib/vendor.qti.hardware.wifidisplaysession@1.0.so|45a0a8cd9f1aa5cbe69b113192d42bc42e32e9c3 system_ext/lib64/libmmosal.so|8488b27e6a9cda05c68181e8bf20afa7ba345222 system_ext/lib64/libmmparser_lite.so|59d550a52773722f1fe515bd5fba86918cf6f54e -system_ext/lib64/libmmrtpdecoder.so|0da526d51135ea58236ab6bcc2d1b7484931df24 -system_ext/lib64/libmmrtpencoder.so|fafe00d1ed3d691c6d2c2d963144218764cad5ae -system_ext/lib64/libwfdclient.so|0070b1e88cee6ebaf17dcb02c2706232cc087071 -system_ext/lib64/libwfdcommonutils.so|14b3bd86703f2aca0abb1232d2304e626c1af644 -system_ext/lib64/libwfdconfigutils.so|6f1a3a862ddde4245ea58ad310101df620d3a00b -system_ext/lib64/libwfddisplayconfig.so|5fd7bf7abaedfe890442f88183c49755b25c39aa -system_ext/lib64/libwfdmminterface.so|3f16acefbe87741a5841c1c70cf74ff917299c4c -system_ext/lib64/libwfdmmsink.so|8150b750357b606475521b491f78d566673f9888 -system_ext/lib64/libwfdnative.so;SYMLINK=system_ext/priv-app/WfdService/lib/arm64/libwfdnative.so|92ec61d464c07d9e9020cf413489cdc01fb19abc|3112f3492eb52db39ca1d091d9d25f64d625e670 -system_ext/lib64/libwfdrtsp.so|8181e44d7c1f722218fabd8fe3bf788454a3f586 -system_ext/lib64/libwfdsinksm.so|c4d68ecbe0accd24296c18444e5a82b6a24be8d8 -system_ext/lib64/libwfduibcinterface.so|dca32fe063bdba7ce3b131b16cf112b793ae03ad -system_ext/lib64/libwfduibcsink.so|63ea93b1a6aec75a294baf50007270807a819e21 -system_ext/lib64/libwfduibcsinkinterface.so|39c123bd9a4d7a8fa317f8ed4d86972dcfab0423 -system_ext/lib64/libwfduibcsrc.so|5557f3bd58c37b7e3b28e13f2f86d55930b14ab6 -system_ext/lib64/libwfduibcsrcinterface.so|77cead9bf7b60384fe1e11dc2b25bd99af0b4608 -system_ext/priv-app/WfdService/WfdService.apk|7191da7d336f6018ee292af4e69167677b9f5bd1 # WiFi Display (vendor) - from PNX - RKQ1.200906.002 -vendor/bin/wfdhdcphalservice|c7a2d70190d8a90a8ed326af0add5cf7c99d1ab6 -vendor/bin/wifidisplayhalservice|414bb43e7f93d67d62ee7111ced4e55e065f6d8c -vendor/etc/init/android.hardware.drm@1.1-service.wfdhdcp.rc|c266f08783a17f6583e3f22c85e55b0c200442ea -vendor/etc/init/com.qualcomm.qti.wifidisplayhal@1.0-service.rc|576ce4393b7746b77a230745aa9e9ee3bd31b17d -vendor/etc/seccomp_policy/wfdhdcphalservice.policy|a489ab323be4be2df3de9f84a6b5e6cef924f4c4 -vendor/etc/seccomp_policy/wfdvndservice.policy|b46f0c22a1f9b65c6750205e161c0a3f84ac716b -vendor/etc/seccomp_policy/wifidisplayhalservice.policy|f113f27e0e301a18baf0ade08c23071a27c7dc52 vendor/lib/libFileMux_proprietary.so|e59edd4604a7c73147118161cab5b7ac6bb16c82 vendor/lib/libmmosal.so|57185feced72009af2df1b09117702c9fae7182b;MODULE_SUFFIX=_vendor -vendor/lib/libmmrtpdecoder_proprietary.so|9232f505ea8f0c1e9f81a049c583fba32a450d73 -vendor/lib/libmmrtpencoder_proprietary.so|d8386b78c976d94867455c67dd10d63e8a343363 -vendor/lib/libwfdcodecv4l2_proprietary.so|70a2900804160bc53bb19c11e81278ffde0c5fee vendor/lib/libwfdcommonutils_proprietary.so|12990e068e9ecb8d435bbb1370083ee6ca2fe63d -vendor/lib/libwfdconfigutils_proprietary.so|1844d3b80f3a86605d566597bda285448be360c7 vendor/lib/libwfddisplayconfig_proprietary.so|fd73dda05415d2316eb46fb97635939a03107815 -vendor/lib/libwfdhdcpcp.so|7f0aefaf7efe250aff192b4b309be08b8e799d0d -vendor/lib/libwfdhdcpservice_proprietary.so|80f7b95d883aafbdd66b2d72ea76ed2a9a8c21f4 -vendor/lib/libwfdmminterface_proprietary.so|3eb3455633d5814a5d7cddb0d95f9d45b7c05db2 vendor/lib/libwfdmmservice_proprietary.so|d98b728661708e1c63819b42bb4d9a01fa94ec6b -vendor/lib/libwfdmmsrc_proprietary.so|2bbb574ed51e21a1eb70381cbf26558732fe3cec -vendor/lib/libwfdmodulehdcpsession.so|957fc3335cd7f77b84206c0c90290f7b7f196f0e -vendor/lib/libwfdrtsp_proprietary.so|13fed10a23969322562e2b88335738e7cace69a7 -vendor/lib/libwfdsessionmodule.so|e5a6989cdaabcf5481ee529e6fd48b623479e88d -vendor/lib/libwfdsourcesession_proprietary.so|0732b86ffa78050b9b8a0ceaf50457734955eeae -vendor/lib/libwfdsourcesm_proprietary.so|27c3f75f5b764175e8bd9721578164836c6f4dfb -vendor/lib/libwfduibcinterface_proprietary.so|a722647a44d89d4aed1d89110b5c141069229759 -vendor/lib/libwfduibcsink_proprietary.so|1fca8e9556d209377c1860b4d829bb71450cfce0 -vendor/lib/libwfduibcsinkinterface_proprietary.so|64b802f12ffb30418a072d0ebf3c262a34c82e38 -vendor/lib/libwfduibcsrc_proprietary.so|b78df6ab7acb850f2adb875ccecb1a3c3539f4d2 -vendor/lib/libwfduibcsrcinterface_proprietary.so|91837ba6b6692e1d553ece3aa4469dd64f164a04 vendor/lib/libwfdutils_proprietary.so|cae4c266704da4ce15b59c13f57ccf8f1391b699 -vendor/lib/vendor.qti.hardware.wifidisplaysession@1.0.so|fdba1b3c11ace4b0415be4e5944cdb288cd35f58;MODULE_SUFFIX=_vendor -vendor/lib/vendor.qti.hardware.wifidisplaysessionl@1.0-halimpl.so|044c6cfd4bc603e4aa372ab1a3d287a8d8e5fc48 - -# WiFi Display (vendor) - from lemonadep - TP1A.220624.003 -vendor/etc/wfdconfig.xml|4f863ac9a71bafff8afc14e8fab26af979bbb1d6 From 965e29e75314e6f0c5540b9cd20f77d732a52896 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Sun, 3 May 2026 11:09:30 +0700 Subject: [PATCH 71/76] tama-common: Switch to Jemalloc Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 5 ++++- common.mk | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index db980f4..5656072 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -79,7 +79,10 @@ BOARD_HAVE_BLUETOOTH_QCOM := true USE_DEVICE_SPECIFIC_CAMERA := true TARGET_USES_QTI_CAMERA_DEVICE := true TARGET_USES_MEDIA_EXTENSIONS := true -MALLOC_SVELTE_FOR_LIBC32 := true + +# Jemalloc +MALLOC_SVELTE := true +MALLOC_LOW_MEMORY := true # Quick Tap TARGET_SUPPORTS_QUICK_TAP := true diff --git a/common.mk b/common.mk index b5f64ba..5a22d7e 100644 --- a/common.mk +++ b/common.mk @@ -20,6 +20,10 @@ endif PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := true +# Disable Scudo +PRODUCT_USE_SCUDO := false +PRODUCT_DISABLE_SCUDO := true + # Overlays DEVICE_PACKAGE_OVERLAYS += \ $(LOCAL_PATH)/overlay \ From ded2ece071a3396a0844f37562e480a3225c1a55 Mon Sep 17 00:00:00 2001 From: Sorayukii Date: Mon, 27 Apr 2026 21:51:29 +0700 Subject: [PATCH 72/76] tama-common: Disable UFFD GC Signed-off-by: Sorayukii --- common.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common.mk b/common.mk index 5a22d7e..b7804bf 100644 --- a/common.mk +++ b/common.mk @@ -24,6 +24,10 @@ PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := true PRODUCT_USE_SCUDO := false PRODUCT_DISABLE_SCUDO := true +# Disable UFFD GC +OVERRIDE_ENABLE_UFFD_GC := false +PRODUCT_ENABLE_UFFD_GC := false + # Overlays DEVICE_PACKAGE_OVERLAYS += \ $(LOCAL_PATH)/overlay \ From 95dfd25a4e012cec39e7250496195085aa0a9408 Mon Sep 17 00:00:00 2001 From: Yumi Yukimura Date: Sat, 27 Dec 2025 01:11:13 +0800 Subject: [PATCH 73/76] tama-common: Prepend soong ns to lib_driver_cmd_qcwcn Change-Id: I09bfb412e3554d349c4ad123c83d46a7933611d5 Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 5656072..ebdb702 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -185,9 +185,9 @@ BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 # WiFi BOARD_WLAN_DEVICE := qcwcn BOARD_HOSTAPD_DRIVER := NL80211 -BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) +BOARD_HOSTAPD_PRIVATE_LIB := //hardware/qcom-caf/wlan/qcwcn:lib_driver_cmd_$(BOARD_WLAN_DEVICE) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 -BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := //hardware/qcom-caf/wlan/qcwcn:lib_driver_cmd_$(BOARD_WLAN_DEVICE) WIFI_DRIVER_DEFAULT := qca_cld3 WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" WIFI_DRIVER_STATE_OFF := "OFF" From da01bacf6538ef423a740e2dbfa62ab97f47be8d Mon Sep 17 00:00:00 2001 From: Yumi Yukimura Date: Wed, 28 Jan 2026 13:02:43 +0800 Subject: [PATCH 74/76] tama-common: Update some soong config variables to bool type Change-Id: Ice4a8e2cc6d756a743116b46299cf833a0e78c57 Signed-off-by: Sorayukii --- common.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common.mk b/common.mk index b7804bf..78b2339 100644 --- a/common.mk +++ b/common.mk @@ -161,7 +161,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES_DEBUG += \ bootctl -$(call soong_config_set,QTI_GPT_UTILS,USE_BSG_FRAMEWORK,false) +$(call soong_config_set_bool,QTI_GPT_UTILS,USE_BSG_FRAMEWORK,false) # Camera PRODUCT_PACKAGES += \ @@ -246,7 +246,7 @@ PRODUCT_PACKAGES += \ android.hardware.gnss@2.0.vendor # Graphics -$(call soong_config_set,EGL,USE_DISPLAY_ARRAY,true) +$(call soong_config_set_bool,EGL,USE_DISPLAY_ARRAY,true) # Health PRODUCT_PACKAGES += \ @@ -282,7 +282,7 @@ PRODUCT_PACKAGES += \ # LiveDisplay PRODUCT_PACKAGES += \ vendor.lineage.livedisplay-service.sdm -$(call soong_config_set,livedisplay_sdm,enable_dm,false) +$(call soong_config_set_bool,livedisplay_sdm,enable_dm,false) # Lights PRODUCT_PACKAGES += \ From c8d6a369cc08aabaccd2f4e6019b9e4535dfb8db Mon Sep 17 00:00:00 2001 From: Yumi Yukimura Date: Fri, 26 Dec 2025 18:48:06 +0800 Subject: [PATCH 75/76] tama-common: Remove vendor/lineage device framework matrix inclusion See: I78da6340f38b93fdc4c3694cb8f431f387d16c0d Change-Id: I0b9f527de50ca02082be9b92375559f4893b2688 https://github.com/Mi-Thorium/android_device_xiaomi_mithorium-common/commit/5013bd01031b8d8936f763beba6fe7672c73f782 Signed-off-by: Sorayukii --- BoardConfigCommon.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index ebdb702..8db4728 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -111,8 +111,7 @@ TARGET_DISABLE_POSTRENDER_CLEANUP := true # HIDL DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ $(COMMON_PATH)/framework_compatibility_matrix.xml \ - hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ - vendor/lineage/config/device_framework_matrix.xml + hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml From 63cfbf969ee79e4e64e68c01129ab6081ec73b46 Mon Sep 17 00:00:00 2001 From: Danny Trunk Date: Mon, 7 Jul 2025 07:53:18 +0200 Subject: [PATCH 76/76] tama-common: Move to touch AIDL Change-Id: Ic31d3c29a31ece625de67db57de2b8a246b4c7a1 Signed-off-by: Sorayukii --- common.mk | 2 +- sepolicy/vendor/file_contexts | 2 +- touch/Android.bp | 17 ++++---- touch/GloveMode.cpp | 42 +++++++++++-------- touch/GloveMode.h | 19 ++++----- touch/service.cpp | 35 +++++++--------- touch/vendor.lineage.touch-service.tama.rc | 4 ++ touch/vendor.lineage.touch-service.tama.xml | 7 ++++ .../vendor.lineage.touch@1.0-service.tama.rc | 10 ----- .../vendor.lineage.touch@1.0-service.tama.xml | 11 ----- 10 files changed, 68 insertions(+), 81 deletions(-) create mode 100644 touch/vendor.lineage.touch-service.tama.rc create mode 100644 touch/vendor.lineage.touch-service.tama.xml delete mode 100644 touch/vendor.lineage.touch@1.0-service.tama.rc delete mode 100644 touch/vendor.lineage.touch@1.0-service.tama.xml diff --git a/common.mk b/common.mk index 78b2339..551f80f 100644 --- a/common.mk +++ b/common.mk @@ -431,7 +431,7 @@ PRODUCT_PACKAGES += \ # Touch PRODUCT_PACKAGES += \ - vendor.lineage.touch@1.0-service.tama + vendor.lineage.touch-service.tama # USB PRODUCT_PACKAGES += \ diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 1c148f6..d2d1f08 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -88,7 +88,7 @@ # Vendor HALs /(vendor|system/vendor)/bin/hw/fpc_fingerprint@2\.1_HIDL-service u:object_r:hal_fingerprint_default_exec:s0 -/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.tama u:object_r:hal_lineage_touch_default_exec:s0 +/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch-service\.tama u:object_r:hal_lineage_touch_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.semc\.hardware\.secd@1\.0-service u:object_r:hal_secd_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.semc\.system\.idd@1\.0-service u:object_r:hal_idd_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.somc\.hardware\.camera\.provider@1\.0-service u:object_r:hal_camera_default_exec:s0 diff --git a/touch/Android.bp b/touch/Android.bp index 12318cf..b01844b 100644 --- a/touch/Android.bp +++ b/touch/Android.bp @@ -1,13 +1,13 @@ // -// Copyright (C) 2021 The LineageOS Project +// SPDX-FileCopyrightText: 2025 The LineageOS Project // SPDX-License-Identifier: Apache-2.0 // cc_binary { - name: "vendor.lineage.touch@1.0-service.tama", - init_rc: ["vendor.lineage.touch@1.0-service.tama.rc"], - vintf_fragments: ["vendor.lineage.touch@1.0-service.tama.xml"], - defaults: ["hidl_defaults"], + name: "vendor.lineage.touch-service.tama", + init_rc: ["vendor.lineage.touch-service.tama.rc"], + vintf_fragments: ["vendor.lineage.touch-service.tama.xml"], + vendor: true, relative_install_path: "hw", srcs: [ "GloveMode.cpp", @@ -15,10 +15,9 @@ cc_binary { ], shared_libs: [ "libbase", - "libbinder", - "libhidlbase", + "liblog", + "libbinder_ndk", "libutils", - "vendor.lineage.touch@1.0", + "vendor.lineage.touch-V1-ndk", ], - vendor: true, } diff --git a/touch/GloveMode.cpp b/touch/GloveMode.cpp index 63e3ef4..5799adc 100644 --- a/touch/GloveMode.cpp +++ b/touch/GloveMode.cpp @@ -1,43 +1,51 @@ /* - * Copyright (C) 2021-2022 The LineageOS Project + * SPDX-FileCopyrightText: 2025 The LineageOS Project * SPDX-License-Identifier: Apache-2.0 */ -#define LOG_TAG "GloveModeService" - #include "GloveMode.h" -#include -#include #include -namespace vendor { -namespace lineage { -namespace touch { -namespace V1_0 { -namespace implementation { +namespace { const std::string kGloveModePath = "/sys/devices/common_touch/touch/glove_mode"; -Return GloveMode::isEnabled() { +} // anonymous namespace + +namespace aidl { +namespace vendor { +namespace lineage { +namespace touch { + +ndk::ScopedAStatus GloveMode::getEnabled(bool* _aidl_return) { std::ifstream file(kGloveModePath); + + if (file.fail()) { + return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); + } + bool enabled; file >> enabled; - return enabled; + *_aidl_return = enabled; + return ndk::ScopedAStatus::ok(); } -Return GloveMode::setEnabled(bool enabled) { +ndk::ScopedAStatus GloveMode::setEnabled(bool enable) { std::ofstream file(kGloveModePath); - file << enabled << std::flush; + if (file.fail()) { + return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); + } - return !file.fail(); + file << enable << std::flush; + + return ndk::ScopedAStatus::ok(); } -} // namespace implementation -} // namespace V1_0 } // namespace touch } // namespace lineage } // namespace vendor +} // namespace aidl diff --git a/touch/GloveMode.h b/touch/GloveMode.h index 0475688..04c7fa0 100644 --- a/touch/GloveMode.h +++ b/touch/GloveMode.h @@ -1,29 +1,24 @@ /* - * Copyright (C) 2021 The LineageOS Project + * SPDX-FileCopyrightText: 2025 The LineageOS Project * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include +#include +namespace aidl { namespace vendor { namespace lineage { namespace touch { -namespace V1_0 { -namespace implementation { -using ::android::hardware::Return; - -class GloveMode : public IGloveMode { +class GloveMode : public BnGloveMode { public: - // Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow. - Return isEnabled() override; - Return setEnabled(bool enabled) override; + ndk::ScopedAStatus getEnabled(bool* _aidl_return) override; + ndk::ScopedAStatus setEnabled(bool enabled) override; }; -} // namespace implementation -} // namespace V1_0 } // namespace touch } // namespace lineage } // namespace vendor +} // namespace aidl diff --git a/touch/service.cpp b/touch/service.cpp index 0b443a2..96263e0 100644 --- a/touch/service.cpp +++ b/touch/service.cpp @@ -1,32 +1,27 @@ /* - * Copyright (C) 2021 The LineageOS Project + * SPDX-FileCopyrightText: 2025 The LineageOS Project * SPDX-License-Identifier: Apache-2.0 */ -#define LOG_TAG "vendor.lineage.touch@1.0-service.tama" - -#include -#include +#define LOG_TAG "vendor.lineage.touch-service.tama" #include "GloveMode.h" -using ::vendor::lineage::touch::V1_0::IGloveMode; -using ::vendor::lineage::touch::V1_0::implementation::GloveMode; +#include +#include +#include + +using aidl::vendor::lineage::touch::GloveMode; int main() { - android::sp gloveMode = new GloveMode(); + ABinderProcess_setThreadPoolMaxThreadCount(0); + std::shared_ptr glovemode = ndk::SharedRefBase::make(); - android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/); + const std::string instance = std::string(GloveMode::descriptor) + "/default"; + binder_status_t status = + AServiceManager_addService(glovemode->asBinder().get(), instance.c_str()); + CHECK_EQ(status, STATUS_OK) << "Failed to add service " << instance << " " << status; - if (gloveMode->registerAsService() != android::OK) { - LOG(ERROR) << "Cannot register touchscreen glove HAL service."; - return 1; - } - - LOG(INFO) << "Touchscreen HAL service ready."; - - android::hardware::joinRpcThreadpool(); - - LOG(ERROR) << "Touchscreen HAL service failed to join thread pool."; - return 1; + ABinderProcess_joinThreadPool(); + return EXIT_FAILURE; // should not reach } diff --git a/touch/vendor.lineage.touch-service.tama.rc b/touch/vendor.lineage.touch-service.tama.rc new file mode 100644 index 0000000..d66a927 --- /dev/null +++ b/touch/vendor.lineage.touch-service.tama.rc @@ -0,0 +1,4 @@ +service vendor.touch-hal /vendor/bin/hw/vendor.lineage.touch-service.tama + class hal + user system + group system diff --git a/touch/vendor.lineage.touch-service.tama.xml b/touch/vendor.lineage.touch-service.tama.xml new file mode 100644 index 0000000..45c175f --- /dev/null +++ b/touch/vendor.lineage.touch-service.tama.xml @@ -0,0 +1,7 @@ + + + vendor.lineage.touch + 1 + IGloveMode/default + + diff --git a/touch/vendor.lineage.touch@1.0-service.tama.rc b/touch/vendor.lineage.touch@1.0-service.tama.rc deleted file mode 100644 index 1960b88..0000000 --- a/touch/vendor.lineage.touch@1.0-service.tama.rc +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2021-2022 The LineageOS Project -# -# SPDX-License-Identifier: Apache-2.0 -# - -service vendor.touch-hal-1-0 /vendor/bin/hw/vendor.lineage.touch@1.0-service.tama - class hal - user system - group system diff --git a/touch/vendor.lineage.touch@1.0-service.tama.xml b/touch/vendor.lineage.touch@1.0-service.tama.xml deleted file mode 100644 index 0b0f2a8..0000000 --- a/touch/vendor.lineage.touch@1.0-service.tama.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - vendor.lineage.touch - hwbinder - 1.0 - - IGloveMode - default - - -