2020-04-04 22:55:24 +00:00
|
|
|
#!/system/bin/sh
|
|
|
|
|
2020-06-17 14:34:17 +00:00
|
|
|
vndk="$(getprop persist.sys.vndk)"
|
|
|
|
[ -z "$vndk" ] && vndk="$(getprop ro.vndk.version |grep -oE '^[0-9]+')"
|
|
|
|
|
2020-04-04 22:55:24 +00:00
|
|
|
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
|
|
|
|
done
|
|
|
|
fi
|
2020-05-03 16:01:26 +00:00
|
|
|
|
|
|
|
if getprop persist.sys.phh.caf.media_profile |grep -q true;then
|
|
|
|
setprop media.settings.xml "/vendor/etc/media_profiles_vendor.xml"
|
|
|
|
fi
|
2020-06-03 18:21:50 +00:00
|
|
|
|
2020-06-18 18:24:21 +00:00
|
|
|
crashingProcess=$(getprop ro.init.updatable_crashing_process_name |grep media)
|
|
|
|
if [ "$vndk" = 27 ] && ( getprop init.svc.mediacodec |grep -q restarting || [ -n "$crashingProcess" ] );then
|
2020-06-03 18:21:50 +00:00
|
|
|
mount /system/lib64/vndk-27/libminijail.so /vendor/lib64/libminijail_vendor.so
|
|
|
|
mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail_vendor.so
|
|
|
|
fi
|
2020-06-06 17:32:38 +00:00
|
|
|
|
2020-06-18 18:24:21 +00:00
|
|
|
if [ "$vndk" = 28 ] && ( getprop |grep init.svc | grep media |grep -q restarting || [ -n "$crashingProcess" ] );then
|
2020-06-06 17:32:38 +00:00
|
|
|
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
|
2020-06-17 14:34:17 +00:00
|
|
|
mount /system/lib64/vndk-27/libminijail.so /vendor/lib64/libminijail.so
|
|
|
|
mount /system/lib/vndk-27/libminijail.so /vendor/lib/libminijail.so
|
2020-06-06 17:32:38 +00:00
|
|
|
fi
|