I am curious to know the differences between odex file and dex file. I searched on net but did not find enough information.Here are my questions
- What is the purpose of odex file?
- How can create o开发者_如何学Cdex file for my application?
- If I create odex, will it be supported on all API levels?
Thanks, Manan
- It's an app optimized code
- You can do that on the device, you'll need the command line dexopt-wrapper and running something like dexopt-wrapper
- Yes, but you don't have to create odex files the system does that by itself. Well, depends what you want to achieve actually.
Here's my answer for question two:
How can create odex file for my application?
The "classes.dex" file is optimized to odex file automatically. If "xxx.apk" stores in /data/app/xxx/xxx.apk
, then its "xxx.odex" will be stored in /data/app/xxx/oat/arm/xxx.odex
.
I tested on Android 6.0.
Not sure how to recreate an odex file, but here's a description.
http://www.addictivetips.com/mobile/what-is-odex-and-deodex-in-android-complete-guide/
精彩评论