Droid 2 Global Bloatware Removal Script

Discussion in 'Motorola Droid 2 Global' started by buryboi, Dec 23, 2010.

  1. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    Droid 2 Global Bloatware Removal Update.zip and Script Tutorial

    Overview

    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:

    amazonmp3_1_8_14_signed_zipaligned_Signed_2010-09-09_15-23-51.apk
    Blockbuster.apk
    CityID.apk
    FriendFeed.apk
    Kindle-1_0_2-OEM-SingleSign_Signed_2010-09-20_17-31-57.apk
    Mynet.apk
    MyVerizon.apk
    NewsWidget.apk
    PerformanceManager.apk
    Skype_mobile.live.apk
    SocialMessaging.apk
    SocialShare.apk
    vnav_6.1.0.160_Droid2Global_rel_PROD_signed.apk
    Vvm.apk
    WeatherWidget.apk
    WorldClockWidget.apk

    com.vzw.hss.myverizon-2.apk (this one is in /data/app not /system/app like the others)

    Prerequisites

    • 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: http://www.droidforums.net/forum/droid-x-rooted-help/100487-creating-restoring-backups-complete-guide.html
    • 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):
    Code:
    $su
    
    #bloat -add
    Alternate Method 1 - Terminal Emulator
    (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").

    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
    Step 10: Reboot Phone (not required but some apps won't get out of the drawer until you do)

    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

    Attached Files:

  2. ComradeF
    Offline

    ComradeF New Member

    Joined:
    Dec 12, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Plano, TX, USA
    Very nice. I haven't tried this but everything makes sense, and it should save me a lot of trouble next time I have to go through the whole mess to get Motorola's updates.

    It really is a shame that the D2G is loaded up with so much horrible crap...
  3. hookbill
    Offline

    hookbill Premium Member Premium Member

    Joined:
    Nov 30, 2009
    Messages:
    19,545
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    N.E. Ohio
    I appreciate the effort and the fact that you covered Mac's as well as PC. Excellent write up.

    I still would root myself. But for someone who doesn't want to root this looks good. I'm going to stick it.
  4. Lunatics
    Offline

    Lunatics New Member

    Joined:
    Dec 26, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Hey sorry I'm a noob to Android but I wanted to do this so I could get rid of all of Verizons crap. My phone is rooted and I created a system/xbin folder and put "bloat" in there however I can't find any options to make it R/W or to edit the properties of "bloat". I downloaded an app called Mount /system or something and tried mounting r/w with that but I still can't seem to get the options you're talking about. What am I doing wrong?
  5. hookbill
    Offline

    hookbill Premium Member Premium Member

    Joined:
    Nov 30, 2009
    Messages:
    19,545
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    N.E. Ohio
    I'm a bit confused. I could of sworn this was some type of alternative to rooting.

    What's wrong with just changing the extensions and changing them back if you're going to root in the first place? How hard can it be to highlight and paste .apk?
  6. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    Lunatics,
    You will need a program such as root explorer. If you use the regular "file explorer" that is in the app drawer, in only allows access to the sdcard. You should not need to create the folder /system/xbin, it should already exist, if you had to create it, you were probably viewing the sdcard contents rather than the phones /system directory. Root explorer is a couple bucks on the market.

    Rather than using terminal emulator, some steps can be done with root explorer. Here are those steps:

    Step 1: Copy "bloat" to the top level of the sdcard (not within any folders)

    Step 2: (Now would be a good time to make a clean nandroid back-up if you don't have one already.) Using Root explorer, navigate to your sdcard and long press your script and select copy.

    Step 3: Navigate to the /system/xbin folder, mount it as R/W (the button at the top) and past the file.

    Step 4: Long press the file and choose "permissions" It will show a three by three grid, the top row should be all checked, the next two rows should have only the first and last columns checked (this will set the permissions to rwxr-xr-x)

    Step 5: Remount System as R/O (press the button at the top)

    Step 6: Press the menu button, select "more", and choose "exit"

    Step 7: Download a terminal emulator from the market, a free one should work fine. Install it and open it.

    Step 8: You should now see a $ symbol, type "su" and press enter

    Step 9: Type "sync" and press enter

    Step 10: type "bloat -rm" and press enter



    Hook,
    I could only wish this were an easy alternative to rooting that allowed manipulating system files. Unfortunately access to system files still requires root or adb.

    There is absolutely nothing wrong with manually changing each file to ".bak" and then changing them back to ".apk", it just takes time, and you have to do it for each and every apk you wish to disable.

    The script does all the individual steps but in one fell swoop. Rather than spending time long pressing 17-20 files so that you can click rename 17-20 times, then highlighting and pasting ".apk" 17-20 times, this script automates the process so that you can "hide" unnecessary applications with one, quick command.

    This script also lets you "unhide" very quickly as well.

    If you want to remove fewer or more apps, just remove or add lines to the script.
  7. hookbill
    Offline

    hookbill Premium Member Premium Member

    Joined:
    Nov 30, 2009
    Messages:
    19,545
    Likes Received:
    5
    Trophy Points:
    0
    Location:
    N.E. Ohio
    ROFLOL, I thought "Why is he calling me a lunatic? How does he know?" Then I saw the previous posters nameā€¦.:rofl3::rofl3:
  8. Lunatics
    Offline

    Lunatics New Member

    Joined:
    Dec 26, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Edit: Nevermind I'm stupid,thanks again for the help.
  9. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    No worries, glad you got it figured out.

    Also I got a PM asking how to keep the BlurSNMessagingEngine.apk Here is how to do it, but these steps could also be used for any other app on the list.

    If you want to keep the snmessaging app there are two options, the first is to remove the references to the app in the script and the second is to manually put it back using terminal.

    To edit the script, open it in jedit (if using windows...download it from the link in the first post) or if on a mac or linux, a standard text editor should work, and delete these two lines:

    mv /system/app/BlurSNMessagingEngine.apk /system/app/BlurSNMessagingEngine.bak

    mv /system/app/BlurSNMessagingEngine.bak /system/app/BlurSNMessagingEngine.apk

    after doing that save it and copy the script to the sdcard and follow the steps in the first post starting at step 6.

    You can do this to add or remove apps to the script. BE CAREFULL! Removing some apps can brick the phone.

    If that is the only app you want to keep, you could run the script as it is to remove everything then type this to add back just the snmessaging apk:

    Code:
    su
    
    busybox mount -o rw,remount /system
    
    mv /system/app/BlurSNMessagingEngine.bak /system/app/BlurSNMessagingEngine.apk
    
    busybox mount -o ro,remount /system 
    Keep in mind that Android (and linux in general) is case sensitive, so if a file has caps and lower case it has to be typed in exactly or it won't work.

    You can still run "bloat -add" to put everything back, it will just throw an error when trying to put back SNMessaging since it is already back
  10. leobg
    Offline

    leobg Member

    Joined:
    Jun 9, 2010
    Messages:
    658
    Likes Received:
    2
    Trophy Points:
    18
    Will the phone survive hard reset with all those apps disabled?
  11. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    Leobg,

    Just for fun, I just tried a factory reset from within stock recovery (hold x on boot, when the exclamation point shows press the search button/magnifying glass on the keyboard, choose wipe data/factory reset and then when that's done choose wipe cache). It wiped and rebooted fine, when I got back into the os, the hidden apps were still gone, as was all my user data. A reboot put me into bootstrap (clockwork) recovery where I restored nandroid to get my data back (so a factory reset doesn't really touch the system partition, mostly just the data partition).

    So as far as I could tell a factory reset does not add or remove anything from the system partition, it only wipes the data partition killing user installed apps and data. If a system app has been disabled or removed, it will still be gone after a factory reset. (This has been shown already with the droid 1 and other android phones)

    A Nandroid restore (from within clockwork) on the other hand will put things back the way they were at the time the restore point was made.
  12. leobg
    Offline

    leobg Member

    Joined:
    Jun 9, 2010
    Messages:
    658
    Likes Received:
    2
    Trophy Points:
    18
    Thanks for trying. My concern was will phone go thru setup proces after hard reset without those applications. Sometimes, due to certain app being disabled/removed, system cannot go past initialization step. If phone is able to boot normally after hard reset with those applications disabled - then all is good!
  13. P Dizzay
    Offline

    P Dizzay New Member

    Joined:
    Jan 5, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Alright, I was happy to read some of this but when I got to the WHATEVER YOU DO DON'T DELETE THEM part... my face sank... when I unboxed my droid 2 I was immediately upset by all the preloaded crap that was on the phone. Not thinking about how it would effect the ota updates I got z4 root. rooted. and nuked about half of the preinstalled junk. aka DELETED all the apks. the recovery system on the phone is stock as well as the system itself. (2.4.29.A956.Verizon.en.US) would it at all be possible to re-install what i've nuked and the ota update will work or would it not because of something with the other files associated with the apks?? please help i dont want to flash a complete new system or risk bricking my phone at all :((
  14. ComradeF
    Offline

    ComradeF New Member

    Joined:
    Dec 12, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Plano, TX, USA
    P Dizzay -- yeah, I was in the EXACT same boat as you. I made the switch from an old BlackBerry Curve and was extremely excited about trying out Android. I'm also the type of person who likes bare minimum / stock stuff so I can customize it from the ground up and know every inch of what's been done... so I experienced the same letdown when I came to realize how it was going to have to be with the D2G. Not only is the bootloader locked so Cyanogenmod probably won't happen, but it's also so full of bloated crap... makes my head spin...!

    And like you, I went on a spree and killed a bunch of stuff early on. Oops. ;)

    Check this out: http://www.droidforums.net/forum/droid-2-global/96327-droid-2-global-system-dump.html

    Use 7Zip to open the several layers of that, and eventually you'll get to all the APKs and ODEXs in system/app. Whew!

    It's still a damn crying shame that the D2G is so far removed from Google's stock Android. I have really come to appreciate my D2G in the ~month I've had it, but to this day, this is the one thing that nags at me and makes me question my decision.
  15. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    To install the system update, you have to put the bloatware back

    Download the link ComradeF posted above (the Droid 2 Global system dump). Unfortunately you cant just install them like you would an app from the market. They must be pushed to the /system/app folder and then the permissions must be properly set. Here are some more detailed instructions if you need them:

    http://www.droidforums.net/forum/droid-2-global/107095-new-update-7.html#post1112999
  16. P Dizzay
    Offline

    P Dizzay New Member

    Joined:
    Jan 5, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    THANK YOU SO MUCH!
    I'm currently at school so when I get home tonight i will be definately trying this.
    I just now purchased the root explorer. The cost of the app was peanuts comapared to the anxiety i was dealing with over this. thanks for replying very swiftly becuase i was seriously considering full smb reformat when i got home today. Your link to step by step instructions is VERY helpful and makes complete sense. The only thing stopping me from doing this now is that the school computers don't let me install anything. so 7zip is not available :(

    THANKS SO MUCH!
  17. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    No problem!

    Sent from my DROID2 GLOBAL using DroidForums App
  18. P Dizzay
    Offline

    P Dizzay New Member

    Joined:
    Jan 5, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Okay, so I replaced every single app that was missing successfully, rebooted, all apps present.
    Weird thing, contact pictures gone, and when i click on "system update" it says system update is not available without a Motorola service account. Has a button to setup the account but only shows the account manager window with only options as facebook, myspace, twitter. etc.

    Any suggestions?
  19. buryboi
    Offline

    buryboi Premium Member Premium Member Developer

    Joined:
    Dec 20, 2009
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    Is your Google account still there after adding the apps back and rebooting? I'm not sure why it would be gone (unless restoring some deleted app messed up your primary account somehow). As far as I'm aware, I've never heard of a "Motorola Service Account" so it must be talking about a google account. The profile pictures are stored in the "cloud" (I think) so if they are not showing up, it would seem like your not really syncing with google, and the contacts that do show up are left over from the last time it synced (theoretically before you restored the apps and rebooted.) Which apps did you remove and put back? And did you make sure get all the ".odex" files back as well?
  20. P Dizzay
    Offline

    P Dizzay New Member

    Joined:
    Jan 5, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    My google account is still active on the phone and i can send/recieve messages.
    Although, when i sync the accounts in the "accounts" menu it shows the syncing animation in the window but not in the status bar. Is there a way i can re-setup my google account? i have all my contacts in a vcard file so contact integrity is not a problem.

    As far as applications re-installed/copied....

    amazon mp3
    android-syncservice-app
    backupassistance client
    blockbuster
    blue-services
    buacontactadapter
    cityid
    cmas
    friendfeed
    help center
    homesyncwizard
    inpocketservice
    kindle
    mynet
    myverizon
    newswidget
    performance manager
    skype
    social share
    status widget
    weather widget
    work contacts

    Would it be that sync service or blur-services just needs to re-register my google account to be back to normal?
Search tags for this page
android some bloat removed script
,
d2g bloatware
,
droid 2 bloatware removal script
,

droid 2 global bloatware

,

droid 2 global bloatware list

,

droid 2 global bloatware removal

,
droid 2 root script to delete bloatware
,
droid r2d2 remove crapware
,
how to remove bloat ware on droid 2 global
,
motorola droid 2 global cleanup
,
motorola droid global 4 remove bloatware
,

remove bloatware droid 2 global

,
remove droid 2 global bloatware
,
remove verizon bloatware droid 2 global
,
safe bloatware to remove d2g