无法使用python拉取apk文件

时间:2017-10-02 07:46:34

标签: python adb popen

我正在尝试使用下面的代码拉取apk文件,但它抛出错误: remote object '/system/priv-app/AmazonShopping/AmazonShopping.apk' does not exist

pkg_id="com.amazon.mShop.android.shopping"
    output_path =Popen(["adb", "shell", "pm", "path", pkg_id], stdin=PIPE, stdout=PIPE, stderr=PIPE)
    path, err=output_path.communicate()
    print(path)
    path=path.replace("package:", "")
    print(path)
    call(["adb", "pull", str(path)])

请帮我完成这件事。

0 个答案:

没有答案