Android 是否保留 .apk 文件?如果是在哪里? [英] Does Android keep the .apk files? if so where?

查看:21
本文介绍了Android 是否保留 .apk 文件?如果是在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

After android installs an application from the Marketplace, does it keep the .apk file?

Android 是否有一个标准的位置来保存此类文件?

Is there a standard location where Android would keep such files?

推荐答案

预装的应用程序位于 /system/app 文件夹中.用户安装的应用程序位于 /data/app 中.我猜你不能访问,除非你有一个根电话.我这里没有root手机,但试试这个代码:

Preinstalled applications are in /system/app folder. User installed applications are in /data/app. I guess you can't access unless you have a rooted phone. I don't have a rooted phone here but try this code out:

public class Testing extends Activity {
    private static final String TAG = "TEST";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        File appsDir = new File("/data/app");

        String[] files = appsDir.list();

        for (int i = 0 ; i < files.length ; i++ ) {
            Log.d(TAG, "File: "+files[i]);

        }
    }

它确实列出了我根深蒂固的 htc 魔法和 emu 中的 apk.

It does lists the apks in my rooted htc magic and in the emu.

这篇关于Android 是否保留 .apk 文件?如果是在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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