9d438701da
Lights HAL doesn't work on Snapdragon Samsun S10 series for an unknown reason when started too early, and we don't control its start time. So just restart it later.
26 lines
743 B
Bash
26 lines
743 B
Bash
#!/system/bin/sh
|
|
|
|
[ "$(getprop vold.decrypt)" = "trigger_restart_min_framework" ] && exit 0
|
|
if [ -f /vendor/bin/mtkmal ];then
|
|
if [ "$(getprop persist.mtk_ims_support)" = 1 ] || [ "$(getprop persist.mtk_epdg_support)" = 1 ];then
|
|
setprop persist.mtk_ims_support 0
|
|
setprop persist.mtk_epdg_support 0
|
|
reboot
|
|
fi
|
|
fi
|
|
|
|
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
|
|
|
|
setprop ctl.restart sec-light-hal-2-0
|
|
|
|
#Clear looping services
|
|
sleep 30
|
|
getprop | \
|
|
grep restarting | \
|
|
sed -nE -e 's/\[([^]]*).*/\1/g' -e 's/init.svc.(.*)/\1/p' |
|
|
while read -r svc ;do
|
|
setprop ctl.stop "$svc"
|
|
done
|