When it comes to drivers in Android, many imagine the usual .inffiles from Windows or packages .deb for Linux. However, the architecture of the mobile OS is radically different: here the drivers are integrated into the kernel, distributed across system partitions and are often hidden from the user. If you are trying to find a driver for a specific component (for example, a camera module Sony IMX586 or chip Qualcomm Snapdragon 8 Gen 2), standard search methods will not work.
In this article we will look in detail at where exactly drivers are stored in Android โfrom modules built into the kernel to proprietary blobfiles of manufacturers. You will learn how to view the list of downloaded drivers, where to look for their sources (if available), and why some drivers cannot be extracted without root access. The material will be useful to developers, firmware customization enthusiasts and those who repair or diagnose hardware.
1. Driver architecture in Android: kernel vs. user space
Unlike desktop operating systems, where drivers are often installed separately, in Android they are divided into two key categories:
- ๐น Drivers in the Linux kernel โ they are responsible for the basic operation of the equipment (CPU, GPU, memory, buses). They are part of the image
boot.imgand are loaded in the early stages of system startup. - ๐น Proprietary drivers are closed binary modules (blob), which chip manufacturers (for example, Qualcomm, Mediatek, Samsung Exynos) supply separately. Stored in
/vendoror/system. - ๐น HAL drivers (Hardware Abstraction Layer) - an intermediate layer between the kernel and the Android framework. Implemented as shared libraries (
.so) in/system/libor/vendor/lib.
It is important to understand that most drivers in Android are statically linked to the kernel and not in the form of separate files, as in Windows. For example, a driver for a fingerprint sensor Goodix can be part of a module goodix_fp.ko (if it is a loadable module) or built directly into the kernel. You can view the list of loaded modules with the command:
adb shell lsmod
If the command returns an empty list, it means that your kernel was built without support for loadable modules (CONFIG_MODULES=n), and all drivers are statically linked.
2. Where are drivers stored in the Android file system
The Android file system is divided into several partitions, and the drivers are distributed between them. Below are the key directories where you can find driver-related files:
| Section/Directory | Driver type | Examples of files | Are root access required? |
|---|---|---|---|
/proc/modules |
List of loaded modules kernel | qcom_wcnss_wlan.ko, msm_drm.ko |
No |
/sys/module/ |
Information about kernel modules | Folders with module names (for example, /sys/module/msm_thermal/) |
No |
/vendor/lib/modules/ |
Proprietary kernel modules | wlan.ko, camera.ko |
Yes |
/system/lib/hw/ |
HAL implementation | android.hardware.camera.provider@2.4-impl.so |
Yes |
/dev/ |
Devices created by drivers | /dev/block/mmcblk0, /dev/graphics/fb0 |
No (but access rights are limited) |
For example, to see the drivers responsible for operation of Wi-Fi chip Qualcomm, you can check:
adb shell ls /vendor/lib/modules/ | grep wlan
Please note: the paths may vary depending on the device manufacturer and Android version. data-i="92">โ in Samsung proprietary drivers are often stored in /system/vendor/lib/modules/, and on Xiaomi - V /vendor/dlkm/lib/modules/ (for devices with dynamic loading of kernel modules, Dynamic Kernel Module Loading).
If you are looking for a driver for a specific component (for example, an NFC chip), first determine its model via adb shell getprop ro.boot.hardware or adb shell cat /proc/cpuinfo. This will help narrow down the circle search.
3. How to view downloaded drivers without root
Even without superuser rights, you can get some information about the drivers. Here are the main commands and paths:
- ๐ List of modules kernels:
cat /proc/modulesorlsmod(if available). - ๐ Information about a specific module:
cat /sys/module/[module_name]/version. - ๐ Devices in system:
ls /dev/oradb shell dumpsys(for HAL services). - ๐ System properties:
adb shell getpropโthere may be mentions of drivers (for example,ro.hardware.eglfor GPU).
Example: to find out the driver version GPU Adreno on a device with a chip Snapdragon, run:
adb shell cat /sys/kernel/debug/kgsl/version
However, without root you will not be able to read the contents of proprietary modules (.ko) or libraries (.soAlso, many paths in /sys/ and /proc/ require it. special rights - for example /sys/kernel/debug/ often available only for root or group system.
What to do if the command returns "Permission denied"
This means that your user (usually shell or adb) there are no rights to read the file. Solutions:
1. Get root access (for example, through Magisk).
2. Use utilities like su -c"command" (if you already have root).
3. View files through the recovery menu (TWRP), where rights can be expanded.
4. Extracting drivers with root access
If you have root, the possibilities are expanded significantly:
Gain full access to /vendor i /system|Copy the necessary files (.ko, .so) to PC|Check dependencies via readelf -d filename.so|Collect information about the kernel (uname -a, cat /proc/version)-->
For example, to copy all kernel modules from /vendor/lib/modules/:
adb shell"su -c'cp -r /vendor/lib/modules/ /sdcard/'"
adb pull /sdcard/modules/
To analyze proprietary libraries (.so), use tools like Ghidra, IDA Pro or readelfFor example, to see exported functions. in the HAL camera driver:
readelf -s /system/lib/hw/android.hardware.camera.provider@2.4-impl.so | grep"FUNC"
โ ๏ธ Attention: Modifying or replacing drivers without understanding the consequences can lead to bootloop (cyclic restart of the system) or damage to the equipment. For example, an incompatible driver for a modem chip Qualcomm can disable a phone. network.
5. Drivers in custom firmware (LineageOS, AOSP)
In alternative firmware (for example, LineageOS or Pixel Experience) driver storage structure may differ. The following are often used here:
- ๐ง Open drivers: Part of the code (for example, for Wi-Fi or Bluetooth) can be taken from open sources AOSP.
- ๐ง Proprietary blob: Closed drivers are extracted from the stock firmware and are integrated into the custom one. They can be found in repositories like
vendor/[manufacturer]. - ๐ง Dynamic loading of modules: New versions of Android (starting from 12) use a mechanism Dynamic Kernel Module Loading (DKML)where modules are loaded by requirement.
For example, in LineageOS camera drivers Sony IMX can be implemented through open HAL android.hardware.camera.provider@2.4, but with proprietary libraries from chip manufacturer. To find out which blobs are used in your firmware, check the file /vendor/build.prop or the firmware repository on GitHub.
โ ๏ธ Attention: When building custom firmware, incompatible drivers may cause performance or stability problems. For example, driver GPU Mali from ARM must exactly match the kernel version and chip.
6. Where to look for driver sources
If you need driver source codes (for example, for modification or debugging), they can be found in the following sources:
- ๐ Linux kernel for Android: Repository Android Common Kernel on
source.android.com(for example, branchandroid-msm-3.18for Snapdragon 800). - ๐ Chip manufacturers: Qualcomm publishes part of the code on
codeaurora.org, Mediatek - ongithub.com/Mediatek. - ๐ Open software projects: For example, drivers for Wi-Fi chips Broadcom can be found in repositories LineageOS.
- ๐ Sensors and peripherals: Source codes for some sensors (for example, accelerometer Bosch BMA421) are available on manufacturers' websites.
Example: to find a driver for the chip NFC NXP PN80Tused in Google Pixelyou can search the kernel repository Pixel:
git clone https://android.googlesource.com/kernel/msmcd msm
git checkout android-msm-pixel-4.14-android12
find. -name"pn80t"
Note: many drivers (especially for modem, GPU or ISP) remain closed. Their sources are not available, and the binary blobs are distributed throughout the firmware.
Most proprietary drivers in Android are โblack boxesโ. They can be extracted from the firmware, but it is extremely difficult to modify without documentation.
7. Problems with drivers: diagnostics and solutions
If some equipment does not work correctly (for example, it does not turn on Wi-Fi or is not detected SD card), the problem may be in the driver. Here's how to diagnose:
- ๐ Checking kernel logs:
adb shell dmesg | grep -i"error"oradb logcat | grep"E". - ๐ List of devices:
lsusb(if supported) orls /dev/. - ๐ Testing modules:
modprobe [module_name](if the kernel supports modules).
Example: if Bluetooth does not work on a device with a chip Qualcomm WCN3990, check:
adb shell dmesg | grep -i bluetooth
adb shell ls /dev/ | grep -i rfkill
Typical causes of problems:
- โ Missing driver in the kernel (for example, after a firmware update).
- โ Incompatible version of a proprietary blob (for example, a driver GPU from ARM Mali-G78 compiled for a different kernel version).
- โ Conflict with other modules (for example, drivers Wi-Fi and Bluetooth use the same one RF-chip).
โ ๏ธ Attention: If you replace the driver manually (for example, copy wlan.ko from another firmware), make sure that:
- Kernel versions (
uname -r) are the same.- The CPU architecture is the same (
arm64vsarm).- The manufacturer and model of the chip are identical (for example, Qualcomm WCN6855!= WCN6750).
FAQ: Frequently asked questions about drivers in Android
Is it possible to install a driver in Android as in Windows (via .exe or .inf)?
No. In Android, drivers are integrated into the firmware and are not installed separately. The exception is some proprietary modules that are updated via OTA updates from the manufacturer (for example, drivers for 5G modem 5G modem Samsung Galaxy S22).
Where are the camera drivers stored in Android?
Camera drivers are divided into several parts:
- Kernel module (for example,
msm_camera.koin/vendor/lib/modules/). - HAL implementation (for example,
android.hardware.camera.provider@2.4-impl.soin/vendor/lib/hw/). - Proprietary image processing libraries (for example,
libmmcamera2*).
How do I know which driver is used for my GPU?
Run the commands:
adb shell cat /proc/version
adb shell dumpsys SurfaceFlinger | grep"GPU"
For Adreno (Qualcomm) will also work:
adb shell cat /sys/kernel/debug/kgsl/kgsl-3d0/dev
Is it possible to update the driver without flashing the entire device?
Theoretically yes, but in practice it is difficult. Some manufacturers (for example, Google for Pixel) allow you to update individual modules via Project Mainline. In other cases, you will need to:
- Extract the new driver from the official firmware.
- Replace the old file (for example,
wlan.ko) via recovery. - Reboot the device.
The risk bootloop is very high!
Why is /proc/modules empty, although the hardware is working?
This means that your kernel is built without support for loadable modules (CONFIG_MODULES=nAll drivers are built in statically. To see. them, you can:
- View the kernel configuration:
adb shell zcat /proc/config.gz | grep"CONFIG_". - Use
lsmodfrom busybox (if installed).