From 475de0067dbe0965a7639ce49a803db88952d296 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 3 Jun 2021 16:44:44 -0400 Subject: [PATCH] Some devices have a lot of stuff in /vendor/etc/audio, not just a CAF audio policy, like ZF8 has their whole vendor audio configuration there. Dont empty this dir in that case --- rw-system.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rw-system.sh b/rw-system.sh index 14c830f..c25192b 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -574,7 +574,9 @@ if getprop ro.vendor.build.fingerprint | grep -qE '^xiaomi/wayne/wayne.*'; then setprop audio.camerasound.force true fi -mount -o bind /mnt/phh/empty_dir /vendor/etc/audio || true +if [ $(find /vendor/etc/audio -type f |wc -l) -le 3 ];then + mount -o bind /mnt/phh/empty_dir /vendor/etc/audio || true +fi for f in /vendor/lib{,64}/hw/com.qti.chi.override.so /vendor/lib{,64}/libVD*;do [ ! -f $f ] && continue