-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.sh
206 lines (167 loc) · 5.8 KB
/
setup.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#!/sbin/sh
###########################
# MMT Reborn Logic
###########################
############
# Config Vars
############
# Set this to true if you want to skip mount for your module
SKIPMOUNT="false"
# Set this to true if you want to clean old files in module before injecting new module
CLEANSERVICE="false"
# Set this to true if you want to load vskel after module info print. If you want to manually load it, consider using load_vksel function
AUTOVKSEL="true"
# Set this to true if you want store debug logs of installation
DEBUG="true"
############
# Replace List
############
# List all directories you want to directly replace in the system
# Construct your list in the following example format
REPLACE_EXAMPLE="
/system/app/Youtube
/system/priv-app/SystemUI
/system/priv-app/Settings
/system/framework
"
# Construct your own list here
REPLACE="
/system/priv-app/AsusLauncherDev
/system/priv-app/Lawnchair
/system/priv-app/NexusLauncherPrebuilt
/system/priv-app/Lawnicons
/system/product/priv-app/ParanoidQuickStep
/system/product/priv-app/ShadyQuickStep
/system/product/priv-app/TrebuchetQuickStep
/system/product/priv-app/NexusLauncherRelease
/system/product/overlay/PixelLauncherIconsOverlay
/system/system_ext/priv-app/NexusLauncherRelease
/system/system_ext/priv-app/TrebuchetQuickStep
/system/system_ext/priv-app/Lawnchair
/system/system_ext/priv-app/PixelLauncherRelease
/system/system_ext/priv-app/Launcher3QuickStep
/system/product/overlay/PixelLauncherIconsOverlay
/system/product/overlay/CustomPixelLauncherOverlay
/system/product/overlay/ThemedIconsOverlay.apk
/system/product/overlay/PixelLauncherIconsOverlay.apk
/system/product/overlay/CustomPixelLauncherOverlay.apk
"
############
# Permissions
############
# Set permissions
set_permissions() {
set_perm_recursive "$MODPATH" 0 0 0777 0777
set_perm_recursive "$MODPATH/system/product/overlay" 0 0 0777 0777
}
############
# Info Print
############
# Set what you want to be displayed on header of installation process
info_print() {
ui_print ""
ui_print "**********************************************"
ui_print "• Lawnchair Magisk"
ui_print "• By saitamasahil @github"
ui_print "**********************************************"
ui_print ""
sleep 2
}
############
# Main
############
# Change the logic to whatever you want
init_main() {
sdk_version=$(getprop ro.build.version.sdk)
if [ $sdk_version -eq 32 ]; then
rm -rf "$MODPATH/system/priv-app/Lawnchair/a13qpr.apk"
rm -rf "$MODPATH/system/priv-app/Lawnchair/a13qpr2.apk"
rm -rf "$MODPATH/system/product/overlay/QuickSwitchOverlay/QuickSwitchOverlay13.apk"
rm -rf "$MODPATH/system/etc/permissions/privapp-permissions-app.lawnchair.debug.xml"
rm -rf "$MODPATH/system/etc/sysconfig/app.lawnchair.debug-hiddenapi-package-whitelist.xml"
ui_print "The installation process of Lawnchair Magisk has been started!!"
elif [ $sdk_version -eq 33 ]; then
rm -rf "$MODPATH/system/priv-app/Lawnchair/a12.apk"
rm -rf "$MODPATH/system/product/overlay/QuickSwitchOverlay/QuickSwitchOverlay12.apk"
rm -rf "$MODPATH/system/etc/permissions/privapp-permissions-app.lawnchair.xml"
rm -rf "$MODPATH/system/etc/sysconfig/app.lawnchair-hiddenapi-package-whitelist.xml"
ui_print ""
ui_print "[*] Select your Android 13 version?"
ui_print "[*] Press volume up to switch to another choice"
ui_print "[*] Press volume down to continue with that choice"
ui_print ""
sleep 0.5
ui_print "--------------------------------"
ui_print "[1] Android 13/13 QPR(February security patch or below)"
ui_print "--------------------------------"
ui_print "[2] Android 13 QPR2(March security patch or above)"
ui_print "--------------------------------"
ui_print ""
ui_print "[*] Select your desired option:"
SM=1
while true; do
ui_print " $SM"
"$VKSEL" && SM="$((SM + 1))" || break
[[ "$SM" -gt "2" ]] && SM=1
done
case "$SM" in
"1") FCTEXTAD1="Android 13/13 QPR" ;;
"2") FCTEXTAD1="Android 13 QPR2" ;;
esac
ui_print "[*] Selected: $FCTEXTAD1"
ui_print ""
if [[ "$FCTEXTAD1" == "Android 13/13 QPR" ]]; then
rm -rf "$MODPATH/system/priv-app/Lawnchair/a13qpr2.apk"
elif [[ "$FCTEXTAD1" == "Android 13 QPR2" ]]; then
rm -rf "$MODPATH/system/priv-app/Lawnchair/a13qpr.apk"
fi
fi
ui_print ""
ui_print "[*] Do you want to install Lawnicons Manager App?"
ui_print "[*] Press volume up to switch to another choice"
ui_print "[*] Press volume down to continue with that choice"
ui_print ""
sleep 0.5
ui_print "--------------------------------"
ui_print "[1] Yes"
ui_print "--------------------------------"
ui_print "[2] No"
ui_print "--------------------------------"
ui_print ""
ui_print "[*] Select your desired option:"
SM=1
while true; do
ui_print " $SM"
"$VKSEL" && SM="$((SM + 1))" || break
[[ "$SM" -gt "2" ]] && SM=1
done
case "$SM" in
"1") FCTEXTAD1="Yes" ;;
"2") FCTEXTAD1="No" ;;
esac
ui_print "[*] Selected: $FCTEXTAD1"
ui_print ""
if [[ "$FCTEXTAD1" == "Yes" ]]; then
:
elif [[ "$FCTEXTAD1" == "No" ]]; then
rm -rf "$MODPATH/system/priv-app/Lawniconsbak"
rm -rf "$MODPATH/system/priv-app/LawniconsManager"
rm -rf "$MODPATH/system/etc/permissions/privapp-permissions-app.lawnchair.lawnicons.xml"
rm -rf "$MODPATH/system/etc/permissions/privapp-permissions-com.saitama.liarach.lawnmagisk.xml"
fi
ui_print "[*] Clearing system cache to properly make it work..."
ui_print ""
rm -rf "/data/system/package_cache"
sleep 0.5
ui_print "[*] Done!"
ui_print ""
sleep 0.5
ui_print " --- Notes --- "
ui_print ""
ui_print "[*] Reboot is required"
ui_print ""
ui_print "[*] Report issues to @fileschat on Telegram"
ui_print ""
ui_print "[*] You can find me at @saitama_96 on Telegram for direct support"
sleep 2
}