After compiling the complete Android in the front, you can now start compiling the specified module
CD ~/android
Perform
. ./build/envsetup.sh
Have the following command
-Croot:changes directory to the top of the tree.
-M:makes from the top of the tree.
-Mm:builds all of the modules in the current directory.
-Mmm:builds all of the modules in the supplied directories.
-Cgrep:greps on all local C + + files.
-Jgrep:greps on all local Java files.
-Resgrep:greps on all local res/*.xml files.
-Godir:go to the directory containing a file.
Use the MMM command to compile the specified module, such as an email application:
Mmm packages/apps/email/
Once the compilation is complete, you can see the email.apk file in the Out/target/product/generic/system/app directory.
Three. After compiling the module, we also need to repackage the system.img file so that we can see our program when we run the system.img on the simulator.
~/android$ make Snod
Then run the virtual machine
SOURCE build/envsetup.sh
Lunch Full-eng
Emulator
Compiling Android specific modules