[SCRIPT] [2021-01-30] [v2.9] Universal Android Debloater

Search This thread

kurtn

Senior Member
Jan 28, 2017
3,883
1,660
Small town in Bavaria
@w1nst0n_fr
Is it possible for you to make an aroma version of your script for us those aren't able to deal with linux/bash?
That would be very nice of you to make such a thing.
Just a suggestion :)
Aroma means, you wish to run this debloater in twrp? This debloater is special, because it works well for unmodified devices with locked bootloader. I think there are other solutions for rooted devices.
 
Last edited:
  • Like
Reactions: Tosgaba

Tosgaba

Senior Member
Jul 20, 2013
147
35
Gorgoroth
Aroma means, you wish to run this debloater in twrp? This debloater is special, because it works well for unmodified devices with locked bootloader. I think there are other solutions for rooted devices.
Yeah TWRP was what I meant.
Yes there are many twrp flashable debloaters but they aren't being updated regularly and are outdated.
Because of that even if some of us are rooted, we need this debloater as twrp flashable too ?.
Thanks for the feedback
 

kurtn

Senior Member
Jan 28, 2017
3,883
1,660
Small town in Bavaria
Today i got a Samsung galaxy xcover 4 with June 2019 srcurity patch level. I dit not update immediately. I first debloated v2.3.2. Everyting worked fine. I had to enable gmail, gmaps, playstore and play services in the list.
Ota update to December security patch worked without problems. Only strange finding: at first start the counter ran up to 276 apps for optimisation. Seems like the debloated apps get optimised as well.

Oh yes, debloat and restore single packages ends in [EXIT ERROR TRAP]
 
Last edited:

CG_Tech

Member
Jun 28, 2020
10
4
Bilaspur
Thanks For this script

I was looking for such script to automate deblot process. i m tired of unistalling pakage one by one.
thanks for the video in xdaTV "How To Uninstall Carrier OEM Bloatware Without Root Access Video Tutorial"
Now i can temp remove oppo's fu..ing bloatware.
thanks
 

w1nst0n_fr

Member
Dec 27, 2019
45
72
gitlab.com
New version (v2.4) is out. Changelog is on Gitlab ! :cowboy:


Today i got a Samsung galaxy xcover 4 with June 2019 srcurity patch level. I dit not update immediately. I first debloated v2.3.2. Everyting worked fine. I had to enable gmail, gmaps, playstore and play services in the list.
Ota update to December security patch worked without problems. Only strange finding: at first start the counter ran up to 276 apps for optimisation. Seems like the debloated apps get optimised as well.

Yeah that sucks but I can't really do anything about this. Manufacturers can still update "uninstalled" system apps through OTA updates. You have to use the debloat script after every update.


Oh yes, debloat and restore single packages ends in [EXIT ERROR TRAP]

I fixed this in v2.4. :)
 

blackwood1

Member
Jun 19, 2020
5
0
i get this

cp: cannot stat 'platform-tools/adb': No such file or directory

at this stage
36jaZ.png


help plz :(
 

w1nst0n_fr

Member
Dec 27, 2019
45
72
gitlab.com
Yes! that's the gps app I use, I removed everything from carriers, google, huawei and miscellaneous lists

I'e ve reinstalled both the mentioned packages and still no gps...

Why can't you upload the debloated_packages.txt logfile? It's way easier to debug with the list of packages you really removed (not the general list).

Maybe com.qualcomm.location is also needed? If this still doesn't work, try to restore whole lists and isolate the problematic list.


@w1nst0n_fr
Is it possible for you to make an aroma version of your script for us those aren't able to deal with linux/bash?
That would be very nice of you to make such a thing.
Just a suggestion :)

my phone is rooted , can run the sh from the phone as ROOT ?

For now you can't run the script from a phone. However, in the long run I'd like to release :

- An aroma flashable zip
- A Termux version of the script
- An desktop app for Linux/Windows/MacOS

The 2 first point are not my priority as they require root. The last one will also obviously take some time.

Moreover, the current packages lists only contain package names and not package/APK location and I don't have the time to find the path of more than 1500 packages. If everyone who use my script posts upload their packages location pm list package -s -f I could focus on creating the aroma flashable zip a lot quicker.

i get this

cp: cannot stat 'platform-tools/adb': No such file or directory

help plz :(

Well... that just because you didn't unzip the zip file. :D

Code:
$ unzip platform-tools-latest-linux.zip

I confess I forgot to write down this. I'll add it to the README but I'm sure you would have been able to figure it out on your own. The zip file is called platform-tools all the same! ;)
 
Last edited:

loopypalm

Senior Member
Jul 8, 2016
528
53
Osaka
For now you can't run the script from a phone. ...

Thank you but i already gave up on Xiaomi Official rom ...
there are lot of crap you can't freez/remove (you can but the phone will not boot)
i tried some custom roms and they are way better in term of ram managment/battery life ...
 

abhi_uno

Member
Feb 21, 2016
15
2
Chandigarh
abhitronix.github.io
It works

Universal Android Debloater

[Logo to be created]


Bash script using ADB to debloat non-rooted smartphones. Improve your privacy and increase your battery life.

DISCLAIMER : Use this script at your own risk. I am not responsible for anything that could happen to your phone.


Summary

I try to maintain a universal tool which removes bloatwares on any Android phones by using ADB.
The main goal is to improve battery performance and privacy by removing unnecessary and obscure system apps. This can also contribute to improve security by reducing the attack surface.

The script has a menu that lets you choose what debloat list you want to use. I strongly encourage you to take a look at the lists because the default selection may not suit you. All packages are as well documented as possible in order to provide a better understanding of what you can delete or not.

This script should be safe with the default selection. The worse thing which could happen is preventing an essential system process to be loaded during boot causing then an unfortunate bootloop. After about 5 failed system boots, the phone will automatically reboot in recovery mode and you'll have to perform a FACTORY RESET. So make a backup !
In any case, you can NOT brick your device with this script ! That's the main thing, right ? :)



Features

  • Quick search among all the packages of your phone
  • Uninstallation of system/user packages (manually or with the debloat lists)
  • Reinstallation of system packages (manually or with the debloat lists)
  • ADB backup (not really reliable, see the FAQ)
  • Device brand detection and auto-selection of the appropriate manufacturer debloat list
  • Logs in debloated_packages.txt and remaining_packages.txt.
  • Installation of alternative open-source apps replacing stock apps (list in the WIKI section) (Not yet : WIP)

Universal debloat lists

  • GFAM (Google/Facebook/Amazon/Microsoft)
  • AOSP bloat
  • Manufacturers bloat
  • Mobile carriers bloat
  • Miscellaneous bloat

Manufacturers debloat lists

  • Asus
  • LG
  • Google
  • Huawei
  • Motorola
  • Nokia
  • OnePlus
  • Oppo
  • Samsung
  • Sony
  • Xiaomi
  • ZTE

Mobile carriers debloat lists

  • French carriers : SFR / Orange / Free / Bouygues / Sosh
  • US carriers : T-mobile / Verizon / AT&T / Sprint
  • German carriers : Telekom

Download


How to use


Acknowledgement


Thank you very much, it works very well!
 

timonoj

Senior Member
Oct 22, 2010
473
62
Hong Kong
Hi...Just like previous guy mentioned in your git account, I got the problem for Samsung multi connectivity keeps stopping
Just like the guy mentioned on his post, restoring com.osp.app.signin worked.

I have a second one though. I knew it would uninstall Samsung Pay, and I intended to just reinstall it. But seems it might have removed some additional functionality of the NFC payment system, as after manually reinstalling the app, I can't use the Smart Octopus wallet card function from the Hong Kong version anymore. Any idea which package might have been involved in this one?

Thanks!

EDIT: Seems the "restore backup" didn't like the backups it just made, and told me the 3 files (due to different attempts I ended up making 3 backups, each ~900MB). It said they were all corrupt. Luckily the "restore packages" did work (unluckily, I get to keep 90% of the bloat it was going to remove). After the reboot the apps were reinstalled, and Samsung Pay recovered my Octopus card details.

Just for further details, I ran all this from KDE Neon running on Ubuntu 20.04 LTS.
 

Attachments

  • debloated_packages.txt
    4.2 KB · Views: 33
Last edited:

dzvxo

Member
Apr 30, 2017
39
5
Chicago
I've tried this script on Arch and Ubuntu, but I keep getting "No samsung debloat list found. Feel free to contribute ! :)". None of the debloat options do anything, they kick me back to the main debloat menu. ADB is working and can list packages through the script. Am I missing something?
 

kickban

Senior Member
Feb 17, 2012
216
13
Hello, seems a very nice script (previously i've used some software like this to debloat my Redmi 5).. i have a question.. i was looking for TCL Plex and XDA search make me aware of this thread.. but i can't seem to find the manufacturer in your debloat lists (not here, neither in gitlab Readme.md)




Manufacturers debloat lists

  • Asus
  • Blackberry
  • LG
  • Google
  • Huawei
  • Motorola
  • Nokia
  • OnePlus
  • Oppo
  • Samsung
  • Sony
  • Xiaomi
  • ZTE

Mobile carriers debloat lists
 

w1nst0n_fr

Member
Dec 27, 2019
45
72
gitlab.com
Hi...Just like previous guy mentioned in your git account, I got the problem for Samsung multi connectivity keeps stopping
Just like the guy mentioned on his post, restoring com.osp.app.signin worked.

I have a second one though. I knew it would uninstall Samsung Pay, and I intended to just reinstall it. But seems it might have removed some additional functionality of the NFC payment system, as after manually reinstalling the app, I can't use the Smart Octopus wallet card function from the Hong Kong version anymore. Any idea which package might have been involved in this one? [...]

EDIT: Seems the "restore backup" didn't like the backups it just made, and told me the 3 files (due to different attempts I ended up making 3 backups, each ~900MB). It said they were all corrupt. [...]

1) I'm still tracking the issue. I found a solution but I need someone to test its impact. Any help would be appreciated :)

2) To put it simply, once you removed some core Samsung packages (especially KNOX packages), consider Samsung Health and Samsung Pay will not work at all.

If you want to debloat as much as possible but keep Samsung Pay, try to restore all the KNOX packages on top of com.samsung.android.spay and com.samsung.android.spayfw. Make also sure to have com.osp.app.signin (Samsung Account).

3) It's probably a bug. I recall making some changes in the backup integrity check function a while ago. I didn't really test this because it was simply supposed to improve backup speed. It seems I should have. I will have a look.
EDIT : But ADB backup is also buggy so my integrity check function could totally be ok.

I've tried this script on Arch and Ubuntu, but I keep getting "No samsung debloat list found. Feel free to contribute ! :)". None of the debloat options do anything, they kick me back to the main debloat menu. ADB is working and can list packages through the script. Am I missing something?

Have a look at this issue. It looks like the same problem to me. It will be better if you answer over there instead of here.


You need to add Gionee to the list

Well... ok if you want. But you at least need to give me the packages list of your phone. Or better, document the packages first and then give me the documented list ! :cool:
I can't spend an infinite amount of time on this project. Keep in mind I do this on my free time and there's too much packages to handle alone.


Hello, seems a very nice script (previously i've used some software like this to debloat my Redmi 5).. i have a question.. i was looking for TCL Plex and XDA search make me aware of this thread.. but i can't seem to find the manufacturer in your debloat lists (not here, neither in gitlab Readme.md)

You can't find it because there is no TCL debloat list! Actually I didn't even know TCL made a phone. :eek:

Wait wait wait! Don't go away too fast! I can't make packages lists appear by magic. Only TCL users can give me packages lists. It's always better if you also try do document the packages. If you don't I will be sad but that's okay (and better than nothing).


==> How to contribute

EDIT : I've just seen your thread. Good initiative! Can you send me the complete list? Attach a file to your post here or create an issue on Gitlab.
 
Last edited:

kickban

Senior Member
Feb 17, 2012
216
13
TCL Plex packages list

You can't find it because there is no a TCL debloat list! Actually I didn't even know TCL made a phone. :eek:
Wait wait wait! Don't go away too fast! I can't make packages lists appear by magic. Only TCL users can give me packages lists. It's always better if you also try do document the packages. If you don't I will be sad but that's okay (and better than nothing).
==> How to contribute
EDIT : I've just saw your thread. Good initiative! Can you send me the complete list? Attach a file to your post here or create an issue on Gitlab.

Hello, Winston,

yeah, while i was waiting (and not knowing if would get an answer to it) i began doing something for myself an then started that thread to others who need it
i'm still not sure what packages are "really bloatware" or" aren't but can be removed anyway" and what are system needed apps (i think the tcl and tct packages are all from the manufacturer)

here's the list of the packages (i attach the complete one and a simple one that should be better for your app parsing)

let's wipe this TCL :cool:
 

Attachments

  • TCL_PLEX_PACKAGES_LIST.txt
    33.8 KB · Views: 9
  • TCL_PLEX_PACKAGES_LIST_simple.txt
    8.5 KB · Views: 6

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    In 2.9 it will be a systemless debloat for Android 10+ devices (see the release notes for v2.9-temp if you don't understand why)


    Systemless debloat is the only solution for Android 10+ users because system can't be mounted in read-write anymore.

    Hi w1nst0n. You did a great job with your debloater script. Thanks for sharing it! Keep up the great work!

    It is possible to mount system as read-write in Android 10 and newer.

    There are 2 tools that can do this. My oldschool script and the new sophisticated superrepack tool by @munjeni
  • 39
    Universal Android Debloater

    [Logo to be created]


    Bash script using ADB to debloat rooted and non-rooted smartphones. Improve your privacy and increase your battery life.

    DISCLAIMER : Use this script at your own risk. I am not responsible for anything that could happen to your phone.


    Summary
    I try to maintain a universal tool which removes bloatwares on any Android phones by using ADB.

    The main goal is to improve battery performance and privacy by removing unnecessary and obscure system apps. This can also contribute to improve security by reducing the attack surface. The script has a menu that lets you choose what debloat list you want to use. I strongly encourage you to take a look at the lists because the default selection may not suit you. All packages are as well documented as possible in order to provide a better understanding of what you can delete or not.

    This script should be safe with the default selection. The worse thing which could happen is preventing an essential system process to be loaded during boot causing then an unfortunate bootloop. If you used the non-root solution, after about 5 failed system boots, the phone will automatically reboot in recovery mode and you'll have to perform a FACTORY RESET. So make a backup!


    If you have a rooted device you can also physically delete the apks. Ironically this solution is safer because the script saves the apks before their removal. In case of bootloop you just need to run the script from a recovery with ADB support (e.g TWRP) and restore them.


    In any case, you can NOT brick your device with this script ! That's the main thing, right ? :)

    Features
    • Quick search among all the packages of an android device
    • Uninstallation of system/user packages (manually or with the debloat lists)
    • Reinstallation of system packages (manually or with the debloat lists)
    • ADB backup/restore (not really reliable, see the FAQ)
    • Device brand detection and auto-selection of the appropriate manufacturer debloat list
    • Logging: debloated_packages.txt, remaining_packages.txt, deleted_apks.txt (for root users)
    • Root support (system and systemless with Magisk)
    • Installation of alternative open-source apps replacing stock apps (list in the WIKI section) (Not yet : WIP)

    NB : The non-root method is NOT a real uninstallation for system apps (see the FAQ)

    Universal debloat lists
    • GFAM (Google/Facebook/Amazon/Microsoft)
    • AOSP
    • Manufacturers (OEM)
    • Mobile carriers
    • Qualcomm / Mediatek / Miscellaneous

    Manufacturers debloat lists
    • Asus
    • LG
    • Google
    • Huawei
    • Motorola
    • Nokia
    • OnePlus
    • Oppo
    • Samsung
    • Sony
    • Xiaomi

    Mobile carriers debloat lists
    • French carriers : SFR / Orange / Free / Bouygues / Sosh
    • US carriers : T-mobile / Verizon / AT&T / Sprint
    • German carriers : Telekom

    Download

    How to use

    Acknowledgement
    3
    Hi,

    So I went through with the whole (well documented) debloating instructions and debloated everything there was to debloat until the script said "nothing to debloat :)" on every selectable option. [...] Now the phone wont boot anymore.
    [...] Is this a known issue already? I can be a tester if there are some fixes on the way.

    A new big release (v2.8) is coming soon.

    As for the bootloop, I'm sorry. It seems this only happens (for now) on newer Samsung devices with OneUI 3.0. This is a known issue (see #39). The faulty package seems to be a Google one but hasn't been found yet.

    Only users of those phones can identify it. I can't do anything alone. I would be delighted if you help me on this. Come over to Gitlab. It's easier to track issues. :)

    Any idea why the debloat script won't recognize that I've updated bash to the latest version and set it to default on my MacBook?
    Well... I dunno how I could have failed this but here it is:

    On the 4th line of code, in the if it should be:
    "${BASH_VERSINFO[0]}" < 5 instead of BASH_VERSINFO < 5

    It will be fixed in the next release.
    3
    How to contribute

    Fetch the list of all the system packages of your phone. My script automatically exports this list in a file called remaining_packages.txt after choosing any action in the main menu.

    1. Seek for new packages not present in my debloat lists. You can use this script to check if your list has no duplicate with the current lists in the repository.
    2. Try to document each new packages and create a new issue on Gitlab.

    How to decompile an APK

    - Apktool
    - Jadx (what I use)
    - Bytecode Viewer


    How to report bugs

    Open an issue on Gitlab and precisely explain the issue. Screenshot(s) can help.
    3
    -------------- New Version (v2.9) --------------

    Systemless debloat support. Root features should finally work for all Android versions. Check the full changelog on Gitlab.

    Note: The debloat_script.sh is now in maintenance mode and won't receive any more features. The focus is on the developement of a GUI.

    -------------------------------------------------------

    Will systemless debloat be used on all devices after V2.9 or will older devices still mount system and delete the APK?

    You can choose between the 2 methods.

    By just deleting the APK folder, do you get any orphan data left over (i.e. in shared storage folders within /data/data)?. Maybe if the app is never run then these folders are not created? Would using pm clear com.yourapp.packagename before removing the app clear off any data folders that are remaining?

    Yes, you'll get a bunch of orphan files (apps data, cache, oat files) if the apps already run on your phone.

    Performing pm clear only remove app data and cache. It doesn't remove the folders nor oat files (precompiled code of the app) but that's well enough.

    v2.9 does this before any root debloat.

    Maybe SD Maid or similar app can find the orphan files afterwards and delete them. Or I guess they are probably only small (especially if you have never used the app) so maybe it is not worth the effort and they are doing no harm?

    Yes. That's it. It is not worth the effort all the more so SD Maid exists. This is a really good app, made by a nice person on top of that.

    I believe it is because I missed the countdown the first time I was prompted to accept the action on the device. How can I get the prompt again so I can accept the deletions? (I know this is possibly more a Magisk question, but I figured I'd ask...)

    The error being line 414, you indeed missed the countdown.

    In Magisk Manager (last version), click on the shield icon in the dock (at the bottom of the app). Then, allow superuser rights to Shell
    3
    Happy new year!

    I wouldn't have thought this release would take me this long! Finally, here is the v2.8:


    The changelog is on Gitlab, as usual. This is the last major update for the bash script. I'm sure a lot of people will be happy to know that I added root support. You can even generate a flashable zip if you want!

    I am now focusing on developing a cross-platform GUI.

    EDIT: I reworked the logic behind the flashable zip generation. There was an issue. It is now much simpler and correctly works. I also added a backup of the apks before the flashable zip generation. It's safer.

    I released an hotfix (v2.8.1) with these changes.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone