Android的安装从市场的应用程序后,它保持的.apk文件?
After android installs an application from the Marketplace, does it keep the .apk file?
有没有一个标准的位置,机器人将保持这样的文件吗?
Is there a standard location where Android would keep such files?
$ P $的应用是在 /系统/应用程序
文件夹。用户安装的应用程序都在 /数据/应用程序
。我猜你不能访问,除非你有一个根深蒂固的手机。
我没有一个非植根电话在这里,但尝试这个code OUT:
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 non 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]);
}
}
它确实列出的apk我的根的HTC Magic和鸸鹋。
It does lists the apks in my rooted htc magic and in the emu.