Pierre-Hugues Husson | 6eaf501 | 2018-05-14 17:04:27 +0200 | [diff] [blame] | 1 | #!/system/bin/sh |
| 2 | |
Pierre-Hugues Husson | 26bc3e7 | 2018-08-29 20:36:21 +0200 | [diff] [blame] | 3 | [ "$(getprop vold.decrypt)" == "trigger_restart_min_framework" ] && exit 0 |
| 4 | |
Aren Clegg | d6aa959 | 2018-08-05 01:36:48 +0000 | [diff] [blame] | 5 | if [ "$(getprop ro.vendor.product.device)" == "HWBKL" ];then |
| 6 | phh-su -c 'mount -o remount,rw /system' |
Aren Clegg | 72325ce | 2018-08-05 07:04:03 +0000 | [diff] [blame] | 7 | phh-su -c 'pm uninstall --user 0 com.android.camera2' |
Aren Clegg | d6aa959 | 2018-08-05 01:36:48 +0000 | [diff] [blame] | 8 | phh-su -c 'mount -o remount,ro /system' |
| 9 | else |
| 10 | phh-su -c 'mount -o remount,rw /system' |
Aren Clegg | 72325ce | 2018-08-05 07:04:03 +0000 | [diff] [blame] | 11 | phh-su -c 'pm uninstall --user 0 com.huawei.camera' |
Aren Clegg | d6aa959 | 2018-08-05 01:36:48 +0000 | [diff] [blame] | 12 | phh-su -c 'mount -o remount,ro /system' |
| 13 | fi |
| 14 | |
Pierre-Hugues Husson | d50cffe | 2018-08-28 14:53:16 +0200 | [diff] [blame] | 15 | if [ -f /vendor/bin/mtkmal ];then |
Pierre-Hugues Husson | 26bc3e7 | 2018-08-29 20:36:21 +0200 | [diff] [blame] | 16 | if [ "$(getprop persist.mtk_ims_support)" == 1 -o "$(getprop persist.mtk_epdg_support)" == 1 ];then |
Pierre-Hugues Husson | d50cffe | 2018-08-28 14:53:16 +0200 | [diff] [blame] | 17 | setprop persist.mtk_ims_support 0 |
| 18 | setprop persist.mtk_epdg_support 0 |
| 19 | reboot |
| 20 | fi |
| 21 | fi |
| 22 | |
Pierre-Hugues Husson | aea1926 | 2018-07-18 23:46:34 +0200 | [diff] [blame] | 23 | #Clear looping services |
Pierre-Hugues Husson | 6eaf501 | 2018-05-14 17:04:27 +0200 | [diff] [blame] | 24 | sleep 30 |
| 25 | getprop | \ |
| 26 | grep restarting | \ |
| 27 | sed -nE -e 's/\[([^]]*).*/\1/g' -e 's/init.svc.(.*)/\1/p' | |
| 28 | while read svc ;do |
| 29 | setprop ctl.stop $svc |
| 30 | done |
Pierre-Hugues Husson | ca0ed80 | 2018-08-22 11:01:43 +0200 | [diff] [blame] | 31 | |
| 32 | if grep -qF android.hardware.boot /vendor/manifest.xml;then |
| 33 | bootctl mark-boot-successful |
| 34 | fi |