For detailed compilation methods, refer to the Wiki of cyanogenmod.
Configure build
Now, your environment must be configured to build specifically for the android emulator. To set up your build environment:
. build/envsetup.shlunch cyanogen_generic-eng
Compile
Next, we will build the actual Rom.
mka
Problems encountered during compilation: Problem 1:
- Bootable/recovery/applypatch/bspatch. C: 29: 19: Error: bzlib. h: no such file or directory
- Make: * ** if no rule is available, you can create the target "Out/target/product/generic/obj/executables/updater_intermediates/linked/Updater/ static_libraries/libbz_intermediates/libbz. A ". Stop.
The two files can be found in the official Android source code, both under the external/Bzip2 directory. Check the files in the cyanogenmod directory. They are empty and the repo is not synced. Therefore, git is used for this project separately.
git clone git://github.com/CyanogenMod/android_external_bzip2.git -b gingerbread
Copy the. Git directory to. repo/projects/external/bzip2.git
Copy other files to the external/Bzip2 directory.
Question 2:
Solution: Find the kernel-qemu-armv7 in CM source code, in ~ /Prebuilt/Android-arm/kernel/kernel-qemu-armv7, copy it to the corresponding SDK directory, specify the kernel when opening the simulator:
#emulator @CM7 -kernel PATH/images/kernel-qemu-armv7