device_phh_treble/phh-on-boot.sh

24 lines
632 B
Bash
Raw Permalink Normal View History

#!/system/bin/sh
2018-08-29 18:36:21 +00:00
[ "$(getprop vold.decrypt)" == "trigger_restart_min_framework" ] && exit 0
if [ -f /vendor/bin/mtkmal ];then
2018-08-29 18:36:21 +00:00
if [ "$(getprop persist.mtk_ims_support)" == 1 -o "$(getprop persist.mtk_epdg_support)" == 1 ];then
setprop persist.mtk_ims_support 0
setprop persist.mtk_epdg_support 0
reboot
fi
fi
#Clear looping services
sleep 30
getprop | \
grep restarting | \
sed -nE -e 's/\[([^]]*).*/\1/g' -e 's/init.svc.(.*)/\1/p' |
while read svc ;do
setprop ctl.stop $svc
done
if grep -qF android.hardware.boot /vendor/manifest.xml;then
bootctl mark-boot-successful
fi