From cb35d750de902d4b4185e0ba7366abb7d2dfcde6 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Thu, 28 Feb 2019 22:48:04 +0100 Subject: [PATCH] Fix audio hal crash on moto --- rw-system.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index 209ef85..b68c8c1 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -176,6 +176,18 @@ fi if [ "$(getprop ro.vendor.product.manufacturer)" == "motorola" ];then if getprop ro.vendor.product.device |grep -q -e nora -e ali -e hannah -e evert -e jeter;then + + f="/vendor/lib/libeffects.so" + ctxt="$(ls -lZ $f |grep -oE 'u:object_r:[^:]*:s0')" + b="$(echo "$f"|tr / _)" + + cp -a $f /mnt/phh/$b + sed -i \ + 's/%zu errors during loading of configuration: %s/%zu errors during loading of configuration: ss/g' + /mnt/phh/$b + chcon "$ctxt" /mnt/phh/$b + mount -o bind /mnt/phh/$b $f + mount -o bind /mnt/phh/empty_dir /vendor/lib64/soundfx mount -o bind /mnt/phh/empty_dir /vendor/lib/soundfx fi