1. Install Ubuntu 12.04 x64
2. update packages
3. install sun java 6 ( for kitkat) refer to http://blog.csdn.net/winceos/article/details/37498783
4.install library for android build
$sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
5. downloading AOSP( Android Open source Project) source code
6. compile