Like many around here, I had a Droid 1 and loved it. Vanilla Android, little to no Bloat, it was great. Then, a couple weeks ago, I "upgraded" to the Droid 2 Global which like the Droid X and standard Droid 2, is full of tons of extra system apps, and, unlike the original Droid, not vanilla Android. While some of this bloatware runs constantly using both battery and memory I really just don't like a cluttered app drawer.
After rooting there are a few options for getting rid of the extra apps (bloatware) some of which are discussed in depth Here but basically they include Renaming the Apk's (with terminal or Root Explorer), Freezing them (with Titanium Backup), or installing a completely custom rom. Whatever you do, don't delete them!
Whichever option you go with, in order to get system updates (pushed by Verizon) all that bloatware needs to be put back. Since this can be time consuming (especially if using a manual method like root explorer or typing terminal commands) I thought it might be fun to build a script to automate the process of renaming apk's that I don't use. This way, when the next update comes, it is easy to get the apk's back.
After searching around these forums, I found very little clear cut info on writing a script from scratch. I did find a script to mount system as writable and used that as a base (Here). After a little trial and error, I was finally able to write a working script that will automatically remove and/or replace the following apps:
com.vzw.hss.myverizon-2.apk (this one is in /data/app not /system/app like the others)
- If you are running Fission or some other custom rom, you do not need this script, it is only useful to those that want the stock rom without bloatware.
- You must take responsibility for your own actions. There is always some inherent risk in messing with /system files, if you don't accept that risk, don't mess with your phone.
- You must have root, the easiest method is z4root, found here:[APP] z4root - xda-developers
- You must have access to Clockwork Recovery/Droid 2 Bootstrapper and make a nandroid backup, Discussed in depth here: Creating and Restoring Backups - Complete Guide
- The Terminal script and Update.zip script will rename all ".bak" files in /system/app to ".apk", that means that if you manually renamed bloatware not included in this script to ".bak", it will get put back as well.
Discussed below are three methods of installing and executing scripts, choose one. Each method just executes a script that renames the bloatware.
Getting rid of the bloatware the easy way
(Executing the scripts as an Update.zip. This Update.zip does not add or delete any files, it just runs a script to rename the files. Essentially the same as manually renaming with terminal, root explorer or freezing with Titanium Backup.)
Step 1: Download the zip file at the end of this excessively long post. (Moto_Bloat_Update.zip)
Step 2: Mount up you're phone and copy the zip files to your sdcard, when done, unplug your phone from the computer. (or download the file directly to your phone and copy it from /sdcard/downloads to /sdcard
Step 3: Reboot into Clockwork Recovery.
Step 4: To remove the bloatware choose "Install zip from sdcard", then pick "choose zip from sdcard", choose "Moto_Bloat_Update.zip", then choose "Yes - Install Moto_Bloat_Update.zip."
Step 5: When finished, it will say done. Back out to the main menu and, Reboot your phone.
When your phone reboots the bloat will be gone (it has just been renamed to .bak)
Returning The Bloatware
Reboot into Clockwork Recovery and Install "Moto_Bloat_Update.zip" again.
When you reboot, all the bloatware will be back.
Or type the following terminal commands (hitting enter after each line):
Alternate Method 1 - Terminal EmulatorCode:$su #bloat -add
(Executing the scripts using Terminal Emulator, For a slightly easier method, skip down to "Alternate Method 2")
A brief script making tutorial
Step 1: If your using a Mac or Linux machine the basic text editors should be fine. If your using Windows (like me) both notepad and wordpad were adding charaters and screwing the scripts up so you'll need to download something like Jedit. Found HERE
Step 2: For a little bit of script basics read this article It will at least give you the basics but not all of it applies to Android.
Step 3: Open up jedit and choose make new script (or use your favorite text editor if using Mac or Linux) . The very first line tells the script how it is to be executed. I started mine with "#!/system/bin/busybox sh" but another option would be "#!/system/bin/sh" or if you've installed bash then "#!/system/bin/bash"
Step 4: Tell the script to do something like "mv /system/app/Blockbuster.apk /system/app/Blockbuster.bak" Now the whole thing should look something like this:
Code:#!/system/bin/busybox sh mv /system/app/Blockbuster.apk /system/app/Blockbuster.bak
All this will do is rename the Blockbuster app to something that Android doesn't recognize rendering it useless. Pretty simple really, standard terminal commands, although this simple script above wont work unless the system is mounted as Read-Write.
Some very basic terminal commands include:
mv = move (this one is also used for renaming)
cp = copy
rm = remove
The attached script (bloat.txt) is similar but it starts with a line to mount the system as Read-Write and then ends with a line to put the system back to Read-Only. It also has two options, one to remove the bloatware and one to put it all back when it comes time to update.
bloat -rm removes the bloatware listed above (changes their extension from .apk to .bak)
bloat -add puts all the bloatware back (changes their extension back to .apk)
Installing the script
Step 5: Save the script without an extension (or download the attached bloat.txt file and rename it to "bloat").
Step 6: Mount up you're phone and copy the script to your sdcard, when done, unplug your phone from the computer.
Step 7: Install Terminal Emulator from the Market
Step 8: Open Terminal emulator
Step 9: Type the following commands, hitting enter after typing each line (if this is your first time using terminal emulator, Superuser.apk will ask for permissions after typing "su" and hitting enter. Choose allow, and if you wish, check the box "remember").
Step 10: Reboot Phone (not required but some apps won't get out of the drawer until you do)Code:su busybox mount -o rw,remount /system cp /sdcard/bloat /system/xbin/bloat chmod 755 /system/xbin/bloat busybox mount -o ro,remount /system sync bloat -rm
Congratulations the bloatware is now gone!
Putting the bloatware back
Now that the script is installed, the bloatware can easily be put back by doing the following:
Open terminal emulator
Log in as "su"
type "bloat -add" and press enter.
Reboot and everything will be back to normal
Again, I made this for my personal use to remove the apps that I don't find useful. Since I couldn't find much on scripts (especially relating to the Droid 2 Global) I thought this might be useful to others. Good Luck! View the script in a text editor if you want to see exactly what it is doing.
Alternate Method 2 - Gscript Lite
(Executing scripts using Gscript Lite)
Another way of executing script without terminal commands is by using GScript Lite (Available in the market for free). This program uses modified scripts and executes them in a convenient GUI. This option requires two scripts, one to remove the bloat and a second to put it all back.
Installing a Script for use with Gscript Lite
A typical script begins with a line to tell the terminal how to execute the script. Gscript automatically includes this line, so it should not be included in the script, and therefore requires a slightly modified script. Like method one, a nandroid backup is a very good idea, and I strongly recommend making one prior to making any changes to the /system folder.
Step 1: Download "Remove Bloatware.txt" and "Put Bloatware Back.txt". Change the extension of each file to ".sh", they should now be "Remove Bloatware.sh" and "Put Bloatware Back.sh"
Step 2: Download and install Gscript Lite from the Android Market. Open Gscript Lite.
Step 3: Mount up your phone and copy both files to your sdcard. They need to go in the "/sdcard/gscript" folder, when done, unplug your phone from the computer.
Step 4: Open Gscript Lite.
Step 5: Press the Menu Button and Choose "Add Script", you can now create your own script or "load" a previously created script.
Step 6: Press "Load" and you will be presented with a list of available scripts to load. This list loads from the "/sdcard/gscript" folder.
Step 7: Press "Remove Bloatware.sh", this will take you back to the previous screen. The name should be filled in as should the body of the script.
Step 8: Make sure the "su" checkbox is checked and press "Save"
Step 9: Repeat steps 5 - 8 for "Put Bloatware Back.sh"
Step 10: Now, to remove the bloatware simply press the button in Gscript Lite labeled "Remove Bloatware"
Step 11: Reboot Phone (not required but some apps won't get out of the drawer until you do)
Putting the bloatware back
Step 1: Open Gscript Lite.
Step 2: Press "Put Bloatware Back"
Step 3: Reboot and everything will be back to normal