I am not deeply familiar with this part of knowledge, but I am willing to share with you only a little bit. I hope you can give me some suggestions.
As we all know, the Android platform is written in Java, C, C ++, and other mixed languages, java methods are often called when we use the framework-layer APIs provided by the android SDK for application development. In fact, these Java APIs are often just an entry point, the real implementation of method functions is implemented by calling the native method at the framework layer through JNI.
After Android is started, it enters frameworks/base/cmds/app_process/app_main.cpp after a series of loading processes. Then execute the main () method.
There should be applause here. Haha should have code. But the method is not very understandable ......
The start method of frameworks/base./CORE/JNI/androidruntime. cpp will be called. In fact, the registration association between Android APIs and local methods is completed in the androidruntime. cpp module. After compilation, libandroid_runtime.so dynamic link library is formed under the system/lib directory of the output directory out.
Make up this part when you are free ......