1

Standard Android OS load process looks like (from docs):

  1. BootROM (starts with 'on' button)
  2. Bootloader
  3. Kernel
  4. init/mounting
  5. Zygote+Dalvik VM
  6. System services

But I have a difficulties understanding load process preparing flashing (how I met it flashing Galaxy Tab and MTK cellphone ROMs)

Could you help me to find a position for those tools on this diagram:

1) The code that show logo (or battery charge in percents when power cable is on) and respond to USB (when phone is off but battery is inside) ? Where it is ? It should be postioned before Boot ROM - but how you name it?

2) who are responsible for handle "on + volumne down" to switch to "bootload" menu ? BootRom or Bootloader?

3) "preloader" how it is positioned there? (I'm not sure that I understand what preloader is).

4) Twrp ? fastboot ? odin3 does they replace Dalvik or run over it? twrp by itself look like full OS.

3

Boot process of Android devices up to kernel stage is very vendor specific, device specific and contains mostly closed source code. You may see clear deviations of terminologies used and differences in their implementations. Here I'm giving a simple understanding.

  • 1) When charger is inserted, device boots very similar to when power button is pressed except that a very limited OS is loaded.

    Device boots normally up to init stage (given at point 4). Init, instead of starting services from /system and /vendor, starts a process/service from /sbin/charger* which is not a part of AOSP. Charger binary is usually closed source and varies for different devices. It may load some pictures/animations stored on some partitions specific for this purpose.
    Also some OEMs allow enabling/disabling off-mode-charge through fastboot to control the behavior if device is switched on when power is plugged in or not. But it's also not a standard feature and varies for devices.

  • 2) Bootloaders (SBL/ABOOT or equivalents) handle Power and Volume buttons pressed to start Download mode, fastboot mode, recovery or kernel.
  • 3) Preloader is a bootloader stage (SBL) before final bootloader (ABOOT)
  • 4) Here is the boot chain:

    • BootROM
    • PBL/SBL (odin)
    • ABOOT (fastboot)
    • Kernel/Recovery (TWRP)
    • Init
    • Services or processes are started from /system and /vendor partitions by init (Zygote/Dalvik is one of those).

    So odin and fastboot are two independent protocols for communication with device through USB. While TWRP is a minimal OS which replaces normal kernel in case Android is unable to boot or needs some modifications/maintenance.
    None of them can be related to Dalvik, they are hardware specific and run at pre-kernel or kernel stage while Dalvik - a part of AOSP - is a completely userspace process.

For details: BOOT PROCESS: ANDROID vs. LINUX

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.