-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
108 lines (101 loc) · 2.69 KB
/
install.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
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
#!/bin/sh
SKIPMOUNT=false
PROPFILE=true
POSTFSDATA=true
LATESTARTSERVICE=true
REPLACE="
"
# array / variabel
NAME="Celestial-Render-FlowX | Kzyo"
VERSION="1.1S"
ANDROIDVERSION=$(getprop ro.build.version.release)
DATE="Mon 11 Nov 2024"
DEVICES=$(getprop ro.product.board)
MANUFACTURER=$(getprop ro.product.manufacturer)
API=$(getprop ro.build.version.sdk)
# trimming
trim_partition () {
fstrim -v /system
sleep 0.1
fstrim -v /vendor
sleep 0.1
fstrim -v /data
sleep 0.1
fstrim -v /cache
sleep 0.1
fstrim -v /system
sleep 0.1
fstrim -v /vendor
sleep 0.1
fstrim -v /metadata
sleep 0.1
fstrim -v /odm
sleep 0.1
fstrim -v /system_ext
sleep 0.1
fstrim -v /product
sleep 0.1
fstrim -v /data
sleep 0.1
fstrim -v /cache
sleep 0.1
}
# delete trash & log by @Bias_khaliq
delete_trash_logs () {
# Clear trash on /data/data
for DIR in /data/data/*; do
if [ -d "${DIR}" ]; then
rm -rf ${DIR}/cache/*
rm -rf ${DIR}/no_backup/*
rm -rf ${DIR}/app_webview/*
rm -rf ${DIR}/code_cache/*
fi
done
# Delete Logs
rm -rf /data/{anr,log,tombstones,log_other_mode}/* \
/cache/*.{apk,tmp} \
/dev/log/* \
/data/system/{dropbox,usagestats,package_cache}/* \
/sys/kernel/debug/* \
/data/local/tmp* \
/data/dalvik-cache \
/data/media/0/{DCIM,Pictures,Music,Movies}/.thumbnails \
/data/media/0/{mtklog,MIUI/Gallery,MIUI/.debug_log,MIUI/BugReportCache} \
/data/vendor/thermal/{config,*.dump,*_history*.dump}
}
sleep 0.2
ui_print ""
ui_print "░█▀▀█ ── ░█▀▀█ ░█▀▀▀ ░█─── ░█──░█ ▀▄░▄▀
░█─── ▀▀ ░█▄▄▀ ░█▀▀▀ ░█─── ░█░█░█ ─░█──
░█▄▄█ ── ░█─░█ ░█─── ░█▄▄█ ░█▄▀▄█ ▄▀░▀▄"
ui_print ""
sleep 0.5
ui_print " improvements to the gpu."
ui_print ""
sleep 0.2
ui_print "***************************************"
ui_print "- Name : ${NAME}"
sleep 0.2
ui_print "- Version : ${VERSION}"
sleep 0.2
ui_print "- Android Version : ${ANDROIDVERSION}"
sleep 0.2
ui_print "- Build Date : ${DATE}"
sleep 0.2
ui_print "***************************************"
ui_print "- Devices : ${DEVICES}"
sleep 0.2
ui_print "- Manufacturer : ${MANUFACTURER}"
ui_print "***************************************"
sleep 0.2
ui_print "- Extracting module files"
sleep 2
unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2
ui_print "- Trimming up Partitions"
sleep 2
trim_partition &>/dev/null
sleep 0.5
ui_print "- Delete trash and logs"
delete_trash_logs
# Set permissions
set_perm_recursive $MODPATH 0 0 0755 0644