androidandroid-sourcedalvik

android core library compilation


How does AOSP compile the core libraries? Is there any special handling to make it talk to the underlying OS? Are there any stub code generated as marks, and left for run-time processing by the Dalvik VM?


Solution

  • I can't tell for sure whether you are talking about the native libraries or the framework libraries for java, although it sounds like you're talking about the framework libraries.

    There is almost no special handling for these libraries. The only exception I can think of is that any of the framework libraries that contain java.* classes must have the --core-library option for dx.

    Just in general, dalvik bytecode does have some optional debugging information stored in it, line numbers, local variable names, etc, and these are usually present in the core libraries. But this is nothing specific to the framework libraries - most applications will have this info too, unless they specify otherwise.