generated from symbuzzer/MMT-Extended-Next
-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathcustomize.sh
More file actions
executable file
·24 lines (21 loc) · 1.01 KB
/
customize.sh
File metadata and controls
executable file
·24 lines (21 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH
# prevent installation on magic mount managers
# this will not work since on magic mount, /data/adb/modules is not ext4
# and cannot be used as an overlay source due to native casefolding (ovl_dentry_weird)
# if user is on sdcardfs, it can work. here we perform this check.
if ! grep -q sdcardfs /proc/filesystems >/dev/null 2>&1; then
# test for magic mount
if [ "$KSU_MAGIC_MOUNT" = "true" ] || [ "$APATCH_BIND_MOUNT" = "true" ] || { [ -f /data/adb/magisk/magisk ] && [ -z "$KSU" ] && [ -z "$APATCH" ]; }; then
ui_print '[!] This module is not compatible to magic mount managers!'
abort "Tip: Enable OverlayFS in Managers settings"
fi
fi
mkdir -p "$MODPATH/system/etc"
busybox chcon --reference "/system" "$MODPATH/system"
cat /system/etc/hosts > "$MODPATH/system/etc/hosts"
busybox chcon --reference "/system/etc/hosts" "$MODPATH/system/etc/hosts"
chmod 644 "$MODPATH/system/etc/hosts"
mkdir "$MODPATH/worker"
touch "$MODPATH/skip_mount"
# EOF