Skip to content

Make your Android Device faster, free up some space, debloat the junk that device manufacturers put in it, without any risk of damage or warranty void.

License

Notifications You must be signed in to change notification settings

notabombe/android-debloat

Repository files navigation

Android Debloater

Forked from https://gitlab.com/W1nst0n/universal-android-debloater

DISCLAIMER: Use this script at your own risk. I am not responsible if your phone explodes or your alarm doesn't work and you wake up late.

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/restore (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) (WIP)

NB : It 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 / Miscellaneous

Manufacturers debloat lists

  • Archos
  • Asus
  • Blackberry
  • Gionee
  • LG
  • Google
  • HTC
  • Huawei
  • Motorola
  • Nokia
  • OnePlus
  • Oppo
  • Realme
  • Samsung
  • Sony
  • TCL
  • Vivo
  • Wiko
  • Xiaomi
  • ZTE

How to use it

  • Read the FAQ!
  • Do a proper backup of your data! You can never be too careful!
  • Enable Developer Options on your smartphone.
  • Turn on USB Debugging from the developer panel.
  • From the settings, disconnect from any OEM accounts (when you delete OEM account package it could lock you on the lockscreen because the phone can't associate your identity anymore)

Install Dependencies

Linux
  • Install Android platform tools and qpdf on your PC :

Debian Base :

$ sudo apt install android-sdk-platform-tools qpdf

Arch-Linux Base :

$ sudo pacman -S android-tools qpdf

Fedora :

$ sudo yum install android-tools qpdf

Mac OS
  • Install Homebrew
  • Install Android platform tools and qpdf

You will also need to upgrade bash because Apple ships a very old bash version (3.2.57) due to licencing issues.

$ brew install android-platform-tools qpdf bash

You have to make the new bash version your default :

$ sudo echo "/usr/local/bin/bash" >> /etc/shells
$ chsh -s /usr/local/bin/bash

Check if it works :

$ echo $BASH_VERSION

Windows

You will need Chocolatey to install Git and ADB Platform Tools from Google.

choco install adb git -y

Using on Windows

One-Step Process

Right click on the Start Menu and click on Windows Powershell (Admin). Click YES if something pops up. Then wait for a few seconds for it to load and paste the following.

iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/JtvK5'))

That's it! It will run the script program and you will have the control over enabling/disabling packages, restoring and creating backups, and more!

Manual Process
  • Install the dependencies mentioned above
  • Clone this Repository.
  • Browse through the debloat lists to be sure the default selection suits you.
  • Run debloat_script.sh from the Git Terminal

Using WSL (Not Recommended)

For now, there is no USB support in the WSL. This means you need to install both Windows and Linux platform-tools and force the use of Windows adb server.

> adb devices
$ sudo apt update && sudo apt upgrade
$ sudo apt install android-sdk-platform-tools qpdf
  • Check the version of ADB on Linux & Windows
adb version

You need the same version otherwise it will not work. It's very likely your Ubuntu/Debian ADB version is older than the Windows one. Download the lastest linux platform tools from Google & replace your adb binaries with the new ones :

$ wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
$ unzip platform-tools-latest-linux.zip
$ sudo cp platform-tools/adb /usr/bin/adb
$ sudo chmod 755 /usr/bin/adb
$ adb version

Kill the WSL adb server:

$ adb kill-server

And start the ADB server on Windows:

> adb kill-server
> adb start-server
> adb devices

Note: You can access your Windows files under /mnt/c/

Using on any Unix based system

Linux One-Step Process
  • Open the terminal application.
  • Copy and paste the following in the terminal and wait for it.
curl -sSL https://git.io/JtfRu | bash

MacOS One-Step Process
  • Open the terminal application.
  • Copy and paste the following in the terminal and wait for it.
curl -sSL https://git.io/JtfRB | bash

Manual Process

  • Install the dependencies mentioned above
  • Clone this Repository.
  • Browse through the debloat lists to be sure the default selection suits you.
  • Run debloat_script.sh from a Unix terminal

NOTE: Chinese phones users may need to use the AOSP list for removing some stock apps because those chinese manufacturers (especially Xiaomi and Huawei) have been using the name of AOSP packages for their own (modified & closed-source) apps.

IMPORTANT NOTE: You will have to run this script whenever your OEM push an update to your phone as some uninstalled system apps could be reinstalled.

How to contribute

Hey-hey-hey! Don't go away so fast! This is a community project. That means I need you! I'm sure you want to make this project better anyway.

==> How to contribute

About

Make your Android Device faster, free up some space, debloat the junk that device manufacturers put in it, without any risk of damage or warranty void.

Resources

License

Stars

Watchers

Forks

Packages

No packages published