File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ MODULE_DIR=" /data/adb/modules/YetAnotherBootloopProtector"
2+ SYSTEMUI_MONITOR_DISABLE=" /data/adb/systemui.monitor.disable"
3+ MODULE_PROP=" $MODULE_DIR /module.prop"
4+ REQUIRED_FILES=" \
5+ $MODULE_DIR /action.sh \
6+ $MODULE_DIR /service.sh \
7+ $MODULE_DIR /post-fs-data.sh \
8+ $MODULE_DIR /uninstall.sh"
9+
10+ for file in $REQUIRED_FILES ; do
11+ if [ ! -f " $file " ]; then
12+ sed -i ' /^description=/d' " $MODULE_PROP "
13+ echo " description= Module is corrupted. Please reinstall." >> " $MODULE_PROP "
14+ exit 0
15+ fi
16+ done
17+
18+ if [ -f " $SYSTEMUI_MONITOR_DISABLE " ] && [ -f " $MODULE_DIR /disable" ]; then
19+ sed -i ' /^description=/d' " $MODULE_PROP "
20+ echo " description= SystemUI Monitor ❌ | Bootloop Monitor ❌ | Module is enabled ❌" >> " $MODULE_PROP "
21+ elif [ -f " $SYSTEMUI_MONITOR_DISABLE " ]; then
22+ sed -i ' /^description=/d' " $MODULE_PROP "
23+ echo " description= SystemUI Monitor ❌ | Bootloop Monitor ✅ | Module is enabled? ✅" >> " $MODULE_PROP "
24+ else
25+ sed -i ' /^description=/d' " $MODULE_PROP "
26+ echo " description= SystemUI Monitor ✅ | Bootloop Monitor ✅ | module is enabled? ✅" >> " $MODULE_PROP "
27+ fi
You can’t perform that action at this time.
0 commit comments