Last active
July 18, 2019 09:25
-
-
Save T-rex2017/9eeedf5482ea96115d67ed57d2edd9a1 to your computer and use it in GitHub Desktop.
script to uninstall all 3rd party applications via adb
This file contains hidden or 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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`