title: Android ART - Usage of .oat file in /dalvik-cache/?
body: <p>while playing around with Android ART and the "native" code file .oat/.elf which is created at the app installation process, I did notice something odd.</p>
  
  <p>For my understanding, if the device is using ART (Android >= 5.0), the app will start with the compiled oat file (/data/dalvik-cache/arm64/).</p>
  
  <p>Thats why I was kinda surprised when checking the used fd's of an app and did not find the file there. Only the normal apk (/data/app//base.apk) is listed there. </p>
  
  <p>Check this output of my "ls -l /proc/PID/fd"</p>
  
  <p><a href="https://i.stack.imgur.com/Ce4Ys.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ce4Ys.jpg" alt="enter image description here"></a></p>
  
  <p>So I thought maybe it's just not listed there. So I did exchange the oat file of that app by myself by compiling another classes.dex with the dex2oat tool.</p>
  
  <p>So even after changing the file, the app starts normally without any strange messages or errors (also in logcat).</p>
  
  <p>What is the explanation for this? What is the detailed process Android does when starting an app under ART?</p>
  
  <p>I hope someone can clear that up for me. Thanks a lot.</p>