找回密码
 立即注册

QQ登录

只需一步,快速开始

教程经验总索引TVMW5/小日本5 索引【视频转换】小日本4/TE4XP 索引【视频转换】TAW4 / TDA3 索引【DVD打包软件】
Nero 索引DVD-Lab 索引【DVD打包软件】编解码器 索引 【必读】固顶帖011号
查看: 4722|回复: 0

[资料] 在recovery 模式里的 wipe dalvik cache 有什么用?

[复制链接]

9328

威望

244

金钱

1万

贡献

管理员

自由的灵魂

积分
99815
主题
5263
回帖
26212
注册时间
2003-4-10
最后登录
2024-3-29
发表于 2014-4-28 22:49:58 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
安卓智能手机刷机时,经常用到 Recovery,里面一个选项是【wipe dalvik cache】, 翻译为【清除 dalvik 缓存】。刷机时究竟有没有必要清除 dalvik 缓存呢?让我们看看下面转引的两段话吧:

CM Wiki上的解释:


    The dalvik-cache directory holds all of the pre-compiled .dex files created from the .apk and .jar files in your phone. These files are generated whenever the Dalvik virtual machine detects that the existing .dex files were made with an older version, typically whenever you install/upgrade CM. (This is why first boot of an upgrade takes longer than a normal boot.)
    Deleting the dalvik-cache directory can fix some bugs like apps starting and crashing (not necessarily force closing). However, there is no reason to 'clear the dalvik-cache' like you would clear the browser cache. Once generated these files are static and only added to if you install new apps.
IsaacZ手译:
  Dalvik缓存目录内包含了手机内所有.apk和.jar文件产生的的.DEX预编译文件。每当Dalvik虚拟机检测到现存的.dex文件来自一个旧的软件版本时,就会生成新的.dex文件——作为一个典型例子,每当你安装或升级CM时,如上情况必会发生。(这就是为什么升级后第一次启动要比正常开机花更长的时间)。
  删除Dalvik缓存目录可以修复一些错误,例如程序启动后崩溃(未必一定表现为“强制关闭或等待”/FC)。不过我们完全没有理由像对待浏览器缓存那样去“清除Dalvik缓存”,因为这些文件一旦生成,就以静态文件形式存在,只有在安装新的程序时才会添加新的进去。


Cyanogen在xda的回答:

    When Android starts up, the DalvikVM looks thru all of your applications (.apk files) and frameworks, and builds a tree of dependencies.  It uses this dependency tree to optimize the bytecode for every application and stores it in the Dalvik cache.  The applications are then run using the optimized bytecode.  This is why when you install a new ROM, sometimes it takes a very long time to boot for the first time.  Any time an application (or framework library) changes, it's reoptimized and the cache is updated.

  当Android系统启动时,Dalvik虚拟机会遍历所有的应用程序(.apk文件)和框架,并建立一个依存关系树。它用这个依存关系树来优化每个应用程序的字节码,并将之存储在Dalvik缓存中。应用程序运行时,将会用到这些优化过的字节码。这就是当你装一个ROM后第一次启动会耗时很长的原因。每当一个应用程序或者框架库产生变化,都会被优化,Dalvik缓存也将随之更新
IsaacZ的发言中如果提到任何字母缩写或专有名词,在本论坛中一般都能搜索到。点此立即搜索点拨论坛。如有搜索不到的,请尝试搜索百度百科,或者跟帖提问。
发帖前请注意看置顶帖。如果你发现自己的问题没有得到回答,说明你的问题提错了地方或者提问前未先阅读本版规则固顶帖011号
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|点拨论坛

GMT+8, 2024-3-29 04:01 , Processed in 1.042394 second(s), 7 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表