Implementation of universal self-boot daemon under Android

Source: Internet
Author: User

1.Android OS architecture

Android The system is divided into four layers, from high to the bottom of the Don't be: Application Layer ( Application ), Application

Frame Layer ( Application Framework ), System runtime layer ( Libraries ) and Linux Kernel Layer ( Linux Kernel ).


650) this.width=650; "Src=" Https://s2.51cto.com/wyfs02/M02/99/9E/wKiom1lKN16xRWrqAACAjiuDq7c634.png-wh_ 500x0-wm_3-wmp_4-s_3231885390.png "title=" qq picture 20170620190101.png "alt=" Wkiom1lkn16xrwrqaacajiudq7c634.png-wh_50 " />

Android the bottom of the operating system or Linux inside nuclear, we are from Linux The kernel begins.

2.Linux Configuration self-starting principle

Linuxafter loading, the hardware and device drivers will be initialized, then run the first processInit. Init continue the boot process based on the configuration file and start other processes. Typically, the modification is placed in the /ETC/RC or /ETC/RC.D The script file under the directory can make Init automatically start other programs. For example: Edit /etc/rc.d/rc.local file.

 

3. /span> create  android self-starting Guardian based linux   Configure the self-starting principle scheme, and we also have a android   an analysis. android   corresponds to

the self-startup script for init.rc file.

The following script code is the startup /system/bin/daemon applied as Daemon service to start Service Daemon/system/bin/daemon

Class Main Console OneShot

which Console represents the service needs and runs in the console, OneShot Indicates that the service runs only once and sets the service to disabled on exit. class Main corresponding Class_start Main start Main type of service.

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/99/9E/wKioL1lKN5WQVurrAACyT8gzLm8340.png-wh_500x0-wm_ 3-wmp_4-s_2477595604.png "title=" image 2.png "alt=" Wkiol1lkn5wqvurraacyt8gzlm8340.png-wh_50 "/>

4. Summary

through the above analysis, I believe we can understand how to do the system since the start . details can contact qq:2918314455 .

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/99/9E/wKioL1lKN8mi_bI5AAGmjFGHNiU860.png-wh_500x0-wm_ 3-wmp_4-s_4039712796.png "title=" qq picture 20170612171836.png "alt=" Wkiol1lkn8mi_bi5aagmjfghniu860.png-wh_50 "/>

This article from "12925658" blog, declined reprint!

Implementation of universal self-boot daemon under Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.