Android的源代码可以在source.android.com网站获取,Android的Linux Kernel源代码同样可以在source.android.com取得。
Android源代码大约占用2.1GB磁盘空间,而编译Android系统则至少需要6GB磁盘空间。
安装上面一些必要的软件程序:
sudo apt-get install git git-core gnupg \build-essential fakeroot valgrind flex \bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev \zip curl zlib1g-dev libncurses5-dev liblzo2-dev \libx11-dev uboot-mkimage
Valgrind是一款用于内存调试、内存泄漏检测以及性能分析的软件开发工具
fakeroot 可以用来模拟 root 权限
GnuPG(GNU Privacy Guard或GPG)是一个以GNU通用公共许可证释出的开放源码用于加密或签名的软件,可用来取代PGP
flex与bison用于分析或处理Linux或Unix中的文本数据
gperf实现高效的 C/C++ 命令行处理
libesd0-dev :Enlightened Sound Daemon - Shared libraries
libwxgtk2.6-dev :wxWidgets Cross-platform C++ GUI toolkit (GTK+ development).wxWidgets (formerly known as wxWindows) is a class library for C++ providing GUI components and other facilities on several popular platforms (and some unpopular ones as well).
libncurses5-dev :developer's libraries for ncurses.Ncurses 提供字符终端处理库,包括面板和菜单。
liblzo2-dev :LZO is a portable, lossless data compression library.
sudo apt-get install sun-java5-jdk sun-java6-jdk
更多请参考:《ubuntu安装jdk6 》 http://blog.csdn.net/niyufeng/article/details/7957156
sudo apt-get install vim gcc build-essential \fortran77-compiler make gawk automake autoconf \minicom lrzsz linux-headers-$(uname -r) ncurses-dev \libncursesw5-dev libncurses5-dev netpbm libnetpbm10 \libnetpbm10-dev libtool bison flex texinfo \binutils-dev libc6-dev linux-libc-dev \manpages manpages-dev manpages-posix manpages-posix-dev
查看当前使用的Java版本
java -version
切换Java版本
sudo update-alternatives --config javasudo update-alternatives --config javacsudo update-alternatives --config javah
下面列举一些常用宏: