Key points
- The kernel source must match the smartphone's Android major version.
- The first build should use an unchanged configuration to separate toolchain problems from code changes.
- The resulting kernel must be integrated into the original boot image and installed with Fastboot.
Context
This guide illustrates how a reproducible, device-specific Android build fits together across source code, configuration, compilation and image packaging. Its relevance for experienced software teams is primarily methodological, but the commands and parameters apply only to the Xiaomi 9. The source itself stresses that a version mismatch or faulty firmware can prevent the device from starting.
What this means for you
Directly applicable
Developers can use the walkthrough as a concrete reference for a controlled Xiaomi 9 kernel build, while keeping device-specific commands separate from general Android engineering practices.
Who benefits: Developers working on custom Android kernels or maintaining device-specific build pipelines can gain a clearer checklist for compilation, packaging and installation.