-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomize.sh
More file actions
executable file
·48 lines (38 loc) · 1.12 KB
/
customize.sh
File metadata and controls
executable file
·48 lines (38 loc) · 1.12 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
#!/system/bin/sh
##########################################################################################
# FastCharge Next - Customize Script
##########################################################################################
# Magisk UI print
ui_print() { echo "$1"; }
MODID="fastcharge-next"
MODDIR="/data/adb/modules/$MODID"
PERSIST="/data/adb/$MODID"
CFG_FILE="$PERSIST/config.prop"
ui_print "- Setting up FastCharge Next..."
mkdir -p "$PERSIST" 2>/dev/null
chmod 755 "$PERSIST" 2>/dev/null
# Ensure module directory exists
if [ ! -d "$MODDIR" ]; then
mkdir -p "$MODDIR" 2>/dev/null
ui_print "- Created module directory"
fi
# Create default config if not exists
if [ ! -f "$CFG_FILE" ]; then
cat > "$CFG_FILE" <<'EOF'
ENABLE=1
TARGET_PATH=
DEFAULT_CURRENT=500000
FAST_CURRENT=1000000
POLL_NORMAL=5
POLL_FAST=1
THERMAL_LIMIT=45000
LOG_FILE=/data/adb/fastcharge-next/fastcharge.log
LOG_MAX_KB=128
EOF
ui_print "- Default config created"
else
ui_print "- Config already exists (preserved)"
fi
# Set proper permissions (important)
chmod 0644 "$CFG_FILE" 2>/dev/null
ui_print "- Installation setup complete"