Created
March 25, 2021 12:44
-
-
Save vsnthdev/66aa6c18d69657457a080a35ad2096b6 to your computer and use it in GitHub Desktop.
Lenovo P11 Pro (TB-J706L) Bloatware Removal Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# DEFINE THE BLOATWARE APPLICATIONS WHICH | |
# ARE SAFE TO BE REMOVED | |
declare -a bloatware=( | |
# Google Bloatware | |
"com.google.android.apps.subscriptions.red" # Google One | |
"com.google.android.apps.googleassistant" # Google Assistant | |
"com.google.android.apps.docs" # Google Docs | |
"com.google.android.apps.docs.editors.docs" # Google Docs | |
"com.google.android.apps.docs.editors.sheets" # Google Sheets | |
"com.google.android.apps.docs.editors.slides" # Google Slides | |
"com.google.android.apps.maps" # Google Maps | |
"com.google.android.apps.photos" # Google Photos | |
"com.google.android.apps.tachyon" # Google Duo | |
"com.google.android.apps.youtube.music" # YouTube Music | |
"com.google.android.apps.youtube.kids" # YouTube Music | |
"com.google.android.videos" # Google Play Movies & TV | |
"com.google.android.gm" # Gmail | |
"com.google.android.keep" # Google Keep | |
"com.google.android.googlequicksearchbox" # Google | |
"com.google.android.apps.nbu.paisa.user" # Google Pay | |
"com.google.android.youtube" # YouTube | |
"com.google.android.apps.kids.home" # Google Kids | |
"com.google.android.apps.books" # Google Play Books | |
"com.google.android.contacts" # Google Contacts | |
# Lenovo Bloatware | |
"com.wacom.bamboopapertab" # Pen Writing Software | |
"com.netflix.mediaclient" # Netflix | |
"com.steadfastinnovation.android.projectpapyrus" # Squid | |
"com.tblenovo.userguide" # Lenovo User Guide | |
"com.tblenovo.lenovotips" # Tips app | |
"com.tblenovo.soundrecorder" # Sound recorder | |
) | |
# WAIT FOR A DEVICE TO CONNECT | |
clear | |
tput civis | |
echo "This $(tput setaf 6)bash$(tput sgr0) script will 🧻 remove bloatware from a Lenovo P11 Pro device" | |
echo "Waiting ⏳ for a device to be connected" | |
adb wait-for-device | |
# TAKE DEVICE MARKET NAME | |
device_name=$(adb shell getprop ro.product.odm.marketname) | |
if [ -z $device_name ]; then | |
device_name="$(adb shell getprop ro.product.manufacturer) $(adb shell getprop ro.product.model)" | |
fi | |
# LOOP THROUGH ☝️ THE ABOVE APPS | |
# AND REMOVE THEM | |
for i in "${bloatware[@]}" | |
do | |
clear | |
echo "🛁 Removing: $(tput bold)$(tput setaf 6)$i$(tput sgr0)" | |
adb shell pm uninstall -k --user 0 "$i" > /dev/null 2>&1 | |
done | |
# FINALLY, TELL TO REBOOT THE DEVICE | |
clear | |
echo "Successfully debloated your $device_name 🥳" | |
echo "You can now safely 🔌 unplug your $device_name" | |
echo "Please reboot your $device_name now" | |
echo "" | |
echo "Developed & Maintained by Vasanth Developer" | |
echo "For queries 🐦 tweet $(tput bold)$(tput setaf 6)@vasanthdevelop$(tput setaf 0)" | |
tput cnorm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment