FORUMS

[SCRIPT] Universal Android Debloater

15 posts
Thanks Meter: 16
 
By w1nst0n_fr, Junior Member on 19th March 2020, 09:16 PM
Post Reply Email Thread
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 provide and maintain a universal tool which remove bloatwares on any Android phones. The main goal is to improve battery performance and privacy by limiting the number of preinstalled apps.

The script has a menu that lets you choose what debloat list(s) you want to use. I strongly encourage you to take a look at the lists because some apps are commented out by default. 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.
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
  • 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
The Following 8 Users Say Thank You to w1nst0n_fr For This Useful Post: [ View ] Gift w1nst0n_fr Ad-Free
19th March 2020, 09:16 PM |#2  
w1nst0n_fr's Avatar
OP Junior Member
Thanks Meter: 16
 
More
Reserved
19th March 2020, 09:18 PM |#3  
w1nst0n_fr's Avatar
OP Junior Member
Thanks Meter: 16
 
More
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.

Reverse engineer an APK
- Apktool
- Jadx
- Bytecode Viewer


How to report bugs
Open an issue on Gitlab and precisely explain the issue. Screenshot can help.
30th April 2020, 06:49 AM |#4  
kurtn's Avatar
Senior Member
Flag Small town in Bavaria
Thanks Meter: 1,348
 
More
Nice approach. Has someone tried to debloat Google play services? Up till now I install GApps free custom ROMs on my phones.
2nd May 2020, 12:49 PM |#5  
kurtn's Avatar
Senior Member
Flag Small town in Bavaria
Thanks Meter: 1,348
 
More
I try extreme google debloat on Samsung A3 2017. First check was OK. Debloater 2.1 with standard settings GFAM worked fine. Factory reset completely restored all the bloatware.

Second try:
Install f-droid and hacker's keyboard before install
$ adb push F-Droid.apk /storage/emulated/0
$ adb push org.pocketworkstation.pckeyboard_1041001.apk /storage/emulated/0
Replace all #"com.google with "com.google in /lists/Google.sh
Debloat GFAM
Reboot is OK. Playstore still there, but can be deactivated. Samsung_bloat can't be debloated.
Sometimes I get the message Google play services has stopped.
F-Droid can install apps. They run.
Galaxy store can't get deactivated.

Edit: debloating webview was no good idea. I've got many crashes of antennapod app. Restoring helped.
3rd May 2020, 05:35 PM |#6  
kurtn's Avatar
Senior Member
Flag Small town in Bavaria
Thanks Meter: 1,348
 
More
Noob solution: copy Samsung list into Google list and debloat GFAM. Looks good. Only headlines are now says four times Samsung.
GMS debloat fails with some device policy error.

Next noob trick
$ adb shell
a3y17lte:/ $ pm uninstall com.google.android.gms
Failure [DELETE_FAILED_DEVICE_POLICY_MANAGER]
a3y17lte:/ $ pm disable-user com.google.android.gms
Package com.google.android.gms new state: disabled-user
6th May 2020, 05:58 AM |#7  
Member
Thanks Meter: 5
 
More
Hi, thank you for this nice thread, exactly what I was looking for.
Possibly a solution for google play services:
I did deactivated the Google play services on Samsung a20 without computer by entering settings app, then "biometric and security" then "other security settings" then "device admin apps" and unselect "find my device", then head over apps in settings and "show system apps, then search for Google play services and now it can be disabled,
For samsung apps you can deactivate it by deactivating "galaxy store"
Perhaps the user must do that before running the code.
HOPE you can manage to translate that into your code language, and integrate it into your script, so we can all enjoy it.
The Following User Says Thank You to Maybeyou For This Useful Post: [ View ] Gift Maybeyou Ad-Free
11th May 2020, 05:08 AM |#8  
Member
Thanks Meter: 5
 
More
Thank you very much, worked like a charm.
11th May 2020, 11:47 PM |#9  
Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by w1nst0n_fr

[CENTER]Universal Android Debloater

@xgouchet (developer of the Stanley app)[/LIST][/LEFT]

Hi, I encountered a very small problem today when i tried to share a video to another phone through Wi-Fi Direct, I can't share with wifi Direct, the only available option is bluetooth (see attachment), do you how can I solve this ?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20200511-223742_Android System.jpg
Views:	210
Size:	204.1 KB
ID:	5016821  
12th May 2020, 02:52 AM |#10  
kurtn's Avatar
Senior Member
Flag Small town in Bavaria
Thanks Meter: 1,348
 
More
Quote:
Originally Posted by Maybeyou

Hi, I encountered a very small problem today when i tried to share a video to another phone through Wi-Fi Direct, I can't share with wifi Direct, the only available option is bluetooth (see attachment), do you how can I solve this ?

Search your "debloated packages" list for wifi related stuff and restore that. Or make sure both devices are i the same wlan and use an app like TrebleShot or KDE connect
12th May 2020, 09:43 PM |#11  
w1nst0n_fr's Avatar
OP Junior Member
Thanks Meter: 16
 
More
Sorry for the wait!

I'm glad you find my project useful !

Quote:
Originally Posted by kurtn

Nice approach. Has someone tried to debloat Google play services? Up till now I install GApps free custom ROMs on my phones.

I don't understand your question. If you want to debloat Google Play Services why do install Gapps in the first place ?

Quote:
Originally Posted by kurtn

Install f-droid and hacker's keyboard before install [...]
Reboot is OK. Playstore still there, but can be deactivated. Samsung_bloat can't be debloated.
Sometimes I get the message Google play services has stopped. [...]
Edit: debloating webview was no good idea. I've got many crashes of antennapod app. Restoring helped.

Small tip : you can directly do
Code:
$ adb install F-droid.apk
There was a pretty nasty bug in v2.1 which prevented using the the "manufacturer lists". Use v2.2.1 (or, better, wait for the v1.3 which should be released within the week!)

If you have the message `Google Play Services has stopped` it means you didn't uninstall the package. Did you uninstall some Google packages in the advanced debloat section ?

Regarding the Google Webview you can uninstall it but a lot of apps will no longer work correctly or even open. Bromite WebView is a good and more private alternative if you really need a Webview (which is a kind of mini web browser for apps which need to display web content btw)


Quote:
Originally Posted by kurtn

Looks good. Only headlines are now says four times Samsung.
GMS debloat fails with some device policy error.

Quote:
Originally Posted by Maybeyou

Hi, thank you for this nice thread, exactly what I was looking for.
Possibly a solution for google play services:
I did deactivated the Google play services on Samsung a20 without computer by entering settings app, then "biometric and security" then "other security settings" then "device admin apps" and unselect "find my device", then head over apps in settings and "show system apps, then search for Google play services and now it can be disabled,
For samsung apps you can deactivate it by deactivating "galaxy store"
Perhaps the user must do that before running the code.
HOPE you can manage to translate that into your code language, and integrate it into your script, so we can all enjoy it.

@Maybeyou is right. You need to uncheck Find My Device from the Device admin apps before trying to uninstall the Google Play Services.

I already mentioned this in the Google.sh file and a script can't do it. It's something you need to do ! I assume a user will read the package description I wrote in the advanced debloat section before doing anything.

Quote:
Originally Posted by Maybeyou

Hi, I encountered a very small problem today when i tried to share a video to another phone through Wi-Fi Direct, I can't share with wifi Direct, the only available option is bluetooth (see attachment), do you how can I solve this ?

Mhm... I delete Wifi-direct by default but I'm gonna change this behavior for the next version.

Restore com.samsung.android.allshare.service.fileshare to get Wifi-direct back
The Following 2 Users Say Thank You to w1nst0n_fr For This Useful Post: [ View ] Gift w1nst0n_fr Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes