Thursday, September 20, 2018

Android Kernel

Android Kernel

The Android kernel starts in a similar way as the linux kernel.  As the kernel launches, is starts to setup cache, protected memory, scheduling and loads drivers. When the kernel finishes the system setup, it looks for “init” in the system files.

What is the difference between the linux and android kernels?, here's a list of changes/addons that the Android Project made to the Linux kernel:

  • Binder: It is an Android specific interprocess communication mechanism and remote method invocation system.
  • ashmem:  "Android Shared Memory". It is a new shared memory allocator, similar to POSIX SHM but with a different behavior and sporting a simpler file-based API.
  • pmem: "Process memory allocator": It is used to manage large (1-16+ MB) physically contigous regions of memory shared between userspace and kernel drivers.
  • logger:  This is the kernel support for the logcat command.
  • wakelocks: It is used for power management files. It holds the machine awake on a per-event basis until wakelock is released.
  • oom handling: It kills processes as available memory becomes low.
  • alarm manager: It lets user space tell the kernel when it would like to wake up.
  • RAM_CONSOLE: Allows to save kernel printk messages to a buffer in RAM, so that after a kernel panic they can be viewed in the next kernel invocation.
  • USB gadget driver for ADB
  • yaffs2 flash filesystem