yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Themes and Apps] MoJo:
This script is absolutely compatible with usual Nexus 5, several guys used it w/o problems, it seems that the problem is multiboot. You can look inside - script absolutely correct mount system partition, removes unwanted apps from /system/app, unmount system, that's all. Probably multiboot uses another partition structure unlike one-system phone.
[Nexus 5 Themes and Apps] _Russ_:
Installed script yesterday, no problems at all!
[Nexus 5 Themes and Apps] AndrasLOHF:
This seems like a really cool idea but honestly ever since it's come out I've read nothing but problems with it in the various threads I visit.
[Nexus 5 Themes and Apps] bradputt:
Are you on multiboot?

this has to be the best feature to date in my opinion.

i could test out other roms while maintaining my base rom intact.

i'm not having any other problem except this one.

i just remembered i did disabled some of the apps that i'm not using. maybe this is the reason it screwed up.
[Nexus 5 Themes and Apps] MoJo:
Don't think so, I tend to think that multiboot is a reason.
[Nexus 5 Themes and Apps] mvelasquez87:
Does this do the same as freezing with tibu?
[Nexus 5 Themes and Apps] MoJo:
No, this script completely removes apps from firmware.
[Nexus 5 Themes and Apps] madroamer:
hw much space recovered aft delete so much of apps ?
[Nexus 5 Themes and Apps] Aerowinder:
Why not just mount system partition with busybox? Then it works on any device.
[Nexus 5 Themes and Apps] MoJo:
I know, I used busybox in script before.

Updated OP, added same script with busybox, should work on any device with custom recovery.
[Nexus 5 Themes and Apps] AndrasLOHF:
The ROM I use(SlimKat) was just updated and I finally got to use the script. It worked exactly as planned.Took my starting apps from about 115-120 down to 94 easily saving 5+ minutes on waiting on ART to compile apps I immediately delete after boot. Thanks tons for this!!!!!
[Nexus 5 Themes and Apps] MoJo:
I don't know exactly, but not too much, may be ~ 25Mb. Removing unnecessary programs

gives a little faster system loading and reduces battery consumption.

Fine, glad it works for you!
[Nexus 5 Themes and Apps] madroamer:
how do i run it. i downloaded it. extracted. made changes. wanted to have some apps. save & created new zip. trf tat new zip to nexus 5 via bluetooth. it shows just like archieve. i click on it , the archieve opens but how to run the script ? plz help immed
[Nexus 5 Themes and Apps] MoJo:
You should install script using custom recovery (TWRP or CWM), same way as people install custom ROM or kernel.
[Nexus 5 Themes and Apps] persianrisk:
So just to be clear this will work on pure stock, non-rooted kitkat os?
[Nexus 5 Themes and Apps] MoJo:
Yes, it will.
[Nexus 5 Themes and Apps] Spacewide:
Never delete Google Search..

I tried that this morning and the n5 was totally stuck in bootloop.

This was my OWN fault ofcourse, good share author.
[Nexus 5 Themes and Apps] madroamer:
i tried twrp...it says YOU MUST ROOT & app closes..it doesnt open
[Nexus 5 Themes and Apps] darshan9222:
nice one

been on catacysm rom,,,this scrip worked,,,will the deleted apps once again appear after installing new update
[Nexus 5 Themes and Apps] MoJo:
Which script you tried to use?
[Nexus 5 Themes and Apps] madroamer:
general one. non box sync script. issue is installed twrp and i get mess wen open twrp manager - root is req for this app.

i havent rooted my device yet.

help me hw to & wat to do to use script
[Nexus 5 Themes and Apps] MoJo:
Scripts will run on any device!
[Nexus 5 Themes and Apps] ClassicalDonkey:
Worked good

Ok So I ran this on my SG3 with CM11 on it. Worked great and deleted everything i wanted. But I was thinking.....can i use this to delete other things as well like ring tones from system\media\audio

and if so, do i need to Clear Dalvik again
[Nexus 5 Themes and Apps] remixkilla:
So I won't be able to get the OTA update if apps such as Google plus is deleted?
[Nexus 5 Themes and Apps] Omya:
hey if i delete play book using rom toolbox it re-installs from play store after a reboot ? will the same thing happen if i use this zip file to remove apps ?
[Nexus 5 Themes and Apps] AndrasLOHF:
Should be able to with no problem. Just make sure you put the correct path "\system\media\audio" or which you are looking to delete. I was able to get the script to delete apk's out of /system/priv-app using this method.
[Nexus 5 Themes and Apps] ClassicalDonkey:
Ok thats cool, is there a command to delete everything from a set folder???

"delete_recursive" found this, but I would like to delete the folder then make new ones with the same names.i.e Ringtones,Alarms etc
[Nexus 5 Themes and Apps] Cloonix:
Stock N5 Rom?

Because usually I do delete Google Search (CM 10 though on another device).
[Nexus 5 Themes and Apps] :
How much space did this save you?
[Nexus 5 Themes and Apps] madroamer:
i am rooted how do i run the script. wat is procedure ?
[Nexus 5 Themes and Apps] Opentang:
Flash the .zip file in recovery, CWM or TWRP.
[Nexus 5 Themes and Apps] benny3:
Flash it like any other zip in recovery

---------- Post added at 09:30 PM ---------- Previous post was at 09:28 PM ----------

To the OP

Just remember if any of the apps updated the updated apps will be in data/app and needs deleted from there as well
[Nexus 5 Themes and Apps] katinatez:
I would like to if I could also mount data to delete data/apps. And if so how would the code be written out.
[Nexus 5 Themes and Apps] MoJo:
It's possible and will looks like:

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

delete("/data/app/com.app.grandag.trackchecker-1.apk");

But user apps have long and complex file names, so I believe that much easier delete them from running system: Settings->Apps->Your App->Uninstall

You are right, I forgot mention that in OP.

Ok, for example, if you wonna delete alarm folder with content and make new one, structure of your archive file should looks like on attached pictures:

------------------------>CERT.RSA, CERT.SF, MANIFEST.MF

your archive ------>/com/google/android/update-binary, updater-script

------------------------>/system/media/audio/alarms/your_new_alarm1.ogg, your_new_alarm2.ogg, ...

and lines in updater-script:

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

#mount system partiton

delete_recursive("/system/media/audio/alarms");

#delete destination folder with content

package_extract_dir("system", "/system");

#copy content of archive system folder to system partition

set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/alarms");

#set owner, group, folder permissions, files permissions

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

#unmount system partiton
[Nexus 5 Themes and Apps] katinatez:
Thank you, trying to modify script to work on a specific tablet, Its the Nabi 2 tablet found here,

http://xdaforums.com/wiki/Fuhu_nabi_2

and its unique because the Fuhu devs placed apks all over in the data partition so they stored in three different directories so I would run this code 3 seperate times correct?

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

delete("data/addon_res/vendor/app/WingsUniversity.apk");delete("data/addon_res/vendor/app/WinsChallenges.apk");

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

delete("data/addon_res/apks/games/Veggie_Tales_Spotisodes.apk")

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

delete("data/addon_res/apks/apps/Adobe_AIR_3.1.apk");delete("data/addon_res/apks/apps/Nook.apk");
[Nexus 5 Themes and Apps] MoJo:
You should use mount command only once:

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

delete("data/addon_res/vendor/app/WingsUniversity.apk");

delete("data/addon_res/vendor/app/WinsChallenges.apk");

delete("data/addon_res/apks/games/Veggie_Tales_Spotisodes.apk");

delete("data/addon_res/apks/apps/Adobe_AIR_3.1.apk");

delete("data/addon_res/apks/apps/Nook.apk");
[Nexus 5 Themes and Apps] katinatez:
Wow, was about to pull the trigger and flash the zip with 3 mount commands, so happy you replied in time. :D

The unmount command would look like this??

#unmount("/data");

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

ui_print(" ");

ui_print("Completed.")
[Nexus 5 Themes and Apps] MoJo:
Exactly!
[Nexus 5 Themes and Apps] katinatez:
I placed the code just like you told me right up against the first lines of code with mounting system to delete system apps then applied the mount data code underneath but now I get errors

"error executing update binary in zip"

Also the mounting system and removing system apps worked flawless, now just trying to delete in the data partition. Help please
[Nexus 5 Themes and Apps] MoJo:
Do u have root, which recovery and FW (version, odex/deodex) you are using, where /data is located - on sdcard?
[Nexus 5 Themes and Apps] madroamer:
K i am new. I just started to work with android devices. finally rooted the devices. Installed tnwrp too. But dont know how to flash . where to keep this zip file. can u provide step by step procedure. It was also stated must keep in root folder. how to paste the script there. how to run from app ?
[Nexus 5 Themes and Apps] MoJo:
Assume that the device driver is correctly installed.

1. Open Windows Explorer.

1. Copy del_useless_apps.zip to root of your sd_card.

2. Reboot device into recovery (TWRP).

3. Press "Install" button, choose your copied del_useless_apps.zip from sd_card.

4. Swipe to right, wait till script finished, reboot.
[Nexus 5 Themes and Apps] madroamer:
Ji when i pasted it in root & opened TWRP & selected recovery reboot mob restarted but it kept showing android logo with red button type. for v long time !!!!! wat is wrong....gosh
[Nexus 5 Themes and Apps] MoJo:
You are doing wrong something ...

Look how to exit stock recovery, reboot to bootloader, flash TWRP again via fastboot and restore your Nandroid backup in TWRP.
[Nexus 5 Themes and Apps] codemonkey98:
If Android uses them as system applications, then you will not be able to do an OTA. You could always restore using a Nandroid back up and then doing the OTA.
[Nexus 5 Themes and Apps] madroamer:
Mojo

I get the same screen as shown in the video. the user presses up vol + start button (almost in the last part of the video) to go to next screen but i cant do any. wen i hard press it restarts. tried several times. Dont know how to resolve. I get same screen Android doll lying flat with Exclamatory sign in red color. I cant get into next screen. Tried several times only get restarted.

Also plusone & google plus are diff right ? coz OTA will not available later.
[Nexus 5 Themes and Apps] MoJo:
Try to switch off phone (press Power about 10-15 sec.), then press up Vol- and Power, you should enter bootloader menu.

They are the same, I never use OTA update, prefer to do that manually ...

Also you can read One Click Factory Restore KOT49H 4.4.2 (dead or alive)
[Nexus 5 Themes and Apps] Siema89:
I upgraded the script a little:

run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "mount", "/data");
ui_print(">>> Cleaning dalvik-cache");
delete_recursive("/data/dalvik-cache");
run_program("/sbin/busybox", "umount", "/data");

No need to clean dalvik cache manually after that :)
[Nexus 5 Themes and Apps] MoJo:
Yeap, you are right, will add to OP.
[Nexus 5 Themes and Apps] madroamer:
Finally i was able to reach sideload screen which showed mess tye adb sideload <File Name>

I connected mobile to PC ...used the adb loader from platform tools. copies the script zip file to that folder

typed adb sideload xxx.zip

dos showed lot of entries run...finally ended...exited went to reboot...but drive google plus all still remains...

i installed twrp thru app store not like flashing r some
[Nexus 5 Themes and Apps] Siema89:
AFAIK Play Store version was only a front-end for the flashed one? Maybe that's why it didn't work...
[Nexus 5 Themes and Apps] radialblur:
Hmm, this isn't working for me, I've unlocked my bootloader, rooted etc, all working fine, gone to run the script and I'm getting:

Updating partition details...

Installing '/sdcard/del_useless_apps.zip'...

Checking for MD5 file...

Skipping MD5 check: no MD5 file found.

This package is for "hammerhead" devices: this

E:Error executing updater binary in zip '/sdcar

Error flashing zip '/sdcard/del_useless_apps.zi

Updating partition details

(those lines are deliberately cut off as they are on my phone screen too)

All I have done is remove Calculator, GoogleEars, GoogleHome, LiveWallpaperPicker, Music2, Stk, Street, and Videos from the script as I want to keep them on my device.

I use Notepad++ and have made sure there aren't any rogue carrige returns etc in the file, I've zipped as instructed (Zip, Store), any clues as to what could be wrong?

**Edit: Just tried it with the original zip (leaving all the deletions in place and it fails in the same way) if it makes any difference I'm running 4.4.2 **

Many thanks,

R.
[Nexus 5 Themes and Apps] ClassicalDonkey:
I could be wrong but I think your running the nexus 5 script.... You should be using the other one with busybox if your not flashing to a Nexus device
[Nexus 5 Themes and Apps] radialblur:
Ooops, sorry I forgot to say, I'm using a Nexus 5 (32 GB) on 4.4.2 (KOT49H)
[Nexus 5 Themes and Apps] MoJo:
I removed 1st attached script, try to use leftover one.

P.S. What recovery you are using?

Probably they were updated as it mentioned in OP, you should delete updates for drive and google plus in Settings->Apps, after that you will be able delete them using script.

Better way to install TWRP was described in TWRP 2.6.3.4 touch recovery [2013-11-04] Also root.
[Nexus 5 Themes and Apps] katinatez:
[MENTION=339927]MoJo[/MENTION], I sent you a pm
[Nexus 5 Themes and Apps] tonio14545:
hi I'm on the rom droid kang and I really like it. but i would like to replace the messaging app with the dark themed one from cmb roms. i made a backup of it on titanium backup but when i tried to restore on droid kang it didn't change. this is because i need to delete mms.apk first right? i tried flashing your script after editing in mms.apk but it said failed. when i run the command manually on terminal emulator it says syntax error
[Nexus 5 Themes and Apps] MoJo:
What's filename of droid kang's messaging app? Does it locate in /system/app?

You can quickly delete single app using Root Explorer.
[Nexus 5 Themes and Apps] tonio14545:
its called mms.apk and its under system/ priv-app

when i try to delete with root explorer it says warning mms.apk cannot be deleted because the file system is read only
[Nexus 5 Themes and Apps] MoJo:
Then line in script should looks like:

delete("/system/priv-app/mms.apk");

or

in Root Explorer you should press small rectangular button "mount R/W" in upper part of screen (need to have root, of course).
[Nexus 5 Themes and Apps] Siema89:
You can delete mms.apk mentioned above and install 8sms. It's built from mms.apk source with some tweaks, like dark theme :) Also has working widget (the same as default).
[Nexus 5 Themes and Apps] tonio14545:
himnedaie

thanks! it worked out when i switched to mount rw. and i have the messaging app i want installed now
[Nexus 5 Themes and Apps] radialblur:
I'll give the other one a go, I'm running TWRP v2.6.3.4
[Nexus 5 Themes and Apps] radialblur:
Ok, well running the other script worked without error :good: however there is a bunch of stuff it didn't remove because the apps don't exist in /system/app such as:

Chrome, Drive, G+, Keep, Books and Play Movies & TV, any clue where these reside so I can mod the script to remove them? Also the script doesn't remove the corresponding odex files, is it safe to add them to the delete list?

Cheers,

R.
[Nexus 5 Themes and Apps] Xoib:
If you clear the dalvik cache after the script execution, the corresponding odex files will be removed.
[Nexus 5 Themes and Apps] radialblur:
Wicked, thank you Xoib :)
[Nexus 5 Themes and Apps] katinatez:
Thank you Mojo for your help, it was the addon partition for the script to work correctly. Now with one flashable zip we could strip all the Nabi bloatware from Nabi 2 tablet. Thank you again
[Nexus 5 Themes and Apps] slayerz:
How to empty or delete folder?

Thanks for the script.

Does anybody know the command to empty or delete a folder using this script?

What I want to do is to delete all *.ogg files in

"/system/audio/alarms/"

"/system/audio/notifications/"

"/system/audio/ringtones/"

or maybe delete the whole alarms, notifications and ringtones folder.

Thank you.
[Nexus 5 Themes and Apps] MoJo:
You can use delete_recursive("/system/media/audio/alarms");

Read post#45
[Nexus 5 Themes and Apps] slayerz:
Perfect! Thanks a lot.

Here's how I use it:

#by MoJo (Dec 26, 2013)
ui_print("Mount System partition ...");
#mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
run_program("/sbin/busybox", "umount", "/system");
#Properly unmounting to avoid issues
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("Start cleaning useless apps ...");
###delete_google_crap
delete("/system/app/BasicDreams.apk");
delete("/system/app/Books.apk");
delete("/system/app/Browser.apk");
delete("/system/app/Calendar.apk");
delete("/system/app/CellBroadcastReceiver.apk");
delete("/system/app/Drive.apk");
delete("/system/app/Email.apk");
delete("/system/app/Exchange2.apk");
delete("/system/app/FaceLock.apk");
delete("/system/app/GenieWidget.apk");
delete("/system/app/LatinImeGoogle.apk");
delete("/system/app/LiveWallpapers.apk");
delete("/system/app/Magazines.apk");
delete("/system/app/Music2.apk");
delete("/system/app/PicoTts.apk");
delete("/system/app/Street.apk");
delete("/system/app/Stk.apk");
delete("/system/app/SunBeam.apk");
delete("/system/priv-app/talkback.apk");
delete("/system/app/VideoEditor.apk");
delete("/system/app/Videos.apk");
delete("/system/priv-app/VoiceDialer.apk");
delete("/system/priv-app/Wallet.apk");
###delete_custom_crap
delete("/system/media/bootanimation.zip");
delete("/system/app/CMWallpapers.apk");
delete("/system/app/DashClock.apk");
delete("/system/app/Development.apk");
delete("/system/priv-app/Firewall.apk");
delete("/system/priv-app/app/Launcher3.apk");
delete("/system/app/Torch.apk");
delete("/system/app/ViPER4Android_XHiFi.apk");
delete("/system/app/VoicePlus.apk");
delete("/system/app/WhisperPush.apk");
###delete_google_crap_tones
delete_recursive("/system/media/audio/alarms");
delete_recursive("/system/media/audio/notifications");
delete_recursive("/system/media/audio/ringtones");
#copy content of archive system folder to system partition
package_extract_dir("system", "/system");
#set owner, group, folder permissions, files permissions
set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/alarms");
set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/notifications");
set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/ringtones");
#unmount("/system");
ui_print("Unmount System partition ...");
run_program("/sbin/busybox", "umount", "/system");
ui_print(" ");
ui_print("Completed.");
ui_print("Please, clear Davlik and reboot!");
[Nexus 5 Themes and Apps] MoJo:
It depends on your firmware (ROM) and you may haven't them at all. And yes, you can mod the script and remove them.
[Nexus 5 Themes and Apps] Wergin:
unwanted Apps

Go in setting> Apps setting..

And Delete the unwanted Apps..
[Nexus 5 Themes and Apps] ClassicalDonkey:
Thank you for that...ok so i deleted the folders no prob...but it looks like the folders are not getting copied to the system folder!!!

Edit: I found out why It did not work, I followed your images LOL But thank you its good to use my brain

Your pics show it as:-

\META-INF
\system
\media
\audio
\alarms
\notifications
\ringtones

When it should be:-

\META-INF
\system
\media
\audio
\alarms
\notifications
\ringtones
[Nexus 5 Themes and Apps] radialblur:
I'm using stock 4.4.2 (as it came out of the box) I am going to re-flash it tonight back to stock and re-try this because I am sure those apps were in that dir before I ran the script which would mean they have been removed as they are no longer there, but they still work!?! I've cleared caches etc but still they persist, I'll do some digging and report back :)
[Nexus 5 Themes and Apps] Patrics83:
Check /data/app as well unless you have already done that ;)

Sent from my HTC One
[Nexus 5 Themes and Apps] MoJo:
Please, read 4th line in 1st post, may be it'll help.
[Nexus 5 Themes and Apps] radialblur:
Spot on, not sure how I missed that! :) I've since updated the script with everything unwanted from /data/app also and all removed perfectly, I'll post a copy of my version of the script if anyone wants?

I also removed hangouts.apk and copied mms.apk from my Nexus4 on 4.4.2 and installed on Nexus 5 which made me happy because Hangouts was the remaining apk that I wanted to get rid of :)

Excellent script MoJo, thank you :)

R.
[Nexus 5 Themes and Apps] Spacewide:
quest

Thanks for sharing, I'll be trying this script tomorrow.

One tiny rookiequestion though.

Is this similar like removing the .apk files in /system/app/xx.apk by hand?

Running 4.4.2 cataclysm

Thanks
[Nexus 5 Themes and Apps] Opentang:
You got it! I've got my script deleting useless apps, installing custom boot animation, and swapping AOSP system sounds to Google's system sounds.

Makes life much better!
[Nexus 5 Themes and Apps] MoJo:
It's the same.
[Nexus 5 Themes and Apps] asturnauta:
Hi,

On stock rom, Is this script safe?,

Have I to remove the .odex files too? (only for apps with .apk and .odex)

Thanks.
[Nexus 5 Themes and Apps] MoJo:
It's safe, when you clear the dalvik cache after the script execution, the corresponding odex files should be removed too.
[Nexus 5 Themes and Apps] radialblur:
Oddly I found that to not be the case, when the script was run I cleared cache and dalvik immediately after and the .odex files still exist.
[Nexus 5 Themes and Apps] ClassicalDonkey:
can you add this to the script...as i have tried but getting status 6 and then it aborted

run_program("/sbin/busybox", "umount", "/system");
ui_print("Mount Data partition ...");
#mount("/data");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Start cleaning useless data apps ...");
delete_recursive"/data/data/com.android.stk");
#mount("/data");
ui_print("Unmount Data partition ...");
ui_print(" ");
run_program("/sbin/busybox", "umount", "/data");

this is what i have added after the unmount of the system

anyone an idea what i am doing wrong
[Nexus 5 Themes and Apps] MoJo:
As I see, after deleting some apps from /system you wanna delete entire folder /data/data/com.android.stk? Folder name is correct?
[Nexus 5 Themes and Apps] ClassicalDonkey:
Ya I Che k it, I think it's cus of the mounting part but I can't find anything on the net to say you can write like that
[Nexus 5 Themes and Apps] MoJo:
line above should looks like:

delete_recursive("/data/data/com.android.stk");

You missed left parenthesis - (
[Nexus 5 Themes and Apps] ClassicalDonkey:
Your a star... Let try that and will update with it working lol its always the simple things that you miss

Update

Well the script ran... But still see stk still there... How can it stay as I have told the script to delete everything to do with it..... Gggrrrrr
[Nexus 5 Themes and Apps] catnarok:
You are removing the app data for stk (/data/data is the directory where app data exists, not the app itself). If you want to remove the apk, you should be removing /system/app/stk.apk or /system/priv-app/stk.apk (whichever directory stk is located in).
[Nexus 5 Themes and Apps] lolpok:
Even if you uninstall them i guess they are left in data partition?
[Nexus 5 Themes and Apps] ClassicalDonkey:
No got that deleting from system/app/stk.apk earlier in the script. That's why I was ring to delete all other related items but somehow the app is not getting deleted.... Like it has protection

Update

Got it to work but had to use delete_recursive("/system/app/Stk.apk"); when i was using just delete("/system/app/Stk.apk"); before
[Nexus 5 Themes and Apps] k4r70ng:
What functionality does stk give me?
[Nexus 5 Themes and Apps] ClassicalDonkey:
Sim tool kit... Close to useless really... Why I got rid
[Nexus 5 Themes and Apps] MoJo:
Read OP.
[Nexus 5 Themes and Apps] dannyella:
Don't these app have associated lib files? Does it get rid of them?