diff --git a/BoardConfig.mk b/BoardConfig.mk index d6ba03b2f5369f429d5220ae3a726b3ed645d120..cdf33b64d14ddfcc06e1187f52a64aca2ad30feb 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 0000000000000000000000000000000000000000..9e4f28d836dd800a30599a6876d3088d493f0915 --- /dev/null +++ b/audio/audio_policy_configuration.xml @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + Speaker + Earpiece + Built-In Mic + Built-In Back Mic + FM Tuner In + Voice Call In + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device.mk b/device.mk index 4b14a7b592e781fb2d4eee4564c373ede5974cb0..abec6059c694a8618c8d65a96243fc55e18cc882 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 b8449c188f10a9229d2073a583a8e51993b23a80..02a20cc2eefcb2724ce517d5598cc083f2c4fb97 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/bootanim.te b/sepolicy/private/bootanim.te deleted file mode 100644 index 1b8e8cfaacd7f39a3148a0e4d937b9a4b229b95e..0000000000000000000000000000000000000000 --- a/sepolicy/private/bootanim.te +++ /dev/null @@ -1 +0,0 @@ -allow bootanim gpu_device:dir r_dir_perms; diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts new file mode 100644 index 0000000000000000000000000000000000000000..e34399bcf0286608301fda54d0bcf9ea65b5aa57 --- /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 0000000000000000000000000000000000000000..06eb286b434bef05eac2b3af4f758c9033b3fd1f --- /dev/null +++ b/sepolicy/private/init.te @@ -0,0 +1,2 @@ +# Allow init to mount vendor configs +allow init vendor_configs_file:file mounton; diff --git a/sepolicy/private/proc_ged.te b/sepolicy/private/proc_ged.te deleted file mode 100644 index 740a130ee79d624c2023e9098a2dd2ee300bf773..0000000000000000000000000000000000000000 --- 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 };