使用python编写批量卸载手机中安装的android应用脚本
更新时间:2014年07月21日 16:50:12 投稿:whsnow
该脚本的功能是卸载android手机中安装的所有第三方应用,主要是使用adb shell pm、adb uninstall 命令,需要的朋友可以参考下
该脚本的功能是卸载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 GUI编程之tkinter 关于 ttkbootstrap 的使用
ttkbootstrap 是一个基于 tkinter 的界面美化库,使用这个工具可以开发出类似前端 bootstrap 风格的 tkinter 桌面程序,这篇文章主要介绍了Python GUI编程之tkinter 关于 ttkbootstrap 的使用详解,需要的朋友可以参考下2022-03-03Python中的内存管理之python list内存使用详解
这篇文章主要介绍了Python中的内存管理之python list内存使用详解,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2021-09-09
最新评论