api_commands.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:mobile-monkey 作者: LordAmit 项目源码 文件源码
def adb_uninstall_package(emulator: Emulator, package: str):
    '''
    uninstalls the provided package if only one entry with the specified package is found.
    '''
    # if adb_is_package_present(emulator, package) is not 1:
    #     raise ValueError("Package not found / Too generic.")
    try:
        result = subprocess.check_output(
            [config.adb, '-s', 'emulator-' + emulator.port, 'uninstall', package])
        print("uninstalled " + package)
    except subprocess.SubprocessError as error:
        print("maybe not found/uninstalled already")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号