[Script] Delete unwanted apps

Search This thread

MoJo

Senior Member
Sep 23, 2006
222
74
West New York
From the time I had HTC HD2 i use a script for deleting unwanted apps.
This script should be installed from custom recovery (works flawlessly with TWRP 2.6.3.4) like any app or kernel.
After script execution clear cache/Dalvik and reboot.
If any of the apps updated, then the updated apps will be in data/app and needs deleted from there as well.

Apps list may vary depending upon the particular firmware.
Using this script as example you may add/remove any apps in updater-script inside archive according to your needs.

List of apps I delete from /system/app (currently running Cataclysm ROM):
- BasicDreams
- Books
- Calculator (I use Calculator Mem Lite)
- Drive
- GenieWidget
- GoogleEars
- GoogleEarth
- GoogleHindiIME
- GoogleHome (I use Nova Launcher Prime)
- GooglePinyinIME
- GoogleTTS
- HTMLViewer
- iWnnIME
- iWnnIME_Kbd_White
- Keep
- KoreanIME
- LiveWallpapersPicker
- Magazines
- Music2 (I use WinAmp and PowerAmp)
- PlayGames
- PlusOne
- Stk
- Street
- Videos

P.S. I am not responsible for any damage to you phone, you do it on your own risk.
 

Attachments

  • del_useless_apps_busybox.zip
    191.3 KB · Views: 3,847
Last edited:

AndrasLOHF

Senior Member
Jan 7, 2013
2,875
2,065
From the time I had HTC HD2 i use a script for deleting unwanted apps. This script should be installed from recovery like any app or kernel. After install just clear cache/Dalvik and reboot.

List of apps I delete from my Nexus 5 (using Cataclysm now):
- BasicDreams
- Books
- Calculator (I use Calculator Mem Lite)
- Drive
- GenieWidget
- GoogleEars
- GoogleEarth
- GoogleHindiIME
- GoogleHome (I use Nova Launcher Prime)
- GooglePinyinIME
- GoogleTTS
- HTMLViewer
- iWnnIME
- iWnnIME_Kbd_White
- Keep
- KoreanIME
- LiveWallpapersPicker
- Magazines
- Music2 (I use WinAmp and PowerAmp)
- PlayGames
- PlusOne
- Stk
- Street
- Videos

You may add any useless apps in list using this script as example.
P.S. Busybox must be installed.

How exactly do we add apps to the list to delete? I see the folder contains the recovery script but no list from which to edit. Do we just use 7zip, create a folder within the zip, then add apk names???? I miss having ROM Cleaner from my Evo LTE and have been looking for a suitable replacement on the Nexus 5. This way I don't have to keep waiting for the same 20 apps I delete from SlimKat to convert to ART when dirty flashing lol.
 

MoJo

Senior Member
Sep 23, 2006
222
74
West New York
How exactly do we add apps to the list to delete? I see the folder contains the recovery script but no list from which to edit. Do we just use 7zip, create a folder within the zip, then add apk names???? I miss having ROM Cleaner from my Evo LTE and have been looking for a suitable replacement on the Nexus 5. This way I don't have to keep waiting for the same 20 apps I delete from SlimKat to convert to ART when dirty flashing lol.

Unpack archive, in /META-INF/com/google/android/updater-script make your changes, save, use 7Zip->save->archive format:zip, compression level:Store->press OK, that's all.
 
  • Like
Reactions: Opentang

AndrasLOHF

Senior Member
Jan 7, 2013
2,875
2,065
Thanks I think I got it. I used Notepad++ to edit the script. I added some priv-app apks too. Will that cause any issues? I just changed /app/ to /priv-app/ in the code.
 
Last edited:

UgoBoss

Senior Member
Nov 10, 2012
488
230
Just there.
Thank's for sharing this ! Aweosme ! Every time, I was doing it with Titanium Backup xD

Just a curious question, was does happend if the app doesn't exist in the system ? Example 'delete("/system/app/Test.apk");' but Test.apk doesn't exist, does that change something ? I don't think so but just wanted to ask before I will try tomorrow :)

Thank's !
 

UgoBoss

Senior Member
Nov 10, 2012
488
230
Just there.
Can I take the same files (the folder META-INF) for Nexus 7 2013 ? Or I need to replace it by one in a rom for N7 ?

Thank's ! :)

EDIT : I just saw this line in the updater-scrpit '#This script for Nexus 5 ONLY!' I will see how to do it on Nexus 7 !
 
Last edited:

MoJo

Senior Member
Sep 23, 2006
222
74
West New York
Can I take the same files (the folder META-INF) for Nexus 7 2013 ? Or I need to replace it by one in a rom for N7 ?

Thank's ! :)

EDIT : I just saw this line in the updater-scrpit '#This script for Nexus 5 ONLY!' I will see how to do it on Nexus 7 !

Yes, you can use META-INF folder.
Mount line for Nexus 7 (2012) will looks something like:
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");

But it seems that N7 2013 has same partitions structure like N5, so this script should fit Nexus 7 (2013) w/o any changes.
 
Last edited:
  • Like
Reactions: UgoBoss

bradputt

Senior Member
Jun 16, 2010
1,336
296
this script screw up my phone real bad.... i have to wipe everything and flash my ROM again, then restore my nandroid backup.

i don't know which part of your script is not compatible with my phone, multiboot or ART.
 

MoJo

Senior Member
Sep 23, 2006
222
74
West New York
this script screw up my phone real bad.... i have to wipe everything and flash my ROM again, then restore my nandroid backup.

i don't know which part of your script is not compatible with my phone, multiboot or ART.

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.
 
Last edited:
  • Like
Reactions: _Russ_

bradputt

Senior Member
Jun 16, 2010
1,336
296
Installed script yesterday, no problems at all!

Are you on multiboot?

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.

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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    From the time I had HTC HD2 i use a script for deleting unwanted apps.
    This script should be installed from custom recovery (works flawlessly with TWRP 2.6.3.4) like any app or kernel.
    After script execution clear cache/Dalvik and reboot.
    If any of the apps updated, then the updated apps will be in data/app and needs deleted from there as well.

    Apps list may vary depending upon the particular firmware.
    Using this script as example you may add/remove any apps in updater-script inside archive according to your needs.

    List of apps I delete from /system/app (currently running Cataclysm ROM):
    - BasicDreams
    - Books
    - Calculator (I use Calculator Mem Lite)
    - Drive
    - GenieWidget
    - GoogleEars
    - GoogleEarth
    - GoogleHindiIME
    - GoogleHome (I use Nova Launcher Prime)
    - GooglePinyinIME
    - GoogleTTS
    - HTMLViewer
    - iWnnIME
    - iWnnIME_Kbd_White
    - Keep
    - KoreanIME
    - LiveWallpapersPicker
    - Magazines
    - Music2 (I use WinAmp and PowerAmp)
    - PlayGames
    - PlusOne
    - Stk
    - Street
    - Videos

    P.S. I am not responsible for any damage to you phone, you do it on your own risk.
    4
    I would like to if I could also mount data to delete data/apps. And if so how would the code be written out.
    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

    Just remember if any of the apps updated the updated apps will be in data/app and needs deleted from there as well
    You are right, I forgot mention that in OP.

    "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

    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
    3
    Why not just mount system partition with busybox? Then it works on any device.
    I know, I used busybox in script before.
    Updated OP, added same script with busybox, should work on any device with custom recovery.
    2
    Example 'delete("/system/app/Test.apk");' but Test.apk doesn't exist, does that change something ?
    Don't worry, if file doesn't exist, that does change nothing!
    1
    How exactly do we add apps to the list to delete? I see the folder contains the recovery script but no list from which to edit. Do we just use 7zip, create a folder within the zip, then add apk names???? I miss having ROM Cleaner from my Evo LTE and have been looking for a suitable replacement on the Nexus 5. This way I don't have to keep waiting for the same 20 apps I delete from SlimKat to convert to ART when dirty flashing lol.

    Unpack archive, in /META-INF/com/google/android/updater-script make your changes, save, use 7Zip->save->archive format:zip, compression level:Store->press OK, that's all.