To get started with Android Open Source Project, you'll need to get familiar with Git and Repo.
To initialize your local repository using the AOSP trees, use a command like this:
repo init -u git://github.com/XNovathor/manifest.git -b 4.1.2_r1
Then to sync up:
repo sync
To build :
. build/envsetup.sh
lunch full_"device_name"-eng (kumquat, pepper, lotus, nypon)
make otapackage