Difference between revisions of "Android Booting"

From eLinux.org
Jump to: navigation, search
(add to category:android)
(add information about system initialization)
Line 1: Line 1:
 +
The bootup of an Android system consists of several phases, which are outlined here.
 +
 
== Device-specific startup ==
 
== Device-specific startup ==
 
* firmware/bootloader
 
* firmware/bootloader
 +
** On the ADP1, there are multiple versions of the bootloader
 +
 
* kernel
 
* kernel
 
* mount root file system
 
* mount root file system
Line 7: Line 11:
 
* run /init
 
* run /init
 
** process /init.rc
 
** process /init.rc
 +
 +
See the [[http://android.git.kernel.org/?p=platform/system/core.git;a=blob;f=init/readme.txt;hb=HEAD Android init language reference]]
 +
 +
== Sequence of boot steps on ADP1 ==
 +
=== firmware ===
 +
* first-stage bootloader runs
 +
** it detects if a special key is held, and can launch the recovery image, or the 'fastboot' bootloader
 +
=== kernel ===
 +
* kernel is loaded
 +
* kernel boots
 +
** core kernel initialization
 +
** driver initialization
 +
=== user space ===
 +
* user space starts
 +
** kernel runs /init
 +
*** /init processes /init.rc and /init.rc.<machine_name>
 +
*** activity manager is run
 +
*** dalvik VM is started (zygote)
 +
* activity manager starts core applications
 +
** com.android.phone - phone application
 +
** android.process.acore - home (desktop) and a few core apps.
 +
* other processes started by /init:
 +
** adb
 +
** mediaserver
 +
** dbus-daemon
 +
** akmd
 +
 +
== Tools for analyzing Android Bootup ==
 +
* Bootchart - see [[Using Bootchart on Android]]
  
 
== Notes on the Android startup procedure ==
 
== Notes on the Android startup procedure ==
Line 17: Line 50:
 
=== Interaction of different processes on application initialization ===
 
=== Interaction of different processes on application initialization ===
 
Talking about Android Process - http://blog.csdn.net/mawl2002/archive/2009/06/24/4295905.aspx
 
Talking about Android Process - http://blog.csdn.net/mawl2002/archive/2009/06/24/4295905.aspx
 +
  
 
[[Category:Android]]
 
[[Category:Android]]

Revision as of 22:19, 12 January 2010

The bootup of an Android system consists of several phases, which are outlined here.

Device-specific startup

  • firmware/bootloader
    • On the ADP1, there are multiple versions of the bootloader
  • kernel
  • mount root file system

Generic startup

  • run /init
    • process /init.rc

See the [Android init language reference]

Sequence of boot steps on ADP1

firmware

  • first-stage bootloader runs
    • it detects if a special key is held, and can launch the recovery image, or the 'fastboot' bootloader

kernel

  • kernel is loaded
  • kernel boots
    • core kernel initialization
    • driver initialization

user space

  • user space starts
    • kernel runs /init
      • /init processes /init.rc and /init.rc.<machine_name>
      • activity manager is run
      • dalvik VM is started (zygote)
  • activity manager starts core applications
    • com.android.phone - phone application
    • android.process.acore - home (desktop) and a few core apps.
  • other processes started by /init:
    • adb
    • mediaserver
    • dbus-daemon
    • akmd

Tools for analyzing Android Bootup

Notes on the Android startup procedure

Overview

See "Android Initialization Process" at: http://blog.chinaunix.net/u2/85805/showart_1421736.html

strace

http://benno.id.au/blog/2007/11/18/android-runtime-strace

Interaction of different processes on application initialization

Talking about Android Process - http://blog.csdn.net/mawl2002/archive/2009/06/24/4295905.aspx