voke ". build/envsetup.sh" from your shell to add the following functions to your environment: lunch: lunch <product_name>-<build_variant> tapas: tapas [<App1> <App2> ...] [arm|x86|mips|armv5] [eng|userdebug|user] 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, but not their dependencies. mmm: Builds all of the modules in the supplied directories, but not their dependencies. To limit the modules being built use the syntax: mmm dir/:target1,target2. mma: Builds all of the modules in the current directory, and their dependencies. mmma: Builds all of the modules in the supplied directories, and their dependencies. 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.
cd ~/android/source source build/envsetup.sh lunch # <- (choose your device from the list) # To build .img files of the platform (you will need to 'fastboot' these onto a device that supports fastboot): make # To build an OTA (Over The Air) package (zip files that carriers send out to devices for updates): make otapackage # To build a specific component, for example the Camera application: make Camera
http://xda-university.com/as-a-developer/getting-started-building-android-from-source