国际版系统对比国内版缺失了不少东西,有些可以自己从系统里面提取

  • 推荐使用 mac 或者 linux 运行命令

Windows 建议自力更生

  • 默认提取到 /tmp/apk,该文件夹需要提前创建

提取所有APK包

1
2
3
4
5
6
7
8
# 所有
for i in $(adb shell pm list packages | awk -F: '{print $NF}')
do
apk_path=`adb shell pm path ${i} | awk -F: '{print $NF}'`
tmp_path=/tmp/apk/$i.apk
echo -e "adb pull $apk_path -> $tmp_path"
adb pull $apk_path $tmp_path
done

提取xiaomi包

1
2
3
4
5
6
7
8
# 小米包
for i in $(adb shell pm list packages | grep xiaomi | awk -F: '{print $NF}')
do
apk_path=`adb shell pm path ${i} | awk -F: '{print $NF}'`
tmp_path=/tmp/apk/$i.apk
echo -e "adb pull $apk_path -> $tmp_path"
adb pull $apk_path $tmp_path
done

提取miui包

1
2
3
4
5
6
7
8
# miui 包
for i in $(adb shell pm list packages | grep miui | awk -F: '{print $NF}')
do
apk_path=`adb shell pm path ${i} | awk -F: '{print $NF}'`
tmp_path=/tmp/apk/$i.apk
echo -e "adb pull $apk_path -> $tmp_path"
adb pull $apk_path $tmp_path
done

提取短信包

1
2
3
4
5
6
7
8
# 短信
for i in $(adb shell pm list packages | grep mms | awk -F: '{print $NF}')
do
apk_path=`adb shell pm path ${i} | awk -F: '{print $NF}'`
tmp_path=/tmp/apk/$i.apk
echo -e "adb pull $apk_path -> $tmp_path"
adb pull $apk_path $tmp_path
done

提取主题商店包

1
2
3
4
5
6
7
8
# 主题商店
for i in $(adb shell pm list packages | grep theme | awk -F: '{print $NF}')
do
apk_path=`adb shell pm path ${i} | awk -F: '{print $NF}'`
tmp_path=/tmp/apk/$i.apk
echo -e "adb pull $apk_path -> $tmp_path"
adb pull $apk_path $tmp_path
done

提取电话、联系人

1
2
3
4
5
6
7
8
# 电话、联系人
for i in $(adb shell pm list packages | grep contacts | awk -F: '{print $NF}')
do
apk_path=`adb shell pm path ${i} | awk -F: '{print $NF}'`
tmp_path=/tmp/apk/$i.apk
echo -e "adb pull $apk_path -> $tmp_path"
adb pull $apk_path $tmp_path
done