使用adb命令获取已安装应用的APK [英] get APK of installed app with adb command

查看:2002
本文介绍了使用adb命令获取已安装应用的APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在Android手机上获取已安装应用的APK文件,我遵循了此答案表示不需要root访问。

I try to get the APK file of installed app on my Android phone, I followed this answer which says no need for root access.

我知道Facebook应用包的名称为 com.facebook.katana ,我可以通过命令<$ c $看到它c> adb shell pm列表包。

I know Facebook app package name is com.facebook.katana, I see it with command adb shell pm list package.

然后,我在命令行中尝试:

Then, I tried in command line:

adb shell pm path com.facebook.katana

它返回:

package:/data/app/com.facebook.katana-2/base.apk

然后,我通过以下方式将apk文件拉到计算机上:

Then, I pull the apk file to my computer by:

adb pull /data/app/com.facebook.katana-2/base.apk

但是输出是:

adb: error: remote object '/data/app/com.facebook.katana-2/base.apk' does not exist

为什么我无法获取APK,但那

Why I can not get the APK but that answer says it works?

推荐答案

通过设置目标路径将APK文件从Android设备拉到开发盒。

Pull the APK file from the Android device to the development box by setting destination path.

adb pull /data/app/com.facebook.katana-2/base.apk path/to/desired/destination

或使用,

adb shell cat /data/app/com.facebook.katana-2/base.apk > app.apk 

这篇关于使用adb命令获取已安装应用的APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆