# patch media codecs
MODMC=/data/adb/modules/acdb/system/vendor/etc/media_codecs_vendor.xml
if [ -f $MODMC ]; then
  sed -i '/<MediaCodecs>/a\
    <Include href="media_codecs_dolby_audio.xml"/>' $MODMC
fi

# kill
killall dms-hal-1-0
killall dms-hal-2-0
killall audioserver

# run
FILE=/vendor/bin/hw/vendor.dolby.hardware.dms@1.0-service
$FILE&
chcon u:object_r:hal_dms_default_exec:s0 $FILE

