sm7125: A525FXXU4BVG1

*Patch RIL again since Samsung changed prop names
*Update configs
*Update sepolicy for new blob updates
*dont allow rild and camera to access every prop, preventing log spam
*Also import Samsung's thermal HAL since health blobs now depend on it. Label it as hal_thermal_samsung_hwservice since hal_thermal_hwservice is a neverallow in health sepolicy

Change-Id: Ic6d699115c2e18f722b623e5a07e3a88e222f1f3
tirimbino
Simon1511 2 years ago committed by Ruchit Marathe
parent 1fa4bf5f20
commit 7612a3bd79
  1. 6
      BoardConfigCommon.mk
  2. 30
      audio/PrimaryDevice.cpp
  3. 6
      common.mk
  4. 6
      configs/audio/audio_platform_info_intcodec.xml
  5. 8
      configs/framework_compatibility_matrix.xml
  6. 17
      configs/media/media_codecs.xml
  7. 8
      configs/media/media_codecs_performance.xml
  8. 2
      extract-files.sh
  9. 28
      proprietary-files.txt
  10. 8
      rootdir/Android.mk
  11. 5
      rootdir/etc/init.audio.samsung.rc
  12. 19
      rootdir/etc/init.nfc.samsung.rc
  13. 2
      rootdir/etc/init.qcom.usb.rc
  14. 12
      rootdir/etc/init.samsung.display.rc
  15. 61
      rootdir/etc/init.samsung.power.rc
  16. 13
      rootdir/etc/init.samsung.rc
  17. 10
      rootdir/etc/wifi_qcom.rc
  18. 2
      rootdir/etc/wifi_sec.rc
  19. 1
      sepolicy/vendor/file_contexts
  20. 3
      sepolicy/vendor/genfs_contexts
  21. 2
      sepolicy/vendor/hal_camera_default.te
  22. 4
      sepolicy/vendor/hal_health_default.te
  23. 8
      sepolicy/vendor/hal_thermal_default.te
  24. 2
      sepolicy/vendor/hwservice.te
  25. 3
      sepolicy/vendor/hwservice_contexts
  26. 2
      sepolicy/vendor/macloader.te
  27. 3
      sepolicy/vendor/property_contexts
  28. 7
      sepolicy/vendor/rild.te
  29. 2
      sepolicy/vendor/vendor_hal_perf_default.te
  30. 1
      vendor.prop

@ -176,10 +176,10 @@ TARGET_DISABLED_UBWC := true
BOARD_USES_ADRENO := true
# Fingerprint
BUILD_FINGERPRINT := "samsung/a52qnsxx/qssi:12/SP1A.210812.016/A525FXXS4BVA2:user/release-keys"
PRIVATE_BUILD_DESC := "a52qnsxx-user 12 SP1A.210812.016 A525FXXS4BVA2 release-keys"
BUILD_FINGERPRINT := "samsung/a52qnsxx/qssi:12/SP1A.210812.016/A525FXXU4BVG1:user/release-keys"
PRIVATE_BUILD_DESC := "a52qnsxx-user 12 SP1A.210812.016 A525FXXU4BVG1 release-keys"
VENDOR_SECURITY_PATCH := 2022-01-01
VENDOR_SECURITY_PATCH := 2022-07-01
# FM
BOARD_HAS_QCA_FM_SOC := cherokee

@ -215,25 +215,29 @@ Return<Result> PrimaryDevice::setMode(AudioMode mode) {
* For the g_call_sim_slot parameter 0x01 describes SIM1 and 0x02 SIM2.
*/
char simSlot[92];
// This prop returns either -1 (no SIM is calling),
// 0 (SIM1 is calling) or 1 (SIM2 is calling)
property_get("vendor.calls.slotid", simSlot, "");
// Wait until RIL reports which SIM is being used
while (strcmp(simSlot, "-1") == 0 && mode == AudioMode::IN_CALL) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
property_get("vendor.calls.slotid", simSlot, "");
char simSlot1[92], simSlot2[92];
// These props return either 0 (not calling),
// or 1 (SIM is calling)
property_get("vendor.calls.ongoing0", simSlot1, "");
property_get("vendor.calls.ongoing1", simSlot2, "");
// Wait until one sim slot reports a call
if (mode == AudioMode::IN_CALL) {
while (strcmp(simSlot1, "0") == 0 && strcmp(simSlot2, "0") == 0) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
property_get("vendor.calls.ongoing0", simSlot1, "");
property_get("vendor.calls.ongoing1", simSlot2, "");
}
}
if (strcmp(simSlot, "0") == 0) {
if (strcmp(simSlot1, "1") == 0) {
// SIM1
mDevice->halSetParameters("call_state=2;g_call_state=2;g_call_sim_slot=0x01");
} else if (strcmp(simSlot, "1") == 0) {
} else if (strcmp(simSlot2, "1") == 0) {
// SIM2
mDevice->halSetParameters("call_state=2;g_call_state=2;g_call_sim_slot=0x02");
} else if (strcmp(simSlot, "-1") == 0) {
} else if (strcmp(simSlot1, "0") == 0 && strcmp(simSlot2, "0") == 0) {
// No call
mDevice->halSetParameters("call_state=1;g_call_state=1");
}

@ -43,6 +43,7 @@ PRODUCT_PACKAGES += \
init.samsung.bsp.rc \
init.samsung.display.rc \
init.samsung.rc \
init.samsung.power.rc \
init.fingerprint.rc \
init.ramplus.rc \
init.target.rc \
@ -382,6 +383,11 @@ PRODUCT_PACKAGES += \
android.hardware.sensors@2.1-service.samsung-multihal \
android.hardware.sensors@2.0-ScopedWakelock.vendor
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0.vendor \
android.frameworks.cameraservice.service@2.1.vendor
# Touch features
PRODUCT_PACKAGES += \
vendor.lineage.touch@1.0-service.samsung

@ -207,6 +207,8 @@
<device name="SND_DEVICE_OUT_FM_HEADSET" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_HEADSET_KARAOKE" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_HEADPHONES_KARAOKE" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_HEADPHONES_AFE_LISTENBACK" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_HEADSET_AFE_LISTENBACK" backend="headset" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_HEADPHONES_DSD" backend="headphones-dsd" interface=""/>
@ -254,6 +256,8 @@
<device name="SND_DEVICE_OUT_VOIP_FMC_USB_HEADSET" backend="usb-headset" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_LOOPBACK_USB_HEADSET" backend="usb-headset" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_USB_HEADSET_KARAOKE" backend="usb-headset" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_USB_HEADSET_AFE_LISTENBACK" backend="usb-headset" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_USB_HEADPHONES_AFE_LISTENBACK" backend="usb-headphones" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_USB_HEADSET" backend="usb-headphones" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_CALL_USB_HEADPHONE" backend="usb-headphones" interface="USB_AUDIO_RX"/>
@ -281,7 +285,7 @@
<device name="SND_DEVICE_OUT_HDMI" interface=""/>
<device name="SND_DEVICE_OUT_VOICE_CALL_FORWARD" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_VOICE_HEARING_AID" backend="hearing-aid" interface="SLIMBUS_7_RX"/>
<device name="SND_DEVICE_OUT_VOICE_TX" backend="afe-proxy" interface="RT_PROXY_DAI_001_RX"/>
<device name="SND_DEVICE_OUT_HEADSET_REMOTEMIC" backend="headphones" interface="RX_CDC_DMA_RX_0"/>
<device name="SND_DEVICE_OUT_USB_REMOTEMIC" backend="usb-headphones" interface="USB_AUDIO_RX"/>
<device name="SND_DEVICE_OUT_BT_REMOTEMIC" backend="bt-sco" interface="SLIMBUS_7_RX"/>

@ -902,4 +902,12 @@
<instance>imsd2</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.samsung.hardware.thermal</name>
<version>1.0</version>
<interface>
<name>ISehThermal</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

@ -133,6 +133,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="blocks-per-second" min="36" max="979200" />
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-4096x2160" value="24" />
<Limit name="performance-point-3840x2160" value="30" />
@ -149,6 +150,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="blocks-per-second" min="36" max="979200" />
<Limit name="bitrate" range="1-120000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-3840x2160" value="30" />
</MediaCodec>
@ -162,6 +164,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="blocks-per-second" min="36" max="979200" />
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
<Limit name="performance-point-4096x2160" value="24" />
@ -195,6 +198,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
@ -210,6 +214,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
@ -228,7 +233,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
<Feature name="can-swap-width-height" value="1" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-4096x2160" value="24" />
<Limit name="performance-point-3840x2160" value="30" />
@ -246,6 +251,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-3840x2160" value="30" />
</MediaCodec>
@ -260,6 +266,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
@ -274,6 +281,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
@ -288,6 +296,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-3840x2160" value="30" />
<Limit name="performance-point-1920x1080" value="60" />
@ -303,6 +312,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-120000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="6" />
<Limit name="performance-point-4096x2160" value="24" />
<Limit name="performance-point-3840x2160" value="30" />
@ -320,6 +330,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-3840x2160" value="30" />
</MediaCodec>
@ -333,6 +344,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-4096x2160" value="24" />
<Limit name="performance-point-3840x2160" value="30" />
@ -350,6 +362,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-3840x2160" value="30" />
</MediaCodec>
@ -364,6 +377,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-16000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
@ -378,6 +392,7 @@ Only the three quirks included above are recognized at this point:
<Limit name="blocks-per-second" min="36" max="244800" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>

@ -190,8 +190,12 @@ limitations under the License.
<Limit name="measured-frame-rate-1920x1080" range="27-60" />
</MediaCodec>
<MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
<!-- measured [424-901] lower-upper [167-1783] median * 1.5 [994] -->
<Limit name="measured-frame-rate-176x144" range="368-810" />
<!-- measured [392-558] lower-upper [120-1279] median * 1.5 [713] -->
<Limit name="measured-frame-rate-176x144" range="264-581" />
<!-- measured [338-728] lower-upper [135-1435] median * 1.5 [800] -->
<Limit name="measured-frame-rate-480x360" range="296-652" />
<!-- measured [95-328] lower-upper [54-570] median * 1.5 [317] -->
<Limit name="measured-frame-rate-1280x720" range="118-259" />
</MediaCodec>
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
<!-- measured [241-787] lower-upper [130-1383] median * 1.5 [771] -->

@ -66,7 +66,7 @@ BLOB_ROOT="$ANDROID_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary
function blob_fixup() {
case "${1}" in
vendor/lib64/libsec-ril.so)
sed -i 's/ril.dds.call.slotid/vendor.calls.slotid/g' "${2}"
sed -i 's/ril.dds.call.ongoing/vendor.calls.ongoing/g' "${2}"
;;
esac
}

@ -1,4 +1,4 @@
# All blobs are from A525FXXS4BVA2, unless pinned
# All blobs are from A525FXXU4BVG1, unless pinned
# ACDB
vendor/lib/libacdb-fts.so
@ -38,7 +38,6 @@ vendor/lib/rfsa/adsp/libfastcvadsp.so
vendor/lib/rfsa/adsp/libfastcvdsp_skel.so
vendor/lib/rfsa/adsp/libsns_low_lat_stream_skel.so
vendor/lib64/rfsa/adsp/libsns_low_lat_stream_skel.so
vendor/lib/rfsa/adsp/capi_v2_aptX_CLHDAD_Encoder.so
vendor/lib/rfsa/adsp/libdsp_streamer_skel.so
vendor/lib/rfsa/adsp/libcamera_nn_skel.so
vendor/lib/rfsa/adsp/libcvpdsp_skel.so
@ -320,8 +319,8 @@ vendor/lib/libLocalTM_capture_core.camera.samsung.so
vendor/lib/liblow_light_hdr.so
vendor/lib/libdualcam_refocus_video.so
vendor/lib/libvdis_core.so
vendor/lib/unihal_main@1.3.so
vendor/lib/unihal_cutils@1.3.so
vendor/lib/unihal_main@2.1.so
vendor/lib/unihal_cutils@2.1.so
vendor/lib/unihal_uniplugin@1.0.so
vendor/lib/libface_landmark.arcsoft.so
vendor/lib64/libsuper_night_interface.so
@ -456,8 +455,8 @@ vendor/lib64/libmpbase.so
vendor/lib64/libLocalTM_capture_core.camera.samsung.so
vendor/lib64/liblow_light_hdr.so
vendor/lib64/libvdis_core.so
vendor/lib64/unihal_main@1.3.so
vendor/lib64/unihal_cutils@1.3.so
vendor/lib64/unihal_main@2.1.so
vendor/lib64/unihal_cutils@2.1.so
vendor/lib64/unihal_uniplugin@1.0.so
vendor/lib64/libface_landmark.arcsoft.so
vendor/firmware/CAMERA_ICP.elf
@ -729,7 +728,7 @@ vendor/bin/hw/android.hardware.health@2.1-service-samsung
vendor/etc/init/android.hardware.health@2.1-service-samsung.rc
-vendor/etc/vintf/manifest/android.hardware.health@2.1-samsung.xml
vendor/lib/hw/android.hardware.health@2.0-impl-2.1-samsung.so
vendor/lib64/hw/android.hardware.health@2.0-impl-2.1-samsung.so|198198b82c376e1370e107d154859f95c8e72f86
vendor/lib64/hw/android.hardware.health@2.0-impl-2.1-samsung.so|8e7c50b855276f6158d6dac82a5e9192b6ca4d09
vendor/lib/vendor.samsung.hardware.health@2.0.so
vendor/lib64/vendor.samsung.hardware.health@2.0.so
@ -858,8 +857,8 @@ vendor/lib64/libqti-perfd-client.so
vendor/lib64/libqti-perfd.so
vendor/lib64/libperfioctl.so
vendor/lib64/libqti-util.so
vendor/lib/vendor.qti.memory.pasrmanager@1.0.so
vendor/lib/vendor.qti.memory.pasrmanager@1.1.so
vendor/lib64/vendor.qti.memory.pasrmanager@1.0.so
vendor/lib64/vendor.qti.memory.pasrmanager@1.1.so
vendor/etc/perf/targetresourceconfigs.xml
vendor/etc/perf/perfconfigstore.xml
vendor/etc/perf/commonresourceconfigs.xml
@ -972,7 +971,7 @@ vendor/lib64/libnetmgr.so
vendor/lib64/libnetmgr_common.so
vendor/lib/libqrtr.so
vendor/lib64/libqrtr.so
vendor/lib64/libsec-ril.so|1d97ef6504c6380466d4ea82b3428f496e4d0ab8
vendor/lib64/libsec-ril.so|27f3bb99e129e7521795c579092527d9da7ee3d2
vendor/lib64/libsecril-client.so
vendor/lib/libsystem_health_mon.so
vendor/lib64/libsystem_health_mon.so
@ -1067,6 +1066,15 @@ vendor/etc/init/init_thermal-engine.rc
vendor/etc/thermal-engine.conf
vendor/lib/libthermalclient.so
vendor/lib64/libthermalclient.so
vendor/bin/hw/vendor.samsung.hardware.thermal@1.0-service
vendor/etc/init/vendor.samsung.hardware.thermal@1.0-service.rc
-vendor/etc/vintf/manifest/vendor.samsung.hardware.thermal@1.0-manifest.xml
vendor/lib/vendor.samsung.hardware.thermal@1.0.so
vendor/lib64/vendor.samsung.hardware.thermal@1.0.so
vendor/lib/libhypervintf.so
vendor/lib64/libhypervintf.so
vendor/lib/vendor.samsung.hardware.hyper-V2-ndk_platform.so
vendor/lib64/vendor.samsung.hardware.hyper-V2-ndk_platform.so
# Time services
-vendor/app/TimeService/TimeService.apk

@ -68,6 +68,14 @@ LOCAL_SRC_FILES := etc/init.samsung.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.samsung.power.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.samsung.power.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.fingerprint.rc
LOCAL_MODULE_TAGS := optional

@ -55,3 +55,8 @@ on property:sys.boot_completed=1
chmod 0660 /efs/tas25xx/amb_temp
chmod 0660 /efs/tas25xx/calib_re_r
chmod 0660 /efs/tas25xx/amb_temp_r
# DBMDx
chmod 0660 /dev/dbmdx-1
chown system audio /dev/dbmdx-1
chown system audio /sys/class/voicep/dbmdx/va_mic_mode

@ -1,7 +1,22 @@
on late-init
# PVDD enable
write /sys/class/nfc_sec/pvdd "1"
on post-fs-data
write /sys/class/nfc_sec/pvdd "2"
# NFC KEY
mkdir /data/vendor/nfc 0770 nfc nfc
# NFC driver permission
chmod 0660 /dev/p3
chown system system /dev/p3
chmod 0660 /dev/p61
chown system system /dev/p61
chmod 0660 /dev/st54spi
chown system system /dev/st54spi
on boot
write /sys/class/nfc_sec/pvdd "3"
# NFC driver permission
chmod 0660 /dev/sec-nfc
chown nfc nfc /dev/sec-nfc
@ -28,3 +43,7 @@ on post-fs-data
# copy /system/etc/nfc_key /data/nfc/Key
chmod 660 /data/nfc/Key
chown nfc nfc /data/nfc/Key
# For NFC hardware SKU
on boot && property:ro.boot.nfc.feature.chipname=*
setprop ro.vendor.nfc.feature.chipname ${ro.boot.nfc.feature.chipname}

@ -31,6 +31,8 @@ on init
chmod 0660 /sys/class/host_notify/usb_otg/booster
chown system radio /sys/class/usb_notify/usb_control/disable
chmod 0660 /sys/class/usb_notify/usb_control/disable
chown root system /sys/class/usb_notify/usb_control/usb_data_enabled
chmod 0664 /sys/class/usb_notify/usb_control/usb_data_enabled
# usb hw param
chown system usb /sys/class/usb_notify/usb_control/usb_hw_param

@ -354,7 +354,7 @@ on init
chown system system /sys/class/lcd/panel/copr
chmod 0660 /sys/class/lcd/panel/copr
chown system system /sys/class/lcd/panel/brt_avg
chmod 0660 /sys/class/lcd/panel/brt_avg
chmod 0440 /sys/class/lcd/panel/brt_avg
chown system system /sys/class/lcd/panel1/copr_roi
chmod 0660 /sys/class/lcd/panel1/copr_roi
@ -363,7 +363,7 @@ on init
chown system system /sys/class/lcd/panel1/copr
chmod 0660 /sys/class/lcd/panel1/copr
chown system system /sys/class/lcd/panel1/brt_avg
chmod 0660 /sys/class/lcd/panel1/brt_avg
chmod 0440 /sys/class/lcd/panel1/brt_avg
# SELF MASK
chown system system /sys/class/lcd/panel/self_mask
@ -408,7 +408,13 @@ on init
chmod 0660 /sys/class/lcd/panel/mask_brightness
chown system system /sys/class/lcd/panel/actual_mask_brightness
chmod 0660 /sys/class/lcd/panel/actual_mask_brightness
chmod 0440 /sys/class/lcd/panel/actual_mask_brightness
chown system system /sys/class/lcd/panel1/mask_brightness
chmod 0660 /sys/class/lcd/panel1/mask_brightness
chown system system /sys/class/lcd/panel1/actual_mask_brightness
chmod 0440 /sys/class/lcd/panel1/actual_mask_brightness
# UB CONN DET
chown system system /sys/class/lcd/panel/conn_det

@ -0,0 +1,61 @@
# Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
on early-init
on init
on late-init
on post-fs
on late-fs
on post-fs-data
on boot
chown radio system /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_min_limit
chown radio system /sys/power/cpufreq_table
chown radio system /sys/power/over_limit
chmod 664 /sys/power/cpufreq_max_limit
chmod 664 /sys/power/cpufreq_min_limit
chmod 444 /sys/power/cpufreq_table
chmod 664 /sys/power/over_limit
write /sys/power/pm_debug_messages 1
chown radio system /sys/module/lpm_levels/parameters/secdebug
chmod 664 /sys/module/lpm_levels/parameters/secdebug
on shutdown
# service definition
# on property triggers

@ -28,6 +28,7 @@
#
import /vendor/etc/init/hw/init.samsung.bsp.rc
import /vendor/etc/init/hw/init.samsung.power.rc
import /vendor/etc/init/hw/init.samsung.display.rc
on early-init
@ -37,8 +38,11 @@ on early-init
mkdir /efs/taas 0770 system system
mkdir /mnt/vendor/efs/taas 0770 system system
chown system system /dev/tspio
chown system system /sys/class/sec/tsp/enable
chown system system /sys/class/sec/tsp/enabled
chmod 0660 /sys/class/sec/tsp/enabled
chown system system /dev/tsp_data
chown system system /sys/class/sec/sec_epen/enabled
chmod 0660 /sys/class/sec/sec_epen/enabled
# pogo keyboard
chown system system /sys/class/sec/sec_keypad/fw_update
@ -185,9 +189,6 @@ on boot
chown system system /sys/class/sec/tsp/ta_mode
chown system system /sys/class/sec/tsp/virtual_prox
chown system system /sys/class/sec/tsp/hw_param
chown system system /sys/class/sec/tsp/input/trusted_touch_enable
chown system system /sys/class/sec/tsp/input/trusted_touch_event
chown system system /sys/class/sec/tsp/input/trusted_touch_type
# Permissions for Touchscreen-1
chown system radio /sys/class/sec/tsp1/cmd
@ -248,8 +249,12 @@ on boot
# Permission for Securetouch
chown system system /sys/class/sec/ss_touch/secure/secure_touch_enable
chown system system /sys/class/sec/tsp/input/secure_touch_enable
chown system system /sys/class/sec/tsp1/input/secure_touch_enable
chown system system /sys/class/sec/tsp2/input/secure_touch_enable
chown system system /sys/class/sec/tsp/input/trusted_touch_enable
chown system system /sys/class/sec/tsp/input/trusted_touch_event
chown system system /sys/class/sec/tsp/input/trusted_touch_type
# Key
chown system radio /sys/class/sec/sec_key/wakeup_keys

@ -34,20 +34,18 @@ on post-fs-data
chmod 0640 /sys/wifi/ant
on property:vendor.wlan.ramdump_mode=0
write /sys/bus/msm_subsys/devices/subsys9/restart_level "RELATED"
write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
stop vendor.ss_ramdump
on property:vendor.wlan.ramdump_mode=2
write /sys/module/subsystem_restart/parameters/enable_ramdumps 2
write /sys/bus/msm_subsys/devices/subsys9/restart_level "RELATED"
stop vendor.ss_ramdump
start vendor.ss_ramdump
#start vendor.ss_ramdump
on property:vendor.wlan.ramdump_mode=3
write /sys/module/subsystem_restart/parameters/enable_ramdumps 2
write /sys/bus/msm_subsys/devices/subsys9/restart_level "SYSTEM"
write /sys/module/subsystem_restart/parameters/enable_ramdumps 3
stop vendor.ss_ramdump
start vendor.ss_ramdump
#start vendor.ss_ramdump
on property:sys.boot_completed=1
chown wifi wifi /sys/module/wlan/parameters/fwpath

@ -40,7 +40,7 @@ on post-fs-data
chmod 0640 /sys/wifi/mac_addr
chown wifi wifi /sys/wifi/dump_in_progress
chmod 0640 /sys/wifi/dump_in_progress
chmod 0660 /sys/wifi/dump_in_progress
on boot
setprop wifi.interface wlan0

@ -61,6 +61,7 @@
/(vendor|system/vendor)/bin/secril_config_svc u:object_r:secril_config_svc_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service.samsung-qcom\.sm7125 u:object_r:hal_lineage_livedisplay_sysfs_exec:s0
/(vendor|system/vendor)/bin/hw/android.hardware.biometrics.fingerprint@2.3-service-samsung.sm7125 u:object_r:hal_fingerprint_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor.samsung.hardware.thermal@1.0-service u:object_r:hal_thermal_default_exec:s0
/(vendor|system/vendor)/bin/hw/android.hardware.sensors@[0-9].[0-9]-service.samsung-multihal u:object_r:hal_sensors_default_exec:s0
/(vendor|system/vendor)/bin/hw/android.hardware.vibrator-service.sm7125 u:object_r:hal_vibrator_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.health@2\.1-service-samsung u:object_r:hal_health_default_exec:s0

@ -39,6 +39,9 @@ genfscon sysfs /devices/virtual/camera/
genfscon sysfs /devices/virtual/camera/rear/ssrm_camera_info u:object_r:sysfs_camera_writable:s0
genfscon sysfs /devices/virtual/camera/flash/rear_flash u:object_r:sysfs_camera_writable:s0
genfscon sysfs /kernel/mm/vmscan/mem_boost_mode u:object_r:sysfs_camera_writable:s0
genfscon sysfs /devices/virtual/sec/sec-ap-thermistor/ u:object_r:sysfs_thermal:s0
genfscon sysfs /devices/virtual/sec/sec-pa-thermistor/ u:object_r:sysfs_thermal:s0
genfscon sysfs /devices/virtual/sec/sec-wf-thermistor/ u:object_r:sysfs_thermal:s0
genfscon sysfs /power/ u:object_r:sysfs_power_writable:s0

@ -12,3 +12,5 @@ get_prop(hal_camera_default, vendor_mpctl_prop)
# EFS
allow hal_camera_default efs_file:dir search;
dontaudit hal_camera_default default_prop:file read;

@ -11,3 +11,7 @@ allow hal_health_default app_efs_file:dir { read write add_name search };
allow hal_health_default app_efs_file:file { read write open create getattr setattr };
allow hal_health_default efs_file:dir search;
# Thermal
allow hal_health_default hal_thermal_samsung_hwservice:hwservice_manager find;
binder_call(hal_health_default, hal_thermal_default)

@ -0,0 +1,8 @@
allow hal_thermal_default sysfs_thermal:file getattr;
allow hal_thermal_default sysfs_battery:dir search;
allow hal_thermal_default sysfs_battery:file { read open getattr };
allow hal_thermal_default sysfs_power_writable:file { read open };
allow hal_thermal_default hal_thermal_samsung_hwservice:hwservice_manager { add find };

@ -1 +1,3 @@
type hal_bluetooth_a2dp_hwservice, hwservice_manager_type;
type hal_thermal_samsung_hwservice, hwservice_manager_type;

@ -14,3 +14,6 @@ vendor.samsung.hardware.health::ISehHealth
vendor.samsung.hardware.radio.bridge::ISehBridge u:object_r:hal_telephony_hwservice:s0
vendor.samsung.hardware.radio::ISehRadio u:object_r:hal_telephony_hwservice:s0
vendor.samsung.hardware.radio.channel::ISehChannel u:object_r:hal_telephony_hwservice:s0
# Thermal
vendor.samsung.hardware.thermal::ISehThermal u:object_r:hal_thermal_samsung_hwservice:s0

@ -40,3 +40,5 @@ allow macloader sysfs_wifi:file r_file_perms;
# /sys/kernel/boot_wlan
allow macloader sysfs_wifi_writable:file { write open };
set_prop(macloader, vendor_wifi_prop)

@ -21,7 +21,7 @@ vendor.sec.rild. u:object_r:vendor_radio_prop:s0
ro.vendor.sec.radio. u:object_r:vendor_radio_prop:s0
ro.vendor.use_data_netmgrd u:object_r:vendor_radio_prop:s0
ro.vendor.epdg.support u:object_r:vendor_radio_prop:s0
vendor.calls.slotid u:object_r:vendor_radio_prop:s0
vendor.calls u:object_r:vendor_radio_prop:s0
# Sensors
vendor.sensor.file.permission u:object_r:vendor_sensors_prop:s0
@ -31,3 +31,4 @@ vendor.sys.qseecomd.enable u:object_r:vendor_qseecomd_prop
# wifi
vendor.wifi. u:object_r:vendor_wifi_prop:s0
ro.vendor.wifi.sap.interface u:object_r:vendor_wifi_prop:s0

@ -41,3 +41,10 @@ allow rild proc_net:file rw_file_perms;
allow rild tun_device:chr_file rw_file_perms;
allowxperm rild tun_device:chr_file ioctl { 0x54ca 0x54cb };
allow rild self:tun_socket create;
dontaudit rild {
system_prop
default_prop
}:file read;
dontaudit rild default_prop:property_service set;

@ -0,0 +1,2 @@
# /sys/module/lpm_levels/parameters/bias_hyst
allow vendor_hal_perf_default sysfs_power_writable:file { read open getattr };

@ -58,6 +58,7 @@ vendor.audio.feature.hwdep_cal.enable=false
vendor.audio.feature.concurrent_capture.enable=false
vendor.audio.feature.maxx_audio.enable=false
vendor.audio.feature.audiozoom.enable=false
vendor.audio.feature.incall_music.enable=true
ro.config.vc_call_vol_steps=8
# Bluetooth

Loading…
Cancel
Save