A Brief Introduction to the android OS internal mechanism (29) and androidos
The Startup Process of the Android operating system is relatively complicated. Here, I just want to understand the principle.
Hardware development knows that when our device is powered on, there will be a boot loader called for initialization, we call it bootloader, that
When the Android device is powered on, it will also load this program. Is it useful to load bootloader? It mainly checks hardware features and
The first part is loaded into the device's memory. Of course, the boot loader for different devices is different.
After the Android device is powered on, the boot loader performs two steps respectively, mainly using a primary boot loader and a secondary boot loader.
. Most Android devices cannot replace the primary Boot Loader because the primary boot loader is hard-coded in the ASIC chip of the device.
These hard-coded commands load the auxiliary boot loader into the memory and tell it the location of the memory, CPU and operating system, and how to access it.
.
The auxiliary boot loader can be customized. We call it a custom Boot Loader. Its advantage is that the obtained permissions are relatively large, and the custom boot loader can
Replace the original operating system file with a custom file. In this way, you can replace the new user interface or kernel with enhanced functions.
Is the Android device boot loading steps:
1. Specific code located in the boot ROM (read-only memory) will find the first-level Boot Loader (Main Boot Loader) and load it to the storage
. Boot ROM is an ASIC chip that loads permanent programming code.
2. After the memory is initialized and the hardware is ready, the first-level Boot Loader loads the second-level Boot Loader (secondary Boot Loader ).
The bootstrap loader checks whether the security flag is enabled (S-ON), and if enabled, the bootstrap loader only loads the labeled kernel. If
The full flag is closed (S-OFF), so the boot loader no longer checks the flag. Set the security tag to a S-OFF to unlock other security locks, making
The entire file system is writable and can do other things, such as customizing the Recovery program.
3. The Boot Loader loads the Linux kernel and customized content into the memory. In this case, the boot loader transfers control of the hardware to the Linux
Core.
4. initialize the (INIT) process. The INIT process is the prerequisite for all other processes running on the device. The main function is to initialize basic hardware access and device functions.
All the processes required will also start the Dalvik virtual machine used to execute most applications.
Reprinted please indicate the source: http://blog.csdn.net/hai_qing_xu_kong/article/details/44728245 sentiment control _