What are ODEX files in Android?

前端 未结 3 2119
盖世英雄少女心
盖世英雄少女心 2020-11-30 20:26

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

3条回答
  •  情话喂你
    2020-11-30 21:03

    ART

    In ART, .odex files contain:

    contains AOT compiled code for methods in the APK.

    according to the docs: http://web.archive.org/web/20170909233829/https://source.android.com/devices/tech/dalvik/configure

    Furthermore, they appear to be regular shared libraries, since if you get any app, and check:

    file /data/app/com.android.appname-*/oat/arm64/base.odex
    

    it says:

    base.odex: ELF shared object, 64-bit LSB arm64, stripped
    

    and aarch64-linux-gnu-objdump -d base.odex seems to work and give some meaningful disassembly (but also some rubbish sections).

提交回复
热议问题