The previous article describes how to compile android4.2.2 source code before the preparation work, now introduce the Android source code compilation process. Here we compile an emulator version of an ARM processor.
- Execute envsetup.sh Script
- Executes the lunch command to display a target that can be compiled
- See in the Eng version, Userdebug version, and the user version I did not go up, the three differences are as follows
Eng:debug version, the default is the root user when executing the ADB shell command, the highest privilege
User:release version final release, low privilege
Userdebug version: Partial debug version, I didn't use it.
Enter 1 in the terminal, that is, the Full-eng version is selected, and then some compilation information is listed
- Execute MAKE-JN start compiling Android source code, here n means to open several threads to compile, the specific value of N and the Ubuntu system in the virtual machine
Configuration about, recommended a few G memory, N to take a few, such as my virtual machine is 2G of memory, I set the n is 2. When there are some compile errors, such as
If I can't find the reason, then we can try to reduce the value of N, maybe compile it, I have encountered this problem.
- After two hours or so (how long it takes to configure the virtual machine), the build succeeds in the Android source directory
Android system image generated in Out/target/product/generic
- After compiling successfully, we can go to the cache folder in the previous article to see if there is something generated, these are
Can speed up the compilation of other Android versions
Compiling android4.2.2