19 Star 32 Fork 22

胥胥/AndroidTestScripts

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
batch_uninstall.py 587 Bytes
一键复制 编辑 原始数据 按行查看 历史
胥胥 提交于 2015-01-26 19:57 +08:00 . 2015.01.26
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2015年1月26日
@author: xuxu
'''
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 %s" %packageName)
print "remove %s successes." %packageName
if __name__ == "__main__":
uninstall()
print " "
print "All the third-party applications uninstall successes."
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Android
1
https://gitee.com/xuxu1988/AndroidTestScripts.git
git@gitee.com:xuxu1988/AndroidTestScripts.git
xuxu1988
AndroidTestScripts
AndroidTestScripts
master

搜索帮助