From 62573802de31f9abaee68f070cea8416f07bc72a Mon Sep 17 00:00:00 2001 From: merothh Date: Tue, 27 Jul 2021 15:36:37 +0530 Subject: [PATCH 1/3] GS290: Drop unused sepolicy * This sepolicy directory wasnt added to BOARD_PLAT_PRIVATE_SEPOLICY_DIR anyway --- sepolicy/private/bootanim.te | 1 - sepolicy/private/proc_ged.te | 3 --- 2 files changed, 4 deletions(-) delete mode 100644 sepolicy/private/bootanim.te delete mode 100644 sepolicy/private/proc_ged.te diff --git a/sepolicy/private/bootanim.te b/sepolicy/private/bootanim.te deleted file mode 100644 index 1b8e8cf..0000000 --- a/sepolicy/private/bootanim.te +++ /dev/null @@ -1 +0,0 @@ -allow bootanim gpu_device:dir r_dir_perms; diff --git a/sepolicy/private/proc_ged.te b/sepolicy/private/proc_ged.te deleted file mode 100644 index 740a130..0000000 --- a/sepolicy/private/proc_ged.te +++ /dev/null @@ -1,3 +0,0 @@ -type proc_ged, file_type; # Should be defined in vendor -# Pretty much every graphics process need to access /proc/ged -allowxperm domain proc_ged:file ioctl { 0x6700-0x67ff }; -- GitLab From 3b3c7af7ce79b33950973a3566d00775aab44353 Mon Sep 17 00:00:00 2001 From: merothh Date: Thu, 22 Jul 2021 00:12:19 +0530 Subject: [PATCH 2/3] GS290: Bind mount audio policy config * Add relevant sepolicy as well --- BoardConfig.mk | 2 +- audio/audio_policy_configuration.xml | 274 +++++++++++++++++++++++++++ device.mk | 3 + rootdir/etc/init.mt6763.rc | 1 + sepolicy/private/file_contexts | 2 + sepolicy/private/init.te | 2 + 6 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 audio/audio_policy_configuration.xml create mode 100644 sepolicy/private/file_contexts create mode 100644 sepolicy/private/init.te diff --git a/BoardConfig.mk b/BoardConfig.mk index d6ba03b..cdf33b6 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -93,7 +93,7 @@ BOARD_PACK_IMAGES := recovery.img:recovery TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)/releasetools # Sepolicy -#BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/private +BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/private # Soong PRODUCT_SOONG_NAMESPACES += vendor/volla/yggdrasil diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml new file mode 100644 index 0000000..0231b2c --- /dev/null +++ b/audio/audio_policy_configuration.xml @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + Speaker + Earpiece + Built-In Mic + Built-In Back Mic + FM Tuner In + Voice Call In + Echo Ref In + Telephony Tx + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device.mk b/device.mk index 4b14a7b..abec605 100644 --- a/device.mk +++ b/device.mk @@ -23,6 +23,9 @@ PRODUCT_PACKAGES += \ audio.a2dp.default \ libaacwrapper +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/audio/audio_policy_configuration.xml:system/etc/audio_policy_configuration.xml + # Camera PRODUCT_PACKAGES += \ Snap diff --git a/rootdir/etc/init.mt6763.rc b/rootdir/etc/init.mt6763.rc index b8449c1..02a20cc 100644 --- a/rootdir/etc/init.mt6763.rc +++ b/rootdir/etc/init.mt6763.rc @@ -1,4 +1,5 @@ on init + mount none /system/etc/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml bind setprop sys.usb.ffs.aio_compat 1 # Force disable all VoLTE support -- it requires intensive modification of frameworks # without framework support it creates all sorts of problems. Disable it. diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts new file mode 100644 index 0000000..e34399b --- /dev/null +++ b/sepolicy/private/file_contexts @@ -0,0 +1,2 @@ +# Audio +/system/etc/audio_policy_configuration.xml u:object_r:vendor_configs_file:s0 diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te new file mode 100644 index 0000000..06eb286 --- /dev/null +++ b/sepolicy/private/init.te @@ -0,0 +1,2 @@ +# Allow init to mount vendor configs +allow init vendor_configs_file:file mounton; -- GitLab From 0313b945b9a48b878901402f7e90e328189b50ae Mon Sep 17 00:00:00 2001 From: TTTT555 Date: Mon, 9 Nov 2020 11:31:39 +0600 Subject: [PATCH 3/3] GS290: audio: Fix BT Echo --- audio/audio_policy_configuration.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml index 0231b2c..9e4f28d 100644 --- a/audio/audio_policy_configuration.xml +++ b/audio/audio_policy_configuration.xml @@ -53,7 +53,6 @@ FM Tuner In Voice Call In Echo Ref In - Telephony Tx Speaker @@ -160,12 +159,6 @@ - - - - -