learning aosp - android booting process
TRANSCRIPT
![Page 1: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/1.jpg)
““Learning AOSP”Learning AOSP”Android Booting ProcessAndroid Booting Process
Nanik TolaramNanik Tolaram@nanikjava@nanikjava
ozandroid.infoozandroid.info
![Page 2: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/2.jpg)
Thank You !Thank You !
![Page 3: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/3.jpg)
ArchitectureArchitecture
![Page 4: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/4.jpg)
Questions !Questions ! What happened when I press power on button in my Android What happened when I press power on button in my Android
device ?device ?
What is Android boot sequence ?What is Android boot sequence ?
What is bootloader ?What is bootloader ?
What is Zygote ?What is Zygote ?
What is init.rc ?What is init.rc ?
What is System Server ?What is System Server ?
![Page 5: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/5.jpg)
Boot Execution PathBoot Execution PathBoot ROM
Boot Loader
Kernel
Init
Zygote
System Servers
hardware
boot.img, C & ASM, rootfs
system.img,Android framework & apps
u-boot or different fork
![Page 6: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/6.jpg)
Boot ROM & Boot LoaderBoot ROM & Boot LoaderPower ON
On chip ROM (during CPU production)
Primary Boot Loader
Secondary Boot Loader
Hardware Init Modem Image Execution
Kernel Image Download & Execution
1st loaded from flash (normally)/fastboot
![Page 7: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/7.jpg)
KernelKernel Nothing Special ! Nothing Special !
Standard Linux Kernel ExecutionStandard Linux Kernel Execution
Hardware & Android Device DriversHardware & Android Device Drivers
Needed in recovery and system partitionNeeded in recovery and system partition
![Page 8: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/8.jpg)
InitInit Main entry point to AndroidMain entry point to Android init.rc and other .rc configinit.rc and other .rc config Initialisation and preparationInitialisation and preparation
Android framework initialisationAndroid framework initialisation Environment properties setupEnvironment properties setup Security setupSecurity setup
Mounting of different media partitionsMounting of different media partitions System servers initialisationSystem servers initialisation
![Page 9: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/9.jpg)
ZygoteZygote Initialise during Initialise during Init Init processprocess
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-serverserver
Registers server socketRegisters server socket Preload Java classes from “preloaded-Preload Java classes from “preloaded-
classes” fileclasses” file Preload native themes and layoutsPreload native themes and layouts
![Page 10: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/10.jpg)
System ServersSystem Servers System Servers written both as Native & System Servers written both as Native &
JavaJava startSystemServer() methodstartSystemServer() method Power Manager, Zygote, Activity Power Manager, Zygote, Activity
Manager, Telephony Registry, Battery Manager, Telephony Registry, Battery Service and many moreService and many more
![Page 11: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/11.jpg)
Boot CompleteBoot Complete ACTION_BOOT_COMPLETED ACTION_BOOT_COMPLETED
broadcast Intent will firebroadcast Intent will fire
![Page 12: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/12.jpg)
Boot Sequence DecisionBoot Sequence DecisionBootloader Microcode
Boot Partition
System Partition Recovery Partition
Recovery
Y
N
Execute Recovery AppRun Android Stack
Bootloader (1st, 2nd, nth)
![Page 13: Learning AOSP - Android Booting Process](https://reader035.vdocuments.mx/reader035/viewer/2022062306/587064f81a28ab48378b4c1b/html5/thumbnails/13.jpg)
Thank YouThank You