Android 10: Update kernel modules

最后都变了- 提交于 2020-08-09 08:53:12

问题


Background: I am working with a Pixel 4, build QQ2A.200501.001.B2, which is Android 10. When I build the kernel from the official sources and flash it, the touchscreen, wlan and other features do not work. I tracked this down to the fact that the kernel modules in /vendor/lib/modules do not get updated, thus the new kernel can't load any of them. I tried flashing both only boot.img and the entire AOSP, same issue, they don't get updated. I can workaround this by manually pushing the kernel modules I built to the device and manually insmoding them in the right order.

So my questions are:

  • Why don't they get updated in the first place?
  • How can I update them along with the kernel when I flash?
  • Alternatively, how can I permanently update them after flashing?

Surely there must be an "official" way to do this? How are the kernel modules normally deployed?


Some notes:

I can't push them to /vendor/lib/modules because I can't remount /vendor writable:

flame:/ # mount -o rw,remount /vendor                                                                                                                                                   
'/dev/block/dm-5' is read-only

Disabling dm-verity doesn't seem to help.

I noticed that the AOSP source contains all the modules that are in /vendor/lib/modules, in the same place where it takes the kernel image form (in my case that's device/google/coral-kernel). So naturally, I tried replacing the modules there with the ones I built, but after building and flashing, I see that /vendor/lib/modules still contains the old modules.

The AOSP docs say that boot.img does not contain the ramdisk anymore, it's now in the system partititon. Also, OverlayFS is used and one should use a "vendor overlay" to update files there, if I read it right. However, on my device, there is no product/vendor_overlay directory like the docs say, only product/overlay/. I'm also not sure if this is the right way to tackle this or how I would go about creating such an overlay in my case.

Thanks

来源:https://stackoverflow.com/questions/63174162/android-10-update-kernel-modules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!