-
Notifications
You must be signed in to change notification settings - Fork 0
/
debloat.sh
158 lines (126 loc) · 6.97 KB
/
debloat.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
#!/bin/bash
# Version 1.1
# Author: [Saksham Shekher]
# Check if device is connected
adb devices >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Please connect your device via USB."
exit 1
fi
echo ""
echo "================================================================="
echo " Debloating Realme device (Version 1.1) "
echo "================================================================="
echo "Author: [Saksham Shekher] "
echo "Warning: Debloat at your own risk! "
echo ""
debloat_realme_apps() {
echo ""
echo "Uninstalling Assistant Screen..."
adb shell pm uninstall --user 0 com.coloros.assistantscreen
echo "Uninstalling OCR Scanner..."
adb shell pm uninstall --user 0 com.coloros.ocrscanner
echo "Uninstalling Smart Drive..."
adb shell pm uninstall --user 0 com.coloros.smartdrive
echo "Uninstalling Sound Recorder..."
adb shell pm uninstall --user 0 com.coloros.soundrecorder
echo "Uninstalling Video Player..."
adb shell pm uninstall --user 0 com.coloros.video
echo ""
echo "================================================================="
echo " Realme apps debloated. "
echo "================================================================="
echo ""
}
debloat_google_apps() {
echo ""
echo "Uninstalling Google Duo..."
adb shell pm uninstall --user 0 com.google.android.apps.tachyon
echo "Uninstalling Google Play Music..."
adb shell pm uninstall --user 0 com.google.android.music
echo "Uninstalling Google Play Movies..."
adb shell pm uninstall --user 0 com.google.android.videos
echo "Uninstalling Google Play Books..."
adb shell pm uninstall --user 0 com.google.android.apps.books
echo "Uninstalling YouTube..."
adb shell pm uninstall --user 0 com.google.android.youtube
echo "Uninstalling Podcast..."
adb shell pm uninstall --user 0 com.google.android.apps.podcasts
echo "Uninstalling Youtube Music..."
adb shell pm uninstall --user 0 com.google.android.apps.youtube.music
echo "Uninstalling Files By Google..."
adb shell pm uninstall --user 0 com.google.android.apps.nbu.files
echo "Uninstalling AR Core..."
adb shell pm uninstall --user 0 com.google.ar.core
echo "Uninstalling Print Service Component..."
adb shell pm uninstall --user 0 com.google.android.printservice.recommendation
echo "Uninstalling Google Lens..."
adb shell pm uninstall --user 0 com.google.ar.lens
echo "Uninstalling Google Drive..."
adb shell pm uninstall --user 0 com.google.android.apps.docs
echo "Uninstalling Google Photos..."
adb shell pm uninstall --user 0 com.google.android.apps.photos
echo "Uninstalling Google Feedback..."
adb shell pm uninstall --user 0 com.google.android.feedback
echo "Uninstalling Android Auto..."
adb shell pm uninstall --user 0 com.google.android.projection.gearhead
echo ""
echo "================================================================="
echo " Google apps debloated. "
echo "================================================================="
echo ""
}
rebloat_realme_apps() {
echo ""
echo "Re-bloating Realme apps..."
adb shell cmd package install-existing
echo ""
echo "================================================================="
echo " Realme apps rebloated. "
echo "================================================================="
echo ""
}
list_installed_apps() {
echo ""
echo "Listing installed applications..."
adb shell pm list packages -f
echo ""
echo "================================================================="
echo " Installed applications listed. "
echo "================================================================="
echo ""
}
option=""
while [ $option != "0" ]
do
echo ╔═════════════════════════════════════════════════════════════╗
echo ║ ║
echo ║ __ __ ______ __ __ __ __ ║
echo ║ /\ "-./ \ /\ ___\ /\ "-.\ \ /\ \/\ \ ║
echo ║ \ \ \-./\ \ \ \ __\ \ \ \-. \ \ \ \_\ \ ║
echo ║ \ \_\ \ \_\ \ \_____\ \ \_\\"\_\ \ \_____\ ║
echo ║ \/_/ \/_/ \/_____/ \/_/ \/_/ \/_____/ ║
echo ║ ║
echo ║ ║
echo ║═════════════════════════════════════════════════════════════║
echo ║ 1 = Debloat Realme Apps ║
echo ║————————————————————————————————————————————————————————————————————————║
echo ║ 2 = Debloat Google Apps ║
echo ║————————————————————————————————————————————————————————————————————————║
echo ║ 3 = Re-bloat Realme ║
echo ║————————————————————————————————————————————————————————————————————————║
echo ║ 4 = List installed applications. ║
echo ║————————————————————————————————————————————————————————————————————————║
echo ║ 0 = Exit. ║ ║
echo ╚═════════════════════════════════════════════════════════════╝
echo ""
read -p "Enter an option: " option
case $option in
"1") debloat_realme_apps;;
"2") debloat_google_apps;;
"3") rebloat_realme_apps;;
"4") list_installed_apps;;
"0") echo ""; echo "Exiting..."; echo ""; break;;
*) echo "Invalid option. Please try again.";;
esac
done