1. boot system initialization. For detailed procedures, see (System \ core \ init. c) In the main function. At this time, the screen displayed on the mobile phone or simulator is a console that displays "android" MSG.
2. After successful initialization, start the mounting system. For details, see the main function in (System \ core \ mountd. C.
3. Run ndroidruntime and start the Java Virtual Machine dalvikvm.
4. After the Java Virtual Machine is started successfully, system initialization starts. The first step of the system is implemented in JNI mode. The corresponding Java code is (frameworks \ base \ Services \ Java \ com \ Android \ Server \ systemserver. java) init1 (native) function, the corresponding jni c ++ code is (frameworks \ base \ core \ JNI \ Server \ com_android_server_systemserver.cpp), and the implemented C ++ code is
System_init () function in (frameworks \ base \ cmds \ system_server \ library \ system_init.cpp.
5. system_init calls surfaceflinger. The readytorun () function of surfaceflinger uses bootanimation to enable boot animation. At this time, the mobile phone or simulator displays a background image and a dynamic small robot.
6. in step 2 of system initialization, The serverthread process will be started. For details, see systemserver. init2 (). Serverthread starts various system services, such as power manager and activity manager. For details, see the run function of serverthread. serverthread is in the same systemserver. java.
7. After that, we should have entered the system. (This part has not been investigated ).