(
#!/system/bin/sh
sync

# AOSP Debloater
cmd notification post -t 'AOSP Debloater' -i file:///sdcard/mdz.png -I file:///sdcard/mdz.png '' 'Created by @simplifiedmodz' > /dev/null 2>&1

BLOATWARE=(
com.amazon.appmanager
com.amazon.mShop.android.shopping
com.android.chrome
com.android.deskclock.go
com.android.vending
com.facebook.appmanager
com.facebook.services
com.facebook.system
com.go.browser
com.google.android.apps.docs
com.google.android.apps.googleassistant
com.google.android.apps.magazines
com.google.android.apps.maps
com.google.android.apps.photos
com.google.android.apps.podcasts
com.google.android.apps.restore
com.google.android.apps.safetyhub
com.google.android.apps.setupwizard.searchselector
com.google.android.apps.subscriptions.red
com.google.android.apps.tachyon
com.google.android.apps.turbo
com.google.android.apps.wellbeing
com.google.android.apps.youtube.music
com.google.android.calendar
com.google.android.googlequicksearchbox
com.google.android.videos
com.google.android.youtube
com.linkedin.android
com.mi.globalminusscreen
com.miui.cleaner.go
com.miui.fmservice
com.miui.player
com.miui.player.overlay
com.miui.qr
com.miui.videoplayer
com.miui.videoplayer.overlay
com.xiaomi.discover
com.xiaomi.glgm
com.xiaomi.midrop
com.xiaomi.mipicks
com.xiaomi.scanner
de.telekom.tsc
)

for DEL in "${BLOATWARE[@]}"; do
UID=$(pm list packages -U | grep $DEL | head -n 1 | cut -f 3 -d :|sort|uniq)
  pm uninstall-system-updates $DEL > /dev/null 2>&1
  pm clear $DEL > /dev/null 2>&1
  pm clear --user 0 $DEL > /dev/null 2>&1
  pm clear --user $UID $DEL > /dev/null 2>&1
  pm uninstall --user 0 $DEL > /dev/null 2>&1
  pm uninstall -k --user 0 $DEL > /dev/null 2>&1
  pm uninstall --user $UID $DEL > /dev/null 2>&1
  pm uninstall -k --user $UID $DEL > /dev/null 2>&1
  am freeze $DEL > /dev/null 2>&1
  am freeze --sticky $DEL > /dev/null 2>&1
  pm suspend --user $UID $DEL > /dev/null 2>&1
  pm suspend $DEL > /dev/null 2>&1
  pm disable --user $UID $DEL > /dev/null 2>&1
  pm disable-user --user $UID $DEL > /dev/null 2>&1
  pm disable $DEL > /dev/null 2>&1
  pm disable-user --user 0 $DEL > /dev/null 2>&1
  cmd notification post -t 'AOSP Debloater' -i file:///sdcard/mdz.png -I file:///sdcard/mdz.png '' "$DEL" > /dev/null 2>&1
done

cmd notification post -t 'AOSP Debloater' -i file:///sdcard/mdz.png -I file:///sdcard/mdz.png '' 'Done' > /dev/null 2>&1
)&
