什么是Android的ODEX文件? [英] What are ODEX files in Android?

查看:163
本文介绍了什么是Android的ODEX文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装了一些Android应用程序,我发现,它会改变,以ODEX文件(不APK)的智能手机。 它是如何发生的?谁可以教我,我对此很感兴趣。

After some android apps installed, I found that it will change to odex file (not apk) in smartphone. How does it happens? Who can teach me, I am very interested about it.

推荐答案

博客文章是基本上是正确的,但不完成。为了有一个什么样的ODEX文件做了充分的了解,你必须了解一些关于如何应用程序文件(APK)的工作。

The blog article is mostly right, but not complete. To have a full understanding of what an odex file does, you have to understand a little about how application files (APK) work.

应用程序基本上是荣耀的ZIP压缩文件。在Java code存储在一个名为classes.dex这个文件是由在Dalvik JVM和处理classes.dex文件的缓存解析存储在手机的Dalvik缓存。

Applications are basically glorified ZIP archives. The java code is stored in a file called classes.dex and this file is parsed by the Dalvik JVM and a cache of the processed classes.dex file is stored in the phone's Dalvik cache.

这是ODEX基本上是一个应用程序的classes.dex的pre处理的版本,是处决准备的Dalvik。当一个应用程序odexed,该classes.dex从APK档案中删除,并没有写任何东西到的Dalvik缓存。包装一个在APK,并将处理一个在Dalvik的缓存 - 未odexed的申请有2份classes.dex文件而结束。它也需要一点时间来启动以来的第一次的Dalvik已经提取和处理classes.dex文件。

An odex is basically a pre-processed version of an application's classes.dex that is execution-ready for Dalvik. When an application is odexed, the classes.dex is removed from the APK archive and it does not write anything to the Dalvik cache. An application that is not odexed ends up with 2 copies of the classes.dex file--the packaged one in the APK, and the processed one in the Dalvik cache. It also takes a little longer to launch the first time since Dalvik has to extract and process the classes.dex file.

如果你正在建设一个自定义ROM,它要以最大限度地为用户安装的应用程序的内部存储空间ODEX无论你的框架JAR文件和股票应用程序一个很好的主意。如果你想主题,后来干脆deodex - >适用于你的主题 - > reodex - >发布

If you are building a custom ROM, it's a really good idea to odex both your framework JAR files and the stock apps in order to maximize the internal storage space for user-installed apps. If you want to theme, then simply deodex -> apply your theme -> reodex -> release.

要真正deodex,用小baksmali:

To actually deodex, use small and baksmali:

<一个href="http://$c$c.google.com/p/smali/wiki/DeodexInstructions">http://$c$c.google.com/p/smali/wiki/DeodexInstructions

这篇关于什么是Android的ODEX文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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