From 4ba81847136c4814c2fb73ec66268b57cbdb0ef2 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 29 Aug 2018 18:30:35 +0200 Subject: [PATCH] Edit mtk-ril to fix incoming call https://github.com/phhusson/treble_experimentations/issues/57#issuecomment-416998086 --- rw-system.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index bfa049a..4353170 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -48,7 +48,11 @@ fi mount -o remount,ro /system || true mount -o remount,ro / || true +mkdir -p /mnt/phh/ +mount -t tmpfs -o rw,nodev,relatime,mode=755,gid=0 none /mnt/phh || true +set +e fixSPL +set -e if grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml;then mount -o bind system/phh/huawei/fingerprint.kl /vendor/usr/keylayout/fingerprint.kl @@ -92,4 +96,17 @@ if getprop ro.vendor.build.fingerprint |grep -q Xiaomi/clover/clover;then setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness) fi +for f in /vendor/lib/mtk-ril.so /vendor/lib64/mtk-ril.so;do + [ ! -f $f ] && continue + ctxt="$(ls -lZ $f |grep -oE 'u:object_r:[^:]*:s0')" + b="$(echo "$f"|tr / _)" + + cp -a $f /mnt/phh/$b + sed -i \ + -e 's/AT+EAIC=2/AT+EAIC=3/g' \ + /mnt/phh/$b + chcon "$ctxt" /mnt/phh/$b + mount -o bind /mnt/phh/$b $f +done + mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk || true