2018-05-14 15:04:27 +00:00
|
|
|
#!/system/bin/sh
|
|
|
|
|
2020-06-03 14:52:59 +00:00
|
|
|
vndk="$(getprop persist.sys.vndk)"
|
|
|
|
[ -z "$vndk" ] && vndk="$(getprop ro.vndk.version |grep -oE '^[0-9]+')"
|
|
|
|
|
2019-03-04 20:54:48 +00:00
|
|
|
[ "$(getprop vold.decrypt)" = "trigger_restart_min_framework" ] && exit 0
|
2019-09-16 15:41:30 +00:00
|
|
|
|
2019-10-20 19:51:32 +00:00
|
|
|
setprop ctl.start media.swcodec
|
|
|
|
|
2019-09-16 15:41:30 +00:00
|
|
|
for i in wpa p2p;do
|
|
|
|
if [ ! -f /data/misc/wifi/${i}_supplicant.conf ];then
|
|
|
|
cp /vendor/etc/wifi/wpa_supplicant.conf /data/misc/wifi/${i}_supplicant.conf
|
|
|
|
fi
|
|
|
|
chmod 0660 /data/misc/wifi/${i}_supplicant.conf
|
|
|
|
chown wifi:system /data/misc/wifi/${i}_supplicant.conf
|
|
|
|
done
|
|
|
|
|
2018-08-28 12:53:16 +00:00
|
|
|
if [ -f /vendor/bin/mtkmal ];then
|
2019-03-04 20:54:48 +00:00
|
|
|
if [ "$(getprop persist.mtk_ims_support)" = 1 ] || [ "$(getprop persist.mtk_epdg_support)" = 1 ];then
|
2018-08-28 12:53:16 +00:00
|
|
|
setprop persist.mtk_ims_support 0
|
|
|
|
setprop persist.mtk_epdg_support 0
|
|
|
|
reboot
|
|
|
|
fi
|
|
|
|
fi
|
2018-07-18 21:46:34 +00:00
|
|
|
|
2019-08-10 11:15:53 +00:00
|
|
|
if grep -qF android.hardware.boot /vendor/manifest.xml || grep -qF android.hardware.boot /vendor/etc/vintf/manifest.xml ;then
|
|
|
|
bootctl mark-boot-successful
|
|
|
|
fi
|
|
|
|
|
2019-08-10 11:16:40 +00:00
|
|
|
setprop ctl.restart sec-light-hal-2-0
|
2019-08-14 21:36:04 +00:00
|
|
|
if find /sys/firmware -name support_fod |grep -qE .;then
|
|
|
|
setprop ctl.restart vendor.fps_hal
|
|
|
|
fi
|
2019-08-10 11:16:40 +00:00
|
|
|
|
2020-05-18 21:02:05 +00:00
|
|
|
setprop ctl.stop storageproxyd
|
|
|
|
|
2020-06-03 14:52:59 +00:00
|
|
|
sleep 10
|
|
|
|
if [ "$vndk" = 27 ] && getprop init.svc.mediacodec |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
|
|
|
|
fi
|
|
|
|
|
2018-07-18 21:46:34 +00:00
|
|
|
#Clear looping services
|
2018-05-14 15:04:27 +00:00
|
|
|
sleep 30
|
|
|
|
getprop | \
|
|
|
|
grep restarting | \
|
|
|
|
sed -nE -e 's/\[([^]]*).*/\1/g' -e 's/init.svc.(.*)/\1/p' |
|
2019-03-04 20:54:48 +00:00
|
|
|
while read -r svc ;do
|
|
|
|
setprop ctl.stop "$svc"
|
2018-05-14 15:04:27 +00:00
|
|
|
done
|