Compare commits

...

10 Commits

Author SHA1 Message Date
chaptsand
1676adbf85 sm8550-common: Move to Samsung health AIDL
Change-Id: I7ebd8fe18fdb288042ad87c29e48cbe6ce4e989c
2025-07-15 21:31:25 -03:00
Machad3x
79d2c1287f sm8550-common: sepolicy: Fix offline charging 2025-07-15 21:30:46 -03:00
chandu078
781ddd5405 sm8550-common: Pass platform info to kernel modules
Add TARGET_BOARD_PLATFORM to build flags for proper functionality of:
- Audio/BT/Camera/Graphics/Video/WLAN modules

Allows modules to adapt to platform-specific requirements.

Change-Id: Ib3b92c928c159e6a5ea2e77b8453438782e358ff
Signed-off-by: chandu078 <chandudyavanapelli03@gmail.com>
2025-07-15 21:30:46 -03:00
Machad3x
8d912d2156 sm8550-common: sepolicy: Allow system_server to write to audioserver_tmpfs
This keep spamming.

W CachedAppOptimi: type=1400 audit(0.0:4729): avc:  denied  { write } for  dev="tmpfs" ino=12550 scontext=u:r:system_server:s0 tcontext=u:object_r:audioserver_tmpfs:s0 tclass=file permissive=0
2025-07-15 21:30:46 -03:00
romgharti
9d80421aab sm8550-common: sepolicy: window_service denial
E SELinux : avc:  denied  { find } for pid=5550 uid=10266 name=window scontext=u:r:untrusted_app_30:s0:c10,c257,c512,c768 tcontext=u:object_r:window_service:s0 tclass=service_manager permissive=0
2025-07-15 21:30:46 -03:00
Machad3x
74cf97bdb2 sm8550-common: Define missing HALs in FCM
The following HALs in device manifest are not declared in FCM <= level 7:
  android.hardware.biometrics.fingerprint.IFingerprint/default (@4)
  android.hardware.bluetooth.audio.IBluetoothAudioProviderFactory/default (@4)
  android.hardware.power.IPower/default (@5)
  android.hardware.sensors.ISensors/default (@2)
  android.hardware.usb.gadget.IUsbGadget/default (@1)
  android.hardware.wifi.IWifi/default (@2)
  android.hardware.wifi.hostapd.IHostapd/default (@2)
  android.hardware.wifi.supplicant.ISupplicant/default (@3)
COMPATIBLE
2025-07-15 21:30:46 -03:00
Adithya R
41bb446a75 sm8550-common: sepolicy: Allow system_server to write to tmpfs and zygote tmpfs
This denial is hit frequently on some device(s):

W CachedAppOptimi: type=1400 audit(0.0:146): avc: denied { write } for dev="tmpfs" ino=3073 scontext=u:r:system_server:s0 tcontext=u:object_r:zygote_tmpfs:s0 tclass=file permissive=0

W CachedAppOptimi: type=1400 audit(0.0:7910): avc:  denied  { write } for  dev="tmpfs" ino=1108 scontext=u:r:system_server:s0 tcontext=u:object_r:tmpfs:s0 tclass=file permissive=0

Change-Id: I6a08aa2c042f2d10fdeeefcd1f5f65ac844adf11
2025-07-15 21:30:46 -03:00
Machad3x
50972758d9 sm8550-common: Address some binder call denials to system_app
W com.android.settings: type=1400 audit(0.0:4743): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:hal_fingerprint_default:s0 tclass=binder permissive=0
W com.android.settings: type=1400 audit(0.0:4744): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:hal_audio_default:s0 tclass=binder permissive=0
W com.android.settings: type=1400 audit(0.0:4745): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:hal_camera_default:s0 tclass=binder permissive=0
W com.android.settings: type=1400 audit(0.0:4746): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:vendor_hal_gnss_qti:s0 tclass=binder permissive=0
W com.android.settings: type=1400 audit(0.0:4747): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:hal_health_default:s0 tclass=binder permissive=0
W com.android.settings: type=1400 audit(0.0:4748): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=0
W com.android.settings: type=1400 audit(0.0:4749): avc:  denied  { call } for  comm=4173796E635461736B20233130 scontext=u:r:system_app:s0 tcontext=u:r:hal_power_default:s0 tclass=binder permissive=0
2025-07-15 21:30:46 -03:00
Bruno Martins
04419dcc81 sm8550-common: init: Override QTI audio rpc daemon service definition
The rpc daemon doesn't support loading ADSP libs from odm partition,
therefore locally set environment variable ADSP_LIBRARY_PATH to allow
that to happen, just like stock does.

Just as a sidenote, during early bringup phase the quick workaround
was to move the relevant blobs from odm to vendor, but then ditched
in favor of copying the stock script. Now, instead of copying it,
simply override the service definition and avoid one duplicate copy
rule.

Change-Id: Ic78536afda4f86ea589e57adf496b4db8256aea1
2025-07-15 21:30:46 -03:00
AdarshGrewal
9305a597e2 sm8550-common: Sync vsync work duration with gs201
Change-Id: I2afe6670b5826500d0036a31e5161032507313a4
2025-07-15 21:30:46 -03:00
16 changed files with 107 additions and 8 deletions

View File

@@ -123,6 +123,7 @@ BOARD_ROOT_EXTRA_FOLDERS := \
# Platform
BOARD_USES_QCOM_HARDWARE := true
TARGET_BOARD_PLATFORM := kalama
TARGET_KERNEL_ADDITIONAL_FLAGS += TARGET_BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
# Properties
TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop

View File

@@ -155,8 +155,8 @@ PRODUCT_COPY_FILES += \
# Health
PRODUCT_PACKAGES += \
android.hardware.health-service.qti \
android.hardware.health-service.qti_recovery
android.hardware.health-service.samsung \
android.hardware.health-service.samsung-recovery
# Hotword enrollment
PRODUCT_COPY_FILES += \

View File

@@ -199,3 +199,10 @@ service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
ioprio rt 4
task_profiles ProcessCapacityHigh HighPerformance
onrestart restart audioserver
service vendor.audioadsprpcd_audiopd /vendor/bin/audioadsprpcd audiopd
override
class main
user media
group media
setenv ADSP_LIBRARY_PATH ";/system/lib/rfsa/adsp;/system/vendor/lib/rfsa/adsp;/dsp;/vendor/dsp;/odm/lib/rfsa/adsp;/vendor/lib/rfsa/adsp"

View File

@@ -0,0 +1,4 @@
# CachedAppOptimizer
allow system_server audioserver_tmpfs:file rw_file_perms;
allow system_server zygote_tmpfs:file rw_file_perms;
allow system_server tmpfs:file rw_file_perms;

View File

@@ -0,0 +1 @@
allow untrusted_app window_service:service_manager { find };

1
sepolicy/vendor/charger_vendor.te vendored Normal file
View File

@@ -0,0 +1 @@
allow charger_vendor vendor_sysfs_battery:file r_file_perms;

View File

@@ -74,6 +74,7 @@
/(vendor|system/vendor)/bin/hermesd u:object_r:hermesd_exec:s0
/(vendor|system/vendor)/bin/hw/android.hardware.sensors-service.samsung-multihal u:object_r:hal_sensors_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint(@[0-9].[0-9])?-service\.samsung u:object_r:hal_fingerprint_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.health-service\.samsung u:object_r:hal_health_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.secure_element@1\.2-service u:object_r:hal_secure_element_default_exec:s0
/(vendor|system/vendor)/bin/hw/nxp\.android\.hardware\.nfc@1\.2-service u:object_r:hal_nfc_default_exec:s0
/(vendor|system/vendor)/bin/hw/sehradiomanager u:object_r:sehradiomanager_exec:s0

View File

@@ -18,3 +18,6 @@ get_prop(hal_audio_default, vendor_radio_prop)
allow hal_audio_default hal_bluetooth_a2dp_hwservice:hwservice_manager find;
dontaudit hal_audio_default default_prop:file { read open getattr map };
# Allow binder calls from audio hal to system app
binder_call(hal_audio_default, system_app)

View File

@@ -31,3 +31,6 @@ set_prop(hal_camera_default, sec_camera_prop)
allow hal_camera_default system_server:binder call;
allow hal_camera_default rild:unix_stream_socket connectto;
# Allow binder calls from camera hal to system app
binder_call(hal_camera_default, system_app)

View File

@@ -22,3 +22,6 @@ allow hal_fingerprint_default vendor_biometrics_data_file:file create_file_perms
# Allow fingerprint HAL to search vendor_sysfs_battery files
allow hal_fingerprint_default vendor_sysfs_battery:dir search;
# Allow binder calls from fp hal to system app
binder_call(hal_fingerprint_default, system_app)

View File

@@ -11,3 +11,6 @@ allow hal_health_default hal_thermal_samsung_hwservice:hwservice_manager find;
binder_call(hal_health_default, hal_thermal_default)
allow hal_health_default sysfs:file { getattr open read };
# Allow binder calls from health hal to system app
binder_call(hal_health_default, system_app)

View File

@@ -0,0 +1,2 @@
# Allow binder calls from memtrack hal to system app
binder_call(hal_memtrack_default, system_app)

View File

@@ -15,3 +15,6 @@ allow hal_power_default vendor_sysfs_touchscreen_writable:file rw_file_perms;
# Allow power HAL to to read/write vendor_sysfs_battery
allow hal_power_default vendor_sysfs_battery:dir r_dir_perms;
allow hal_power_default vendor_sysfs_battery:file rw_file_perms;
# Allow binder calls from power hal to system app
binder_call(hal_power_default, system_app)

View File

@@ -5,3 +5,6 @@ allow vendor_hal_gnss_qti vendor_sysfs_battery:dir r_dir_perms;
allow vendor_hal_gnss_qti hal_gnss_service:service_manager add;
dontaudit vendor_hal_gnss_qti { default_prop system_prop }:file { read open getattr map };
# Allow binder calls from gnss hal to system app
binder_call(vendor_hal_gnss_qti, system_app)

View File

@@ -115,16 +115,16 @@ ro.hardware.gatekeeper=mdfpp
# Graphics
debug.sf.auto_latch_unsignaled=0
debug.sf.disable_client_composition_cache=1
debug.sf.early.app.duration=13666666
debug.sf.early.sf.duration=15666666
debug.sf.earlyGl.app.duration=13666666
debug.sf.earlyGl.sf.duration=15666666
debug.sf.early.app.duration=16600000
debug.sf.early.sf.duration=16600000
debug.sf.earlyGl.app.duration=16600000
debug.sf.earlyGl.sf.duration=16600000
debug.sf.enable_gl_backpressure=1
debug.sf.enable_hwc_vds=0
debug.sf.gpu_freq_index=7
debug.sf.latch_unsignaled=1
debug.sf.late.app.duration=13666666
debug.sf.late.sf.duration=15666666
debug.sf.late.app.duration=16600000
debug.sf.late.sf.duration=10500000
debug.sf.predict_hwc_composition_strategy=0
debug.sf.show_refresh_rate_overlay_render_rate=true
debug.sf.treat_170m_as_sRGB=1

View File

@@ -3,6 +3,70 @@
SPDX-License-Identifier: Apache-2.0
-->
<compatibility-matrix version="5.0" type="framework">
<hal format="aidl" optional="true">
<name>android.hardware.biometrics.fingerprint</name>
<version>4</version>
<interface>
<name>IFingerprint</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.bluetooth.audio</name>
<version>4</version>
<interface>
<name>IBluetoothAudioProviderFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.power</name>
<version>5</version>
<interface>
<name>IPower</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.sensors</name>
<version>2</version>
<interface>
<name>ISensors</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.usb.gadget</name>
<version>1</version>
<interface>
<name>IUsbGadget</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.wifi</name>
<version>2</version>
<interface>
<name>IWifi</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.wifi.hostapd</name>
<version>2</version>
<interface>
<name>IHostapd</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.wifi.supplicant</name>
<version>3</version>
<interface>
<name>ISupplicant</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.samsung.hardware.bluetooth.a2dpsink</name>
<version>1.0</version>