Android emulator: Building boot.img from AOSP

2019-07-25 06:19发布

问题:

I am trying to build AOSP 4.3 (build: JSR78D; branch: android-4.3_r2) on Debian 7 (amd64). I followed the instructions listed in Google Android website and finished build steps successfully. At the end, I could test my newly built image with the Android emulator.

Now, I have 3 image files in the out/target/product/generic directory: system.img, userdata.img, and ramdisk.img. However, boot.img is missing. I tried issuing the make bootimage command, but it did not help generating the aforesaid file. I expected Makefile to automatically build this file for me since it includes build/core/main.mk which has bootimage as one of its targets.

PS. I have seen posts like this, but it is still not clear to me why boot.img is not built automatically.

回答1:

Boot.img contains the kernel. Which is the interface between the OS and the hardware. We don't have hardware in emulator device.(generic).

You want boot.img? build Android for a real device(Ex. Nexus 5)