universal-android-debloater/README.md

167 lines
5.8 KiB
Markdown
Raw Normal View History

2019-04-01 01:34:25 +13:00
# Universal Android Debloater
2019-03-31 03:42:24 +13:00
2020-02-07 05:36:36 +13:00
**DISCLAIMER**: Use this script at your own risk. I am not responsible for anything that could happen to your phone.
2019-04-20 12:11:12 +12:00
2020-02-07 05:36:36 +13:00
## Summary
I try to maintain a universal tool which removes bloatwares on any Android phones by using ADB.
2019-04-21 12:42:02 +12:00
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](https://en.wikipedia.org/wiki/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.
2020-02-07 05:36:36 +13:00
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!
2019-04-20 12:11:12 +12:00
In any case, you can NOT brick your device with this script! That's the main thing, right?
2019-12-16 11:21:39 +13:00
2020-02-07 05:36:36 +13:00
## Features
2019-12-16 11:21:39 +13:00
* [X] Quick search among all the packages of your phone
2020-02-07 05:36:36 +13:00
* [X] Uninstallation of system/user packages (manually or with the debloat lists)
2020-03-05 09:54:24 +13:00
* [X] Reinstallation of system packages (manually or with the debloat lists)
2020-07-17 05:20:55 +12:00
* [X] ADB backup (not really reliable, see the [FAQ](https://gitlab.com/W1nst0n/universal-android-debloater/-/wikis/FAQ))
2020-02-07 05:36:36 +13:00
* [X] Device brand detection and auto-selection of the appropriate manufacturer debloat list
* [X] Logs in `debloated_packages.txt` and `remaining_packages.txt`.
2020-01-11 13:26:48 +13:00
* [ ] Installation of alternative open-source apps replacing stock apps (list in the WIKI section) (WIP)
2020-01-10 01:45:55 +13:00
2020-02-07 05:36:36 +13:00
NB : It is NOT a real uninstallation for system apps (see the [FAQ](https://gitlab.com/W1nst0n/universal-android-debloater/-/wikis/FAQ))
2019-04-01 01:34:25 +13:00
2020-02-07 05:36:36 +13:00
## Universal debloat lists
2020-01-10 01:45:55 +13:00
* [X] GFAM (Google/Facebook/Amazon/Microsoft)
* [X] AOSP
* [X] Manufacturers (OEM)
* [X] Mobile carriers
* [X] Others / Miscellaneous
2019-12-16 11:21:39 +13:00
2020-02-07 05:36:36 +13:00
## Manufacturers debloat lists
2019-04-25 23:14:06 +12:00
* [ ] Archos
2019-04-20 12:34:08 +12:00
* [X] Asus
* [X] LG
* [X] Google
2019-04-20 14:04:22 +12:00
* [ ] HTC
2019-04-20 12:34:08 +12:00
* [X] Huawei
2020-02-07 05:36:36 +13:00
* [X] Motorola
2019-04-20 12:34:08 +12:00
* [X] Nokia
2020-03-05 09:54:24 +13:00
* [X] OnePlus
2020-06-08 08:05:59 +12:00
* [X] Oppo
2019-04-20 12:34:08 +12:00
* [X] Samsung
* [X] Sony
* [ ] Wiko
* [X] Xiaomi
2020-02-07 05:36:36 +13:00
* [ ] ZTE
## Mobile carriers debloat lists
|France | USA |Germany |
2020-02-07 05:36:36 +13:00
|:---------------:|:--------:|:----------:|
| Orange | T-Mobile | Telekom |
| SFR | Verizon | |
| Free | Sprint | |
| Bouygues / Sosh | AT&T | |
2019-03-31 03:42:24 +13:00
2020-02-07 05:36:36 +13:00
## How to use it
- **Read the [FAQ](https://gitlab.com/W1nst0n/universal-android-debloater/-/wikis/FAQ) !**
2020-02-07 05:36:36 +13:00
- **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 developper panel.
2020-06-16 06:26:37 +12:00
<p>
<details>
<summary>LINUX</summary>
2019-04-20 12:11:12 +12:00
2020-06-16 06:26:37 +12:00
- Install *Android plateform tools* and *qpdf* on your PC :
2020-02-07 05:36:36 +13:00
Debian Base :
2020-06-08 01:08:31 +12:00
```bash
2020-06-08 08:05:59 +12:00
$ sudo apt install android-sdk-platform-tools qpdf
2020-02-07 05:36:36 +13:00
```
Arch-Linux Base :
2020-06-08 01:08:31 +12:00
```bash
2020-06-08 08:05:59 +12:00
$ sudo pacman -S android-tools qpdf
```
Fedora :
2020-06-08 01:08:31 +12:00
```bash
2020-06-08 08:05:59 +12:00
$ sudo yum install android-tools qpdf
2020-02-07 05:36:36 +13:00
```
2020-06-16 06:26:37 +12:00
</details>
</p>
<p>
<details>
<summary>MAC OS</summary>
2020-02-07 05:36:36 +13:00
- Install [Homebrew](https://brew.sh/)
- 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.
```bash
$ brew install android-platform-tools qpdf bash
```
You have to make the new bash version your default :
```bash
$ sudo echo "/usr/local/bin/bash" >> /etc/shells
$ chsh -s /usr/local/bin/bash
```
Check if it works :
2020-06-08 01:08:31 +12:00
```bash
$ echo $BASH_VERSION
```
2020-06-16 06:26:37 +12:00
</details>
</p>
<p>
<details>
<summary>WINDOWS</summary>
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.
2020-06-16 06:26:37 +12:00
- Download [android platefrom tools](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) and unzip it somewhere. [Add the folder to your PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/).
- [Install USB drivers of your device](https://developer.android.com/studio/run/oem-usb#Drivers)
- Check your device is detected :
```batch
> adb devices
```
2020-01-10 01:45:55 +13:00
2020-06-16 06:26:37 +12:00
- Install [WSL2 (Windows Subsystem for Linux)](https://itsfoss.com/install-bash-on-windows/) in order to be able to run bash scripts.
- Install *Android plateform tools* and *qpdf* from the Debian/Ubuntu shell
2020-06-08 01:08:31 +12:00
```bash
2020-06-16 06:26:37 +12:00
$ sudo apt update && sudo apt upgrade
2020-06-08 08:05:59 +12:00
$ sudo apt install android-sdk-platform-tools qpdf
2020-02-07 05:36:36 +13:00
```
- Check the version of ADB on Linux & Windows
2020-06-16 06:26:37 +12:00
```bash
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 plateform tools from Google and replace your adb binaries with the new ones :
```bash
$ wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
2020-06-19 10:10:16 +12:00
$ sudo cp platform-tools/adb /usr/bin/adb
2020-06-16 06:26:37 +12:00
$ sudo chmod 755 /usr/bin/adb
$ adb version
```
Kill the WSL adb server:
2020-06-16 06:26:37 +12:00
```bash
$ adb kill-server
```
And start the ADB server on Windows:
2020-06-16 06:26:37 +12:00
```batch
> adb kill-server
> adb start-server
> adb devices
```
Note: You can access your Windows files under `/mnt/c/`
2019-03-10 02:29:04 +13:00
2020-06-16 06:26:37 +12:00
</details>
</p>
2020-01-10 02:18:55 +13:00
- Download [the lastest release of Android Universal Debloater](https://gitlab.com/W1nst0n/universal-android-debloater/-/releases)
2020-06-16 06:26:37 +12:00
- Check the debloat lists to be sure the default selection suits you.
- Run `debloat_script.sh` from a Unix terminal
```bash
$ bash debloat_script.sh
```
## How to contribute
2020-07-17 05:20:55 +12:00
Hey-hey-hey! Don't go away so fast! This is a community project. That's mean I need you! I'm sure you want to make this project better anyway.
==> [How to contribute](https://gitlab.com/W1nst0n/universal-android-debloater/-/wikis/home#how-to-contribute)