Android ART - using .oat file in / dalvik-cache /?

While playing with Android ART and the β€œnative” .oat / .elf code file that was created during the installation of the application, I noticed something strange.

For my understanding, if the device uses ART (Android> = 5.0), the application will start with the compiled oat file (/ data / dalvik-cache / arm64 /).

This is why I was surprised when checking the fd application used and did not find the file there. Only normal apk (/data/app//base.apk) is listed here.

Check this output of my "ls -l / proc / PID / fd"

enter image description here

Therefore, I thought that perhaps this is simply not indicated. Therefore, I myself exchanged the ov file for this application by compiling another .dex class using the dex2oat tool.

, - ( logcat).

? , Android ART?

, - . .

+4
1

@Paschalis, , oat , Android 5.0 ():

a6af4000-a6af9000 r--p 00000000 1f:01 7366 /data/dalvik-cache/x86/data@app@my.app.works-1@base.apk@classes.dex

:

cat /proc/<PID>/maps | grep dex

, Android 6.0 (Nexus 5 arm-Emulator).

odex /data/app/<APP>/oat/<ARCHITECTURE>/ 'base.odex`

/data/app/app.app.works-1/oat/arm/base.odex

, ​​

+3

Source: https://habr.com/ru/post/1616521/


All Articles