how to check whether the kernel is for android or linux?

1.5k Views Asked by At

I have the source code of a kernel. but i don't know whether the kernel is android kernel or Linux kernel. I have searched about it on google but i haven't found any proper answer. As i know ,android kernel is Linux kernel and some patches applied on it. so i think we can identify the kernel is for Linux or android.

1.Can i know this by seeing the source code, or by running any command or by any other method?

2.if it is android kernel, whether will it able to mount the Ubuntu file system?

2

There are 2 best solutions below

0
On
  1. Look for AndroidKernel.mk in the kernel source root, if it's an Android kernel, it should be there.
  2. The Ubuntu file system is ext4 by default. I'm pretty sure all default kernel configurations include support for this filesystem. What is the motivation behind this?

BTW the presence of binder does NOT mean it is an Android kernel. The binder exists in the staging directory for all Linux kernels

2
On

A simple method to check if a kernel is for android.

If there is a file named "android.c" in "drivers/usb/gadget" folder, the kernel seems to be a android kernel, otherwise, it is not for android.

Though not very accurate, but very simple