Search code examples
androidkernelplatformandroid-source

Kernel and platform files while compiling Android


I compiled the kernel files for my device however, I don't know what platform files are for. Could you please tell me what are the functions of "kernel" and "platform" files? Thanks in advance.


Solution

  • Android Operating System can be roughly split into 2 parts-

    • The Linux Kernel

    • The Android Framework.

    The Android Framework is on top of the linux kernel and it is that which is referred as platform. Platform code consists of the Window manager, Event manager etc. It handles things like what should happen when the screen is touched, how windows are drawn and a host of other things. The linux kernel provides the scheduler ( heart of the OS ), drivers which interact with the H/W and a lot of other stuffs.

    In short, the platform talks to the user with the aid of the underlying kernel. Generally, in android, most of the platform code is in java and kernel code is predominantly in C.

    So until you have modified some platform java files you don't need to compile it. Your random.c and cipher.c should be part of the kernel and not the platform