From 4943b6a93e7164e2ed3e7633a9b5e73298ae8e9d Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Wed, 17 Jun 2020 16:34:17 +0200 Subject: [PATCH] Fix minijail issue on pie vendors --- phh-on-boot.sh | 9 +++++++++ phh-on-data.sh | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/phh-on-boot.sh b/phh-on-boot.sh index e17b871..a5a3543 100644 --- a/phh-on-boot.sh +++ b/phh-on-boot.sh @@ -40,6 +40,15 @@ if [ "$vndk" = 27 ] && getprop init.svc.mediacodec |grep -q restarting;then mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail_vendor.so fi +if [ "$vndk" = 28 ] && getprop |grep init.svc | grep media |grep -q restarting;then + mount /system/lib64/vndk-27/libminijail.so /vendor/lib64/libminijail_vendor.so + mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail_vendor.so + mount /system/lib64/vndk-27/libminijail.so /system/lib64/vndk-28/libminijail.so + mount /system/lib/vndk-27/libminijail.so /system/lib/vndk-28/libminijail.so + mount /system/lib64/vndk-27/libminijail.so /vendor/lib64/libminijail.so + mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail.so +fi + #Clear looping services sleep 30 getprop | \ diff --git a/phh-on-data.sh b/phh-on-data.sh index 23506b7..55721ea 100644 --- a/phh-on-data.sh +++ b/phh-on-data.sh @@ -1,5 +1,8 @@ #!/system/bin/sh +vndk="$(getprop persist.sys.vndk)" +[ -z "$vndk" ] && vndk="$(getprop ro.vndk.version |grep -oE '^[0-9]+')" + if getprop persist.sys.phh.no_vendor_overlay |grep -q true;then for part in odm vendor;do mount /mnt/phh/empty_dir/ /$part/overlay @@ -20,4 +23,6 @@ if [ "$vndk" = 28 ] && getprop |grep init.svc | grep media |grep -q restarting;t mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail_vendor.so mount /system/lib64/vndk-27/libminijail.so /system/lib64/vndk-28/libminijail.so mount /system/lib/vndk-27/libminijail.so /system/lib/vndk-28/libminijail.so + mount /system/lib64/vndk-27/libminijail.so /vendor/lib64/libminijail.so + mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail.so fi