Skip to content

Instantly share code, notes, and snippets.

@and2long
Created March 16, 2019 13:38
Show Gist options
  • Save and2long/827a0ba10ec22f5418df1dce5351deb6 to your computer and use it in GitHub Desktop.
Save and2long/827a0ba10ec22f5418df1dce5351deb6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
def uninstall():
os.popen("adb wait-for-device")
print("start uninstall...")
for packages in os.popen("adb shell pm list packages -3").readlines():
packageName = packages.split(":")[-1].splitlines()[0]
os.popen("adb uninstall " + packageName)
print("uninstall " + packageName + " successed.")
if __name__ == "__main__":
uninstall()
print(" ")
print("All the third-party applications uninstall successed.")
@and2long
Copy link
Author

一键卸载安卓手机的所有第三方app

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