#! /usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Lani
# @Time : 2021/02/14-18:28:18
# @Platform : Pycharm
import os
third_party = r"D:\third.txt"
export_path = r"D:\export_apk"
pac = {}
def export_apk():
if not os.path.exists(export_path):
os.mkdir(export_path)
os.system("adb shell pm list packages -f -3>{}".format(third_party))
with open(third_party) as f:
for line in f:
apk_path = line.split(":")[1].split("apk=")[0] + str('apk').strip()
package_name = line.split("apk=")[1].strip()
pac[package_name] = apk_path
PCpath = os.path.join(export_path,package_name+str('.apk'))
os.system("adb pull {0} {1}".format(pac[package_name],PCpath))
export_apk()
批量导出手机里的三方APK
最新推荐文章于 2024-01-08 10:53:01 发布