-
Notifications
You must be signed in to change notification settings - Fork 0
/
customize.sh
38 lines (30 loc) · 1.25 KB
/
customize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
if [ "$BOOTMODE" != true ]; then
ui_print "-----------------------------------------------------------"
ui_print "! Please install in Magisk Manager or KernelSU Manager or APatch Manager"
ui_print "! Install from recovery is NOT supported"
abort "-----------------------------------------------------------"
fi
cronDataDir='/data/adb/crond'
crontabCmd="${MODPATH}/system/xbin/crontab"
if [ ! -d ${cronDataDir} ];then
ui_print "mkdir ${cronDataDir}"
mkdir -p ${cronDataDir}
touch ${cronDataDir}/root
fi
ui_print "- Installed crontab cmd to ${crontabCmd}"
echo '#!/system/bin/sh' >${crontabCmd}
if [ "$KSU" = true ]; then
ui_print "- kernelSU version: $KSU_VER ($KSU_VER_CODE)"
echo '/data/adb/ksu/bin/busybox crontab -c '${cronDataDir}' $@' >> ${crontabCmd}
elif [ "$APATCH" = true ]; then
ui_print "- APatch version: $APATCH_VER ($APATCH_VER_CODE)"
echo '/data/adb/ap/bin/busybox crontab -c '${cronDataDir}' $@' >> ${crontabCmd}
else
ui_print "- Magisk version: $MAGISK_VER ($MAGISK_VER_CODE)"
echo '/data/adb/magisk/bin/busybox crontab -c '${cronDataDir}' $@' >> ${crontabCmd}
fi
ui_print "set_perm"
set_perm ${crontabCmd} 0 0 0755
set_perm $MODPATH/service.sh 0 0 0755
set_perm $MODPATH/uninstall.sh 0 0 0755
ui_print "done"