-
Notifications
You must be signed in to change notification settings - Fork 38
/
customize_setup.sh
152 lines (127 loc) · 4.91 KB
/
customize_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
#!/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="false"
############
# Permissions
############
# Set permissions
set_permissions() {
set_perm_recursive "$MODPATH" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/app/PixelThemesStub2022_and_newer" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/app/ThemesStub" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/etc/default-permissions" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/etc/permissions" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/etc/sysconfig" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/overlay" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/overlay/PixelLauncherModsOverlay" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/overlay/PixelRecentsProvider" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/overlay/ThemedIconsOverlay" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/priv-app/ExtendedSettings" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/priv-app/IconShapeChanger" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/priv-app/NexusLauncherRelease" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/priv-app/PixelLauncherDT2S" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/priv-app/PixelLauncherMods" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/product/priv-app/PixelLauncherMods/lib/arm64" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/system_ext/etc/permissions" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/system_ext/priv-app/QuickAccessWallet" 0 0 0777 0755
set_perm_recursive "$MODPATH/system/system_ext/priv-app/WallpaperPickerGoogleRelease" 0 0 0777 0755
}
############
# Info Print
############
# Set what you want to be displayed on header of installation process
info_print() {
# Get the Android SDK version
sdk_version=$(getprop ro.build.version.sdk)
# Check if the SDK version is 32 or below
if [[ $sdk_version -le 32 ]]; then
# Fail the script immediately
echo "Error: Unsupported SDK version ($sdk_version)"
exit 1
fi
ui_print ""
ui_print "**********************************************"
ui_print "• Pixel Launcher Extended"
ui_print "• By TeamFiles"
ui_print "**********************************************"
ui_print ""
sleep 2
}
############
# 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/product/priv-app/ParanoidQuickStep
/system/product/priv-app/ShadyQuickStep
/system/product/priv-app/TrebuchetQuickStep
/system/product/priv-app/NexusLauncherRelease
/system/product/overlay/PixelLauncherIconsOverlay
/system/product/overlay/CustomPixelLauncherOverlay
/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/system_ext/priv-app/Launcher3QuickStepGoogle
/system/system_ext/priv-app/Launcher3QuickStepMock
/system/system_ext/priv-app/ArrowLauncher
/system/system_ext/priv-app/WallpaperPickerGoogleRelease
/system/product/overlay/ThemedIconsOverlay.apk
/system/product/overlay/PixelLauncherIconsOverlay.apk
/system/product/overlay/CustomPixelLauncherOverlay.apk
/system/product/overlay/MiuiCameraOverlay/MiuiCameraOverlay.apk
/system/product/overlay/MiuiGalleryOverlay/MiuiGalleryOverlay.apk
"
############
# Main
############
# Change the logic to whatever you want
init_main() {
ui_print ""
ui_print "[*] Installing..."
ui_print ""
sleep 0.5
ui_print ""
ui_print "Finished Installing Pixel Launcher Extended"
ui_print "[*] Clearing system cache to make it work properly..."
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 "[*] Make sure to read Documentation Properly on Github"
ui_print "if you wanna enable Double Tap To Sleep Feature"
ui_print ""
ui_print "[*] Report issues to @fileschat on Telegram"
sleep 2
touch "$MODPATH/first"
}