In this post we will discuss about the boot process of Android operating system. As the Android is based on Linux Kernel , so its boot process will give good idea about Linux boot process also. Most android based systems run on ARM processors.
First of all we will see the meaning of various terms that is used in the android boot sequence.
The Linux kernel starts up in a similar way on Android as on other systems. It will set up everything that is needed for the system to run. Initialize interrupt controllers, set up memory protections, caches and scheduling.
Other services
First of all we will see the meaning of various terms that is used in the android boot sequence.
- BootROM- It is a hardwired code resided in CPU ASICS.
- Bootloader- It is a small program which runs before the Android OS starts running.
- Init process- It is the first process launched by Linux Kernel when it is finished with the setup.
Let's see what happens when a user presses power ON button--
Complete path the boot process takes when we press the power button on our android phones. |
Step 1-System start-- Boot ROM code start execution from pre defined location. It load Bootloader into RAM and start execution.
- A. The Boot ROM code will detect the boot media using a system register that maps to some physical balls on the ASIC. This is to determine where to find the first stage of the boot loader.
- B. Once the boot media sequence is established the boot ROM will try to load the first stage boot loader to internal RAM. Once the boot loader is in place the boot ROM code will perform a jump and execution continues in the boot loader.
Step 2 : Bootloader--
- Bootloader perform execution in two stages, first stage It to detect external RAM and load program which helps in second stage, In second stage bootloader setup network, memory, etc. which requires to run kernel, bootloader is able to provide configuration parameters or inputs to the kernel for specific purpose.
- Android bootloader can be found at
- Legacy loader contain two important files viz. init.S and main.c 1. init.s - Initializes stacks, zeros the BSS segments, call _main() in main.c
2. main.c - Initializes hardware (clocks, board, keypad, console), creates Linux tags. - In embedded Linux uBoot is often the boot loader of choice. Device manufacturers often use their own proprietary boot loaders.
- A. The first boot loader stage will detect and set up external RAM.
- B. Once external RAM is available and the system is ready the to run something more significant the first stage will load the main boot loader and place it in external RAM.
- C. The second stage of the boot loader is the first major program that will run. This may contain code to set up file systems, additional memory, network support and other things. On a mobile phone it may also be responsible for loading code for the modem CPU and setting up low level memory protections and security options.
- D. Once the boot loader is done with any special tasks it will look for a Linux kernel to boot. It will load this from the boot media (or some other source depending on system configuration) and place it in the RAM. It will also place some boot parameters in memory for the kernel to read when it starts up.
- E. Once the boot loader is done it will perform a jump to the Linux kernel, usually some decompression routine, and the kernel assumes system responsibility.
3. The Linux kernel
The Linux kernel starts up in a similar way on Android as on other systems. It will set up everything that is needed for the system to run. Initialize interrupt controllers, set up memory protections, caches and scheduling.
- A. Once the memory management units and caches have been initialized the system will be able to use virtual memory and launch user space processes.
- B. The kernel will look in the root file system for the init process (found under system/core/init in the Android open source tree) and launch it as the initial user space process.
4. The init process
init it very first process, we can say it is root process or grandmother of all processes. init process has two responsibilities 1. mount directories like /sys, /dev, /proc and 2. run init.rc script.
- init process can be found at init : <android source>/system/core/init
- init.rc file can be found in source tree at <android source>/system/core/rootdir/init.rc
- This is a script that describes the system services, file system and other parameters that need to be set up. The init.rc script is placed in system/core/rootdir in the Android open source project.
- In a Java, We know that separate Virtual Machine(VMs) instance will popup in memory for separate per app, In case of Android app should launch as quick as possible, If Android os launch different instance of Dalvik VM for every app then it consume lots of memory and time. so, to overcome this problem Android OS as system named “Zygote”.
- Zygote enable shared code across Dalvik VM, lower memory footprint and minimal startup time.
- Zygote is a VM process that starts at system boot time as we know in previous step.
- Zygote preloads and initialize core library classes.
- Normally there core classes are read-only and part of Android SDK or Core frameworks. In Java VM each instance has it’s own copy of core library class files and heap objects.
- In short, The Zygote is launched by the init process and will basically just start executing and and initialize the Dalvik VM.
6. The system server-
- The system server is the first java component to run in the system. It will start all the Android services such as telephony manager and bluetooth.
- Start up of each service is currently written directly into the run method of the system server.
- The system server source can be found in the file frameworks/base/services/java/com/android/server/SystemServer.java in the open source project
Core Services:
1. Starting Power Manager
2. Creating Activity Manager
3. Starting Telephony Registry
4. Starting Package Manager
5. Set Activity Manager Service as System Process
6. Starting Context Manager
7. Starting System Context Providers
8. Starting Battery Service
9. Starting Alarm Manager
10. Starting Sensor Service
11. Starting Window Manager
12. Starting Bluetooth Service
13. Starting Mount Service
Other services
1. Starting Status Bar Service
2. Starting Hardware Service
3. Starting NetStat Service
4. Starting Connectivity Service
5. Starting Notification Manager
6. Starting DeviceStorageMonitor Service
7. Starting Location Manager
8. Starting Search Service
9. Starting Clipboard Service
10. Starting Checkin Service
11. Starting Wallpaper Service
12. Starting Audio Service
13. Starting HeadsetObserver
14. Starting AdbSettingsObserver
7. Boot completed
Once System Services up and running in memory, Android has completed booting process, At this time “ACTION_BOOT_COMPLETED” standard broadcast action will fire.
Ref: https://androidmaterial.blogspot.com/2013/03/in-depth-android-boot-sequence- process_16.html
This article is an awesome compilation.
ReplyDeleteThanks for putting it all in one place.
Thanks a lot, its a good article to learn booting process of Android
ReplyDeleteHavee you ever considered about adding a little bbit more thuan just your articles?
ReplyDeleteI mean, what you say is fundamental and all.However think about if you added some great graphics or videeos to give your
posts more, "pop"! Your content is excellent but wth images and video clips,
this site could certainly be one of the very best in its niche.
Excellent blog!
my web page - to do list software
dalvik VM was not available in lollipop.What about Android RUN time in boot sequence?
ReplyDeleteNice explanation ...
ReplyDeleteone of best explanation till date
ReplyDeleteThe article looks magnificent, but it would be beneficial if you can share more about the suchlike subjects in the future. Keep posting.
ReplyDeleteCellcare92
I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.
ReplyDeletepython training in rajajinagar | Python training in btm | Python training in usa
Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
ReplyDeleteadvanced excel training in bangalore
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
ReplyDeleteData Science training in rajaji nagar | Data Science with Python training in chenni
Data Science training in electronic city | Data Science training in USA
Data science training in pune | Data science training in kalyan nagar
Thanks admin for spending your valuable time to write an excellent article.
ReplyDeleteSelenium Training in Chennai
Best selenium training in chennai
iOS Training in Chennai
.Net coaching centre in chennai
French Classes in Chennai
Big Data Training in Chennai
PHP Course in Tambaram
best topic thanks for the author
ReplyDeletephp training course in chennai
Impressive. Your story always bring hope and new energy. Keep up the good work.
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
ReplyDeleteAndroid Online Training
This post is really nice and informative. The explanation given is really comprehensive and informative . Thanks for sharing such a great information..Its really nice and informative . Hope more artcles from you. I want to share about the best java video tutorials with free bundle videos provided and java training .
ReplyDeleteI liked your blog.Thanks for your interest in sharing the information.keep updating.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
python Training in Bangalore
aws Training in Bangalore
Very nice post. thanks for sharing with us.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
python Training in Bangalore
aws Training in Bangalore
Your article is very informative. Thanks for sharing the valuable information.
ReplyDeleteaws Training in Bangalore
python Training in Bangalore
hadoop Training in Bangalore
angular js Training in Bangalore
bigdata analytics Training in Bangalore
python Training in Bangalore
aws Training in Bangalore
I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more. mod apk
ReplyDeletekeep up the good work. this is an Assam post. this to helpful, i have reading here all post. i am impressed. thank you. thi
ReplyDeleteDot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery
Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good. garden clogs
ReplyDelete
ReplyDeleteHi, thank you very much for the new information, i learned something new. Very well written. DevOps Training in Chennai | DevOps Training in anna nagar | DevOps Training in omr | DevOps Training in porur | DevOps Training in tambaram | DevOps Training in velachery
http://www.happierit.com
ReplyDeletehttp://www.happierit.com
http://www.happierit.com
http://www.happierit.com
http://www.happierit.com
http://www.happierit.com
http://www.happierit.com
http://www.happierit.com
Thank you for discussing this very useful article. I heard something new from you. Keep blogging. android training in jalandhar
ReplyDeleteThanks for Sharing This Article.It is very so much valuable content. . AWS course in Chennai
ReplyDeleteThanks For SHaring This With Us Its Easy TO Understand :)
ReplyDeleteinteresting article.Angular training in Chennai
ReplyDeleteaşk kitapları
ReplyDeleteyoutube abone satın al
cami avizesi
cami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
perde modelleri
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
marsbahis
sultanbet
This blog is definitely interesting additionally informative. I have picked up many useful tips out of this source. I ad love to come back again soon. Thanks a lot! for More Details Click Here: Air Hostess Course
ReplyDeletehttps://www.cutespupsforsale.com/ Standard Dachshunds of all varieties (Smooth, Wirehair, and Longhair) usually weigh between 16 and 32 pounds. Miniature Dachshunds of all varieties weigh 11 pounds and under at teacup poodle for sale maturity. Dachshunds that weigh between 11 and 16 pounds are called Tweenies. Some people who breed exceptionally small Dachshunds advertise them as Toy Dachshunds, but this is purely a poodles for sale marketing term, not a recognized designation. He's bred for perseverance, which is another way of saying that he can be stubborn. Dachshunds have a reputation for being dachshund puppies sale entertaining and fearless, but what they want most is to cuddle with their people. Longhairs are calm and quiet, and Smooths have dachshund for sale a personality that lies somewhere in between. Some Mini Dachshunds can be nervous or shy, but this isn't correct for the breed. Avoid puppies that show these characteristics.Like every dog, Dachshunds need early socialization-exposure to many different people, dachshund puppies for sale near me sights, sounds, and experiences-when they're young. Socialization helps ensure that your Dachshund puppy grows up to be a well-rounded dog. .
ReplyDelete
ReplyDeleteشركة ليلى نقل اثاث الفجيرة هي شركة تقدم خدمات نقل اثاث الفجيرة المنزلية و أثاث المكاتب
و الفنادق داخل الإمارات المتحدة في أي وقت و في كل مكان.
نقل اثاث الفجيرة
With multitude of career opportunities opening up in Data Science domain and more and more IT professionals are looking for best Data Science courses to start their Data Sciences career. 360DigiTMG is the best place to start your technical training. As we are equipped with world-class curriculum to suit all your technical needs.
ReplyDeleteBest Data Science Training institute in Bangalore
With decision making becoming more and more data-driven, learn the skills necessary to unveil patterns useful to make valuable decisions from the data collected. Also, get a chance to work with various datasets that are collected from various sources and discover the relationships between them. Ace all the skills and tools of Data Science and step into the world of opportunities with the Best Data Science training institutes in Bangalore.
ReplyDeleteData Science Course in Bangalore
Nice Post,
ReplyDeleteTime is one of the most important variables in determining an organization's legitimacy. A full-stack developer oversees both backend and frontend development at the same time. As a result, production increases and items are delivered on time. Join a Job-Oriented Program with a 100% Placement Guarantee. It Education provides Fullstack Training in Pune from Expert Trainers with Fully Practical Sessions. Work on ongoing projects.
Technobrilliant Learning Solution Bringing to you Job oriented course.
ReplyDeleteAre you looking to upgrade your IT skills and get ahead in your career? Then look no further than Job Oriented IT Courses! Our courses provide you with the tools and knowledge needed to succeed. Learn Full Stack Development, Salesforce, Java, Web Designing, Software Testing and more - all with 100% placement assistance! Take the first step into a brighter future today with Job Oriented IT Courses.
Batch : Online/Offline Available
https://technobrilliant.com/
Great post , keep posting valuable information to us Salesforce Course In Pune
ReplyDelete
ReplyDeleteThanks for sharing this information.
visit: flipupdates
Itronix Solutions' Ethical Hacking Course was amazing! The hands-on approach made learning effective and fascinating, and the professors were leaders in their fields. Thanks to the useful skills I acquired in this course, I feel confident enough to pursue a career in cybersecurity.
ReplyDeleteEthical Hacking Course in Jalandhar
Great post on valuable information, keep us posted more topics and valuable information. java training classes in pune
ReplyDeleteFull Stack Java Course in Pune