Posted in Python onJuly 21, 2014
该脚本的功能是卸载android手机中安装的所有第三方应用,主要是使用adb shell pm、adb uninstall 命令,所以使用的前提是需要配好adb的环境变量,下面上代码:
#!/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."
使用python编写批量卸载手机中安装的android应用脚本
- Author -
whsnow声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@