How to build a module for Andoroid?

The need arose to compile the driver for android 6 root obtained. Driver for linux was found but how to rebuild the kernel with the necessary module on Android I don't know, I found links that didn't answer my questions
For example: here or here as a copy of the kernel source don't know where to get (no on 4pda, either I am very bad looking) first the user and secondly there is no file config.gz the device (Asus ZenPad 8)
June 14th 19 at 21:00
1 answer
June 14th 19 at 21:02
To assemble the module will be enough kernels of the same version from another device. (VERMAGIC must be identical to Yours) For your device I sought matches at random (the kernel is configured, assembled the module, I tried insmod'nut, looked at logs, set up again...)
Not as easy as it seemed. All the time wallowing errors on unknown paths or missing modules are in the drivers folder... Digging further - Elena commented on June 14th 19 at 21:05
The thing is to find deliberately compile the kernel. If you need driver under this kernel no, of course you need to use third party driver code. But this way is really challenging and took me more than a week. - johnathon6 commented on June 14th 19 at 21:08
I downloaded the kernel from the manufacturers website ASUS, but nothing came of it - Elena commented on June 14th 19 at 21:11

Find more questions by tags AndroidLinux