Understanding the Android HAL
An Android kernel contains a few additional features that aren't found in a typical Linux kernel, such as Binder IPC and the low-memory killer, but otherwise it is still Linux. This provides you with one very big advantage when interfacing hardware with Android, that is, if a Linux driver already exists in the kernel used for an Android system, then you already have an Android driver for that device.
Android apps must interact with the hardware of an Android device by generating video and audio data, receiving button and touchscreen input events, and receiving sensor events from cameras, accelerometers, and other devices that gather information from the outside world. Leveraging existing Linux drivers for these devices makes Android support much easier. Unlike a traditional Linux distribution, which grants applications permission to directly access many different device files (by directly opening files in the /dev
filesystem), Android dramatically limits...