A POSIX-compliant shell script for automating the debloat process of Android Devices.
- POSIX-Compliant Shell (dash, ash, etc..)
- USB-Capable PC running Linux-Distribution (Debian/Ubuntu, Fedora, Arch-Linux) for now
- Android Device w/ USB-Cable (root NOT required)
- Know which apks you wish to debloat (obviously)
- portability (POSIX-compliance provides greater conformity)
- automation (automate the task of debloating or restoring apks)
- simplicity (does two things: debloats and restores)
1) [Enable Developer Mode]
- Go into the "Settings" app on your Android Device
- Search for: "Build Number"
(usually located somewhere in Settings -> About)
- Tap "Build Number" 5 times consecutively (agreeing/responding to any prompts as required)
After performing these steps, you should receive a notification that Developer Mode was enabled
2) [Enable USB Debugging]
- Go into the "Settings" app on your Android Device
- Search for: "Developer Settings"
(usually located in the root of the settings menu, otherwise in Settings -> System)
- Toggle "USB Debugging" to on (continue, if given a warning)
IMPORTANT NOTE:
Do not leave USB Debugging on for longer than you intend to keep your device connected!
git clone https://github.com/Seabass5701/android-debloater.git
cd android-debloater
chmod u+x ./*.sh
android_debloater.sh { [<action>] [<apk_list>] || help }
action - action to perform on [<apk_list>]
apk_list - apk[s] to perform [<action>] upon
help - display help menu
debloat - debloat packages
restore - restore [deleted] packages
- may be passed as a file, which contains list of apks (comments allowed)
# file should be formatted as follows:
# here is a test comment
[package:]com.android.chrome # Google Chrome APK
[package:]com.android.bluetooth # Bluetooth APK
[...] # Etc..
- may be passed as actual apk name[s]
./android_debloater.sh [<action>] \
com.android.chrome \
com.android.bluetooth \
[...]
Although many debloat scripts exist already, this script (in particular) was written to:
- vastly minimize (amount of) work needed,
- be fast in execution-speed,
...when debloating/restoring apks on an Android Device.
If adb is not installed, the script will run the "get_sdk_tools.sh" script.