android从Marketplace安装应用程序后,是否保留。apk文件?

Android是否有一个保存这些文件的标准位置?


当前回答

另一种在根设备上找不到apks的方法是使用rom工具箱。

使用应用程序管理器进行备份,然后转到storage/emulated/appmanager,检查系统应用程序备份或用户应用程序备份。

其他回答

与所选答案上所写的相反,你不需要root,并且可以获得已安装应用程序的apk,这就是我在我的应用程序上所做的(这里)。例子:

List<PackageInfo> packages=getPackageManager().getInstalledPackages(0);

然后,对于列表中的每一项,您都可以访问packageInfo.applicationInfo。sourceDir,这是已安装应用的APK的完整路径。

安装Total Commander。 在主页面打开已安装的应用程序。

There is no standard location, however you can use the PackageManager to find out about packages and the ApplicationInfo class you can get from there has various information about a particular package: the path to its .apk, the path to its data directory, the path to a resource-only .apk (for forward locked apps), etc. Note that you may or may not have permission to read these directories depending on your relationship with the other app; however, all apps are able to read the resource .apk (which is also the real .apk for non-forward-locked app).

如果你只是在shell中闲逛,目前非前向锁定的应用程序位于/data/app/.apk中。shell用户可以读取特定的.apk,但不能列出目录。在未来的版本中,命名约定将略有改变,所以不要指望它保持不变,但如果您从包管理器中获得.apk的路径,那么您可以在shell中使用它。

你可以在adb shell上使用包管理器(pm)来列出包:

adb shell pm list packages | sort

要显示.apk文件的位置:

adb shell pm path com.king.candycrushsaga
package:/data/app/com.king.candycrushsaga-1/base.apk

和adb拉来下载apk。

adb pull data/app/com.king.candycrushsaga-1/base.apk

要找到apk,请从Play商店下载并安装蓝牙应用程序发送器。安装完成后,打开蓝牙应用程序发送器。它会显示所有的应用程序(.apk)安装在你的设备,然后你可以很容易地将应用程序通过蓝牙传输到你的电脑。