Important Commands for Android Build
Basic Build Commands
hmm – Lists out all available commands.
lunch – Displays build flavors and allows you to select one.
croot – Returns to the root of the source tree.
m Commands (Building AOSP)
m – Builds the entire AOSP.
Example:
m -j12
(where-j12
specifies the number of threads to use during the build)This command builds from the root of the tree.
mm – Builds and installs all modules in the current directory.
Useful for compiling selected directories without doing a full build.
Note: This does not create a new system image; a full build is required to reflect changes.
mmm – Similar to
mm
, but allows building multiple directories or modules at once.
Other Useful Commands
allmod – Lists all available modules.
gomod – Navigates to the directory containing a specific module.
pathmod – Displays the path to a module’s directory.
outmod – Shows the output path of a built module.
dirmod – Lists modules defined in a specific directory.
installmod – Installs a module’s built APK using ADB.
refreshmod – Refreshes the list of modules used by
allmod
,gomod
,pathmod
,outmod
, andinstallmod
.
Conclusion
This overview introduces the Android boot process, from Boot ROM to the home launcher, and highlights key build commands necessary for Android development. Future articles will explore deeper Android internals. Stay tuned and share your feedback for improvements. Happy learning!