[SCRIPT] *DeBloat roms* for Nexus 4 & Moto X

someguy01234

Well-known member
Nov 9, 2011
1,813
2
0
Visit site
*****DISCLAIMER: Make a full Nandroid backup of your phone before using these scripts. I'm not responsible for damaging or bricking your phone.
DO NOT FLASH THESE ZIP FILES IF YOU DON'T KNOW HOW TO CREATE NANDROID BACKUPS OR RESTORE YOUR DEVICE.*****

What is it:
If you like to add and remove extra files to your roms zip while flashing the roms, this flashable script will help speed up the installation process. I created this scipt with my limited knowledge of linux commands for personal uses, they come as flashable zip files that you can flash using custom recoveries such as "CWM" or "TWRP".

This script is to delete unnecessary apps (ie. bloatwares) from roms. The zip file of this script also contain specific folders that you can put in apps, ringtones, etc which will be copied to the phone when flashed.

I received helps from joesmammafat with the commands so thanks to him.

IF YOU FLASHED THIS SCRIPT ON STOCK FIRMWARE, OVER THE AIR UPDATES WILL NO LONGER WORK.

Download is in bottom of post.

*****addremovefiles script package*****
View attachment addremovefiles_v1.06.txt (see changelog for changes in newer version)

WHAT IT DO:

--Delete unnecessary apps preloaded by popular roms (CM, AOKP, PA, Slim).
--Delete unnecessary Google apps downloadable from PlayStore (important core Google services are kept).
--Delete unneeded media files from the "/system/media" directory.
--Delete non-English PicoTTS's languages.
--Copy everything from the "system" folder from the zip file to the /system partition of the device.

IMPORTANT:
--The script file is called "updater-script" located in the folder "\META-INF\com\google\android\" of the zip package.
--Some 'delete' commands are commented out with a # sign, this means those lines will not execute. I comment out lines that will delete apps that might be essential for most users. If you want those apps deleted anyway, remove the # sign before the commands.
--This package contain a folder called "system" in it, with a few common subfolders such as "app" and "media". You can add your own APKs, bootanimation and ringtones into the appropriate folders, which will be copied over to your device once you flashed the package.

Google apps:
--Only non-important Google apps are removed, all which are possible to be downloaded from the PlayStore. Important Google apps such as; core Google services, GmsCore, Phonesky, Velvet, Google Launchers are left alone. You will still be able to log into your Google account, sync and use the PlayStore. You can always delete these lines from the script if you want to keep the gapps.


F.A.Q.
How do you use this script packages?
These are flashable zip packages that you can flash using custom recoveries such as TWRP. They are meant to be flashed after a factory reset or a clean rom install. Remember you are taking a risk by using them and I'm not responsible for damages to your phone, make a Nandroid backup before flashing them.

How to edit the script file?
addremovefiles zip: Open up the zip file, go into the folder: \META-INF\com\google\android\ and extract the file updater-script. If you are using Windows, I recommend using Notepad++ to edit the script file. While editing it, rename the file to "updater-script.sh", it will be much easier to edit with NotePad++ since the commands will become color coded. Do not use Wordpad or Microsoft Office, the script needs to be in unix format otherwise it will fail to work. Copy the new 'updater-script' back into the zip file when you're done.

I get "E: error executing updater binary in zip" when trying to flash the zips?
Could be for a number of reasons. Your version of custom recovery may not work with these scripts or its 'update-binary' file doesn't work with your device possibly. You may have an encrypted device. Maybe you edit the script, but made a typing or syntax error in the process.

I added an APK into the "addremovefiles" zip package (/system/app folder) to flash, but the app doesn't work afterward:
Some apps required "lib" files to work properly, which is located inside the APK itself, they needed to be placed in the '/system/lib' folder. Some apps will simply not work installed in the /system partition and will need to be installed the traditional way.

I flashed your zip files and now my phone is bootlooping / bricked. :mad:
Sorry, should have read the warning disclaimer above and made a back up first.



MD5 sum
ea3e7d36aacc9dd3dd41e4888335a09a addremovefiles_v1.07.zip

Changelog
v1.07:
-added more apk to be deleted
HoloSpiralWallpaper, MagicSmokeWallpapers odex
CloudPrint, HPLegacyPlugin (not deleted by default)
GMS_Maps
Quickoffice
Translate
 

Attachments

  • debloat.jpg
    debloat.jpg
    132.9 KB · Views: 22
Last edited:

anon5664829

Banned
Feb 6, 2013
2,322
0
0
Visit site
Re: Nexus 4 - [SCRIPTS] *DeBloat roms & Build.prop edit*

Ok so I am on the stock ROM at the moment but when I do flash a ROM I'll give this a test run to remove Apollo or some other bloat that's added to ROMs. Thanks for your nice simple tools that make our lives easier.
 

someguy01234

Well-known member
Nov 9, 2011
1,813
2
0
Visit site
Re: Nexus 4 - [SCRIPTS] *DeBloat roms & Build.prop edit*

I updated a few things and remove the 'buildpropedit' zip since it have to much potential to soft brick. Also tested working on Moto X.
 
Last edited: