Skip to content

Instantly share code, notes, and snippets.

@T-rex2017
Last active July 18, 2019 09:25
Show Gist options
  • Save T-rex2017/9eeedf5482ea96115d67ed57d2edd9a1 to your computer and use it in GitHub Desktop.
Save T-rex2017/9eeedf5482ea96115d67ed57d2edd9a1 to your computer and use it in GitHub Desktop.
script to uninstall all 3rd party applications via adb
#!/bin/sh
#script to uninstall all 3rd party applications via adb
#chmod +x kick-vendor.sh
#./kick-vendor.sh
clear
if [ `adb get-state` = 'device' ]
then
for i in `adb shell cmd package list packages -3 | sed 's/package://'`
do
echo "[uninstall] : "$i ">> "`adb uninstall $i`
done
echo "[process] : complete\n[reboot] : device"
adb reboot
else
echo "[info] : Allow usb debudding from developer options \n[info] : Reboot the device \n[info] : Choose file transfer"
fi
@T-rex2017
Copy link
Author

T-rex2017 commented Feb 2, 2019

for older android versions this may not work
in android lollipop i had to do these
adb shell
for i in pm list packages -3 | sed 's/package://'``
do
`pm uninstall $i`
`done`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment