-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomize.sh
More file actions
130 lines (116 loc) · 3.48 KB
/
customize.sh
File metadata and controls
130 lines (116 loc) · 3.48 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/system/bin/sh
# Module and log directory paths
MODDIR="${0%/*}"
LOG_DIR="/data/adb/netblock"
INSTALL_LOG="$LOG_DIR/Installation.log"
MEOW="/data/adb/modules/netblock"
SRC="/data/adb/modules_update/netblock/module.prop"
DEST="$MEOW/module.prop"
# Create log directory if it doesn't exist
mkdir -p "$LOG_DIR" || true
mkdir -p "$MEOW"
# Logger
debug() {
echo "$1" | tee -a "$INSTALL_LOG"
}
# Module info variables
MODNAME=$(grep_prop name $TMPDIR/module.prop)
MODVER=$(grep_prop version $TMPDIR/module.prop)
AUTHOR=$(grep_prop author $TMPDIR/module.prop)
TIME=$(date "+%d, %b - %H:%M %Z")
# Gather system information
BRAND=$(getprop ro.product.brand)
MODEL=$(getprop ro.product.model)
DEVICE=$(getprop ro.product.device)
ANDROID=$(getprop ro.system.build.version.release)
SDK=$(getprop ro.system.build.version.sdk)
ARCH=$(getprop ro.product.cpu.abi)
BUILD_DATE=$(getprop ro.system.build.date)
ROM_TYPE=$(getprop ro.system.build.type)
SDK=$(getprop ro.build.version.sdk)
SE=$(getenforce)
# Display module details
display_header() {
debug
debug "========================================="
debug " Module Information "
debug "========================================="
debug " ✦ Module Name : $MODNAME"
debug " ✦ Version : $MODVER"
debug " ✦ Author : $AUTHOR"
debug " ✦ Started at : $TIME"
debug "_________________________________________"
debug
debug
debug
}
# Verify module integrity
check_integrity() {
debug "========================================="
debug " Meow Installer "
debug "========================================="
debug " ✦ Verifying Module Integrity "
if [ -n "$ZIPFILE" ] && [ -f "$ZIPFILE" ]; then
if [ -f "$MODPATH/verify.sh" ]; then
if sh "$MODPATH/verify.sh"; then
debug " ✦ Module integrity verified." > /dev/null 2>&1
else
debug " ✘ Module integrity check failed!"
exit 1
fi
else
debug " ✘ Missing verification script!"
exit 1
fi
fi
}
# Handle module prop file
handle_module_props() {
debug " ✦ Handling Module Properties "
touch "$MEOW/update"
cp "$SRC" "$DEST"
}
# Gather additional system info
gather_system_info() {
debug "========================================="
debug " Gathering System Info "
debug "========================================="
debug " ✦ Device Brand : $BRAND"
debug " ✦ Device Model : $MODEL"
debug " ✦ Android Version: $ANDROID (SDK $SDK)"
debug " ✦ Architecture : $ARCH"
debug " ✦ SELinux Status : $SE"
debug " ✦ ROM Type : $ROM_TYPE"
debug " ✦ Build Date : $BUILD_DATE"
debug "_________________________________________"
debug
debug
debug
}
# Release the source
release_source() {
[ -f "/sdcard/meow" ] && return 0
nohup am start -a android.intent.action.VIEW -d "https://t.me/MeowDump" > /dev/null 2>&1 &
}
# Final footer message
display_footer() {
debug "_________________________________________"
debug
debug " Installation Completed "
debug " This module was released by 𝗠𝗘𝗢𝗪 𝗗𝗨𝗠𝗣"
debug
debug
}
# Main installation flow
install_module() {
display_header
gather_system_info
check_integrity
handle_module_props
release_source
display_footer
}
# Start the installation process
install_module
touch "/sdcard/meow"
exit 0