diff --git a/rw-system.sh b/rw-system.sh index 6768610..55310fe 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -18,8 +18,6 @@ fixSPL() { setprop ro.keymaster.xxx.release "$Arelease" setprop ro.keymaster.xxx.security_patch "$(getSPL $img spl)" - mkdir -p /mnt/phh/ - mount -t tmpfs -o rw,nodev,relatime,mode=755,gid=0 none /mnt/phh || true for f in /vendor/lib64/hw/android.hardware.keymaster@3.0-impl-qti.so /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so /system/lib64/vndk-26/libsoftkeymasterdevice.so /vendor/bin/teed /system/lib64/vndk/libsoftkeymasterdevice.so /system/lib/vndk/libsoftkeymasterdevice.so /system/lib/vndk-26/libsoftkeymasterdevice.so;do [ ! -f $f ] && continue ctxt="$(ls -lZ $f |grep -oE 'u:object_r:[^:]*:s0')" @@ -51,7 +49,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 @@ -91,4 +93,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