diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml new file mode 100644 index 0000000..0a0f9c5 --- /dev/null +++ b/audio/audio_policy_configuration.xml @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + Earpiece + Speaker + Telephony Tx + Built-In Mic + Built-In Back Mic + FM Tuner + Telephony Rx + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index cc3c2d4..0eedd0a 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -1,3 +1,6 @@ +on init + mount none /system/etc/audio_policy_configuration.xml /vendor/etc/audio/audio_policy_configuration.xml bind + on boot mount none /system/overlay/BluetoothResCommon.apk /vendor/overlay/BluetoothResCommon.apk bind diff --git a/sdm710.mk b/sdm710.mk index 62c2cda..589abe6 100644 --- a/sdm710.mk +++ b/sdm710.mk @@ -25,6 +25,9 @@ PRODUCT_PACKAGES += \ audio.a2dp.default \ tinymix +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/audio/audio_policy_configuration.xml:system/etc/audio_policy_configuration.xml + # Bluetooth PRODUCT_PACKAGES += \ BluetoothResCommon diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index 4a7bcc1..bc3e8d0 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -2,6 +2,9 @@ /system/bin/hw/android\.hardware\.light@2\.0-service\.realme_sdm710 u:object_r:hal_light_sdm710_exec:s0 /system/bin/hw/vendor\.lineage\.camera\.motor@1.0-service\.realme_sdm710 u:object_r:hal_lineage_camera_motor_realme_sdm710_exec:s0 +# Audio +/system/etc/audio_policy_configuration.xml u:object_r:vendor_configs_file:s0 + # Files in rootfs /bt_firmware(/.*)? u:object_r:bt_firmware_file:s0 /dsp(/.*)? u:object_r:adsprpcd_file:s0 diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te index 75b1267..fcf7a8e 100644 --- a/sepolicy/private/init.te +++ b/sepolicy/private/init.te @@ -1,2 +1,5 @@ # Allow init to chown/chmod on pseudo files in /sys allow init sysfs_graphics:file { open read setattr }; + +# Allow init to mount vendor configs +allow init vendor_configs_file:file mounton;