Posts

Showing posts from May, 2025

HOW TO RUN ANDROID EMULATOR WITH CUSTOMIZED KERNEL

 HOW TO RUN ANDROID EMULATOR WITH CUSTOMIZED KERNEL I. AOSP source code ( from AOSP 11 onward, google introduced GKI which separate android kernel and vendor kernel. kernel source is separated from AOSP )    1. clone aosp source from google    2. build emulator       cd <aosp>       source ./build/envsetup.sh       lunch sdk_car_x86_64-userdebug       make -j$(nproc)    3. test emulator       emulator -no-window -no-snapshot -writable-system -show-kernel II. Build custom android kernel    1. Find android kernel version compatible with current working emulator        at step I.3 , you will file in the log current kernel of emulator, sth like        " [    0.000000] Linux version 5.10.66-android12-9-00021-g2c152aa32942-ab8087165 (build-user@build-host) (Android (7284624, based on r416183b) clang version 12.0.5 " ...