-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
253 lines (154 loc) · 9.19 KB
/
README.txt
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
*******************************************************************************
( ) (
)\ ) ( ( /( )\ ( (
(()/( ))\ )\())((_) ( )\))(
((_))/((_)((_)\ _ )\ ((_)()\
_| |(_)) | |(_)| |((_)_(()((_)
/ _` |/ -_) | '_ \| |/ _ \\ V V /
\__,_|\___| |_.__/|_|\___/ \_/\_/
*******************************************************************************
# Run {list} of apps to rm bloatware based on text list using adb
# Copyright 2014 queenTea (@queenTea4qnNet)
# usage: deblow {app list}
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version."
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details."
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
deblow
======
Script to remove bloatware based on an a list of apps. Uses ADB and CWM method.
======
Usage: deblow {app list}
======
Requirements:
1) Read the warnings below.
2) CWM Recovery w/ ADB
3) USB Drivers for your Phone
4) Rooted
5) Enable USB Debugging on phone
6) Connect to computer with ADB installed (see Initial setup for ADB install)
Warnings:
BACK UP YOUR PHONE FIRST. This stuff can screw up, protect yourself; you can never have too many backups.
Apps are removed from '/system/app/' folder on phone. Support for other file paths is planned but not yet supported.
REQUIRED READING: http://forum.xda-developers.com/showthread.php?t=1645301 This script is essentially an Ubuntu adaptation of the above process to remove unwanted apps from your phone, including bloatware that cannot easily be removed from the phone OS.
This script will not handle multiple devices on the adb server.
Was written/tested in Xubuntu 13.10.
======
Walkthrough:
* * * * * * * * * * * *
Initial Setup:
* * * * * * * * * * * *
If needed, install adb:
user@xubuntu:~/ sudo add-apt-repository ppa:phablet-team/tools
user@xubuntu:~/ sudo apt-get update
user@xubuntu:~/ sudo apt-get install android-tools-adb
1) Download or clone the git repository and extract it to a file, say '~/deblow' (any file names or paths referenced I will use throughout the walkthroughs, simply substitute your own values; any terminal commands will be prefixed with user@xubuntu:~$ and indented).
2) Ensure deblow has execution permission:
user@xubuntu:~/deblow$ sudo chmod 755 deblow.sh
(Optional) Add the deblow directory to your system path:
1) Open .bashrc using a text editor, in a terminal (ctrl+alt+t):
user@xubuntu:~/$ sudo cp ~/.bashrc ~/.bashrc.bkup
user@xubuntu:~/$ sudo nano ~/.bashrc
2) add 'export PATH=~/deblow:$PATH' to the bottom of the file then use 'ctrl+o' to save and 'ctrl+x' to exit.
3) Restart the terminal or enter
user@xubuntu:~/$ source ~/.bashrc
You should now be able to type use deblow from the CLI without specifying its path. You can verify by moving to your home directory and entering:
user@xubuntu:~/$ deblow
Which should return: 'usage: deblow {app list}'
* * * * * * * * * * * * * * * * * * * * *
Next: Move to Verify your device is connecting to adb:
* * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * *
Verify your device is connecting to adb:
* * * * * * * * * * * * * * * * * * * * *
1) Ensure your device is in USB debugging mode, plug it into your computer and if necessary authorize your computers fingerprint for USB Debugging.
2) Open a terminal and check adb's status:
user@xubuntu:~/$ adb devices
You should see something which ends with:
..
..
List of devices attached
******** device
This means adb is running and connected to your device.
3) Kill the adb server, we just want to check that we can connect but later we sections of this guide are written as though the server is not started. (I had some issues with adb and using server sessions when the device was unplugged and plugged back in, if you are having adb to device connection issues, try restarting adb 'adb kill-server; adb start-server' and try again.)
user@xubuntu:~/$ adb kill-server
* * * * * * * * * * * * * * * * * * * * * * * *
Next: Move to Using a premade list: or Creating your own list:
* * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * *
Using a premade list:
* * * * * * * * * * * *
1a) Copy From Other Source: Open a new text document and paste list into it. Each app to be removed should be on its own line, WITHOUT a path. Save the list as whatever you want, like bloatList. Its easiest to place in the same folder as deblow.sh but not required.
1b) If you have a list that already meets the above requirements, simply save it and remember where it is.
2) Ensure your device is in USB debugging mode, plug it into your computer and if necessary authorize your computers fingerprint for USB Debugging.
3) Open a terminal and navigate to deblow's home using one of these methods:
(3a): Start a terminal using "ctrl+alt+t"
user@xubuntu:~/$ cd ~/deblow
(3b): Open the folder in your File manager, hold shift and write click, then select 'Open Terminal Here'
NOTE: if you have added ~/deblow to your $PATH you do not need to be in the deblow directory, you will not need to be in ~/deblow nor preface the script name with '~/deblow/' or '../' however this walkthrough will continue as though this has not been completed.
* * * * * * * * * * * *
Next: Move to Running deblow
* * * * * * * * * * * *
* * * * * * * * * * * *
Creating your own list:
* * * * * * * * * * * *
1) Ensure your device is in USB debugging mode and plug it into your computer.
2) Open a terminal and check adb's status:
user@xubuntu:~/$ adb devices
3) Reboot to recovery:
user@xubuntu:~/$ adb reboot recovery
Your phone will reboot into Recovery mode, once it has, move to the next step:
4) Mount the file system using:
user@xubuntu:~/$ adb shell mount /system
5) List the installed apps and write the data to a text file and copy that file for our bloat list.
user@xubuntu:~/$ adb shell ls -1 /system/app/ > fullList
user@xubuntu:~/$ cp fullList bloatList
6) Open the list, and remove any entries you do not want to remove. Be very careful when assesing wether to keep or get rid of something, remember you can always freeze the app if you are unsure and remove it later if everything still functions as you need. When you are finished the list be sure it has one entry per line for each .app or .odex you want to remove, then save it.
7) Reboot your phone if you need to use it while setting up your list and kill the adb server:
user@xubuntu:~/$ adb reboot
user@xubuntu:~/$ adb kill-server
* * * * * * * * * * * *
Next: Move to Running deblow
* * * * * * * * * * * *
* * * * * * * * * * * *
Running Deblow:
* * * * * * * * * * * *
I am assuming that you have just completed either step 5 of "Using a premade list:" or step 7 of "Creating your own list:" This is where we are starting from:
- Our phone has CWM Recovery w/ ADB and has been backed up
- USB Drivers installed for your Phone
- Phone has been Rooted
- Enable USB Debugging on phone and permission
- Phone is on in normal functioning mode.
1) First, connect your phone to the PC
2) Start a terminal window using (ctrl+alt+t) and enter:
user@xubuntu:~/$ deblow bloatList
3) Follow the prompts on screen; you will need to answer yes to all the questions; except maybe the last:
Restart the server? Y
Reboot to recovery? Y
Mount system? Y
Reboot Phone? Y
4) If any errors occur, the error output from adb will be displayed in terminal. If you see no errors, congratulations, you've stopped your phone from blowing!
Thanks for using deblow!
* * * * * * * * * * * *
Bumps in the road:
* * * * * * * * * * * *
I found most of the issues I had while doing this for myself were solved by restarting the adb server:
user@xubuntu:~/$ adb kill-server
user@xubuntu:~/$ adb start-server
Problem: ADB sees device when it is in normal operation but does not once in CWM.
Solution: Change default permissions for SuperSU to 'Grant.' Be sure to change this back to your preferred setting when finished.
* * * * * * * * * * * *
Contact:
* * * * * * * * * * * *
Twitter: https://twitter.com/queenTea4qnNet
Github: https://github.com/msashlee