Android 是否保留 .apk 文件?如果是在哪里?
- 作者: 名字太长你们说我装逼太短又不够拉风刚
- 来源: 51数据库
- 2022-12-30
问题描述
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.
推荐阅读
热点文章
检查拆分键盘
0
带有“上一个"的工具栏和“下一个"用于键盘输入AccessoryView
0
Activity 启动时显示软键盘
0
UIWebView 键盘 - 摆脱“上一个/下一个/完成"酒吧
0
在 iOS7 中边缘滑动时,使键盘与 UIView 同步动画
0
我的 iOS 应用程序中的键盘在 iPhone 6 上太高了.如何在 XCode 中调整键盘的分辨率?
0
android:inputType="textEmailAddress";- '@' 键和 '.com' 键?
0
禁用 iPhone 中键盘的方向
0
Android 2.3 模拟器上的印地语键盘问题
0
keyDown 没有被调用
0
