I'm trying to analyze the oat format to understand how android application loader works. I think that android applications are all compiled into native code as oat file in Android Runtime(ART).
What I found was, however, that there is original dex file in oat file, and there are also non-compiled methods in oat class headers.
Furthermore, there is an type field in oat class header which tells how many parts of the methods are compiled. The existence of this type field means that there can be non-compiled methods in oat file.
Here is the figure which describes the type field which was revealed by Paul Sabanal in Black Hat 2014.
The type field of oat class header
Here is what my oatdump shows about oat file in Android 6.0
Non-compiled method in oat file
You can see that non-compiled methods do not have any field of native method offset.
I couldn't find any official documents about oat file.
To sum it up, the questions are
- Why are there non-compiled methods in oat file?
- How can the non-compiled methods be executed during Android Runtime?
- Why can the non-compiled methods not be compiled during compile time by dextooat?
- Is there any easy example that cannot be compiled into native code?
Thank you for your answers in advance.