[Sony Cross-Device General] DaRk-L0rD:
How to make a debloat script

Hmmm... What is a debloat script man?

It's a script that removes a lot of extra stuff, unwanted apps, also known as "bloatware".

What you need:

1. Deoxeded Rom

2. Root permission

3. CWM

4. Winrar

5. Notepad++

6. This file : View attachment 2354312

OK now, we are good to go:

1. Download and install Notepad++

2. Download the attached file and extract the META-INF folder. Go to META-INF → com → google → android.

Now you will see a filed named updater-script. This it the file that will do all the magic, so be careful. Now: right click on it and open it with Notepad++.

3. Now on Notepad++

a) Select Encoding → Encode in ANSI

b) Select Edit → EOL Conversion → UNIX/OSX Format

Now let's start:

STEP 1

Copy these lines in the Notepad ++

ui_print("");

ui_print("");

ui_print(" HERE YOU CAN WRITE WHATEVER YOU WANT, BETTER WRITING THOUGH WHAT THIS MOD WILL DO (LIGHT OR HEAVY DEBLOAT ECC) ");

ui_print("");

ui_print("");

STEP 2

Now copy the following lines (immediately after the previous lines; no spaces between these lines):

run_program("/sbin/busybox", "mount", "/data");

run_program("/sbin/busybox", "mount", "/system");

run_program("/sbin/busybox", "mount", "/cache");

STEP 3

Now you have to add the path of the file you want to delete (add the lines immediately after the previous lines; no spaces between these lines):

For example:

delete("/system/app/SemcMusic.apk"); -- This one will delete the SemcMusic.apk

delete("/system/app/CosmicFlow.apk"); -- This one will delete the CosmicFlow.apk

delete("/system/app/WikipediaPlugin.apk"); -- This one will delete the WikipediaPlugin.apk

STEP 4

Now copy these lines(add the lines immediately after the previous lines; no spaces between these lines):

delete_recursive("/cache");

delete_recursive("/data/dalvik-cache");

run_program("/sbin/busybox", "unmount", "/data");

run_program("/sbin/busybox", "unmount", "/system");

run_program("/sbin/busybox", "mount", "/cache");

NOTICE: After the line run_program("/sbin/busybox", "mount", "/cache"); leave an empty line.

Here is a example of a small debloat script:

ui_print("");
ui_print("");
ui_print("Learing how to make a debloat script -- DaRk-L0rD");
ui_print("");
ui_print("");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
delete("/data/data/com.adobe.reader");
delete("/data/app/com.adobe.reader-1.apk");
delete("/system/app/FBCalendarSync.apk");
delete("/system/app/facebook.apk");
delete("/system/app/ExternalKeyboardJP.apk");
delete("/system/app/EventStreamPluginTwitter.apk");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
run_program("/sbin/busybox", "unmount", "/data");
run_program("/sbin/busybox", "unmount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
LEAVE THIS LINE EMPTY

Just a small tip now:

delete_recursive("/cache"); → This command will wipe the cache.

delete_recursive("/data/dalvik-cache"); → This command will wipe the dalvik cache.

STEP 5

Now save the updater-script and exit from Notepad++.

STEP 6

The next thing to do is create the flashable zip.

a) Make sure that the updater-scipt is in META-INF → com → google → android

b) Now make a folder named system (leave it empty).

c) Select both META-INF and system folder and right click on them.

d) Select Add to archive...

e) Archive name: Add the name you wish. No spaces between the words, but only "-" and "." .

f) Archive format: ZIP

g) Compression method Store

---> The Archive format and the Compression method are very important, so make sure they are ZIP and STORE.

i) Now copy the zip file you created in your phone and flash it!

DONE :D

Happy debloating :D