linux-device-driverandroid-kernel

Android Kernel Modules, Custom kernel


Was trying to make custom kernel. After making some changes build a kernel and installd on mediatek device gps, wifi stopped working

checked $ls -la /dev/ no devices found related to gps, wifi and bluetooth, extracted vendor.img and tried to insmod/modprobe the binary files of kernel still showing

insmod: failed to load bt_drv.ko: Exec format error
1|801:/sdcard/Download # modprobe bt_drv.ko                                                                                                                  
modprobe: /etc/modprobe.conf: No such file or directory
modprobe: /etc/modprobe.d: No such file or directory
modprobe: chdir '/lib/modules/4.4.97'

this errors and i've only vendor image(binary files of modules) not module code.


Solution

  • Since you rebuilt the kernel, you need to rebuilt the module as well, otherwise modules cannot be loaded due to signature mismatch. Since you do not have module source code, you can try to disable CONFIG_MODULE_SIG in kernel configuration to bypass module verification.