Compilation Module
An application in android can be compiled separately. After compilation, system. IMG must be regenerated.
Run the following command in the source code directory:
. Build/envsetup. Sh (. There is a space behind it)
There are more commands:
-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/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.
You can add-help to view usage
We can use Mmm to compile the module of the specified directory, for example, compile the contact:
Mmm packages/apps/contacts/
Generate two files after editing:
Out/target/product/generic/data/APP/contactstests.apk
Out/target/product/generic/system/APP/contacts.apk
You can use make Snod to regenerate system. IMG.
Run the simulator again.