在Ubuntu 64位上下载编译Android源码
安装必要的包
命令行:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev java-common unixodbc
包清单:
-
git-core
-
gnupg
-
flex
-
bison
-
gperf
-
build-essential
-
zip
-
curl
-
zlib1g-dev
-
gcc-multilib
-
g++-multilib
-
libc6-dev-i386
-
lib32ncurses5-dev
-
ia32-libs
-
x11proto-core-dev
-
libx11-dev
-
lib32readline5-dev
-
lib32z-dev
-
java-common
-
unixodbc
安装JDK6
命令:
sudo apt-get install sun-java6-jdk
如果找不到sun-java6-jdk包,则需要先添加源,命令为:
sudo add-apt-repository “deb http://archive.canonical.com/ natty partner”
下载Android源码
cd mkdir -p ~/bin curl http://android.git.kernel.org/repo >~/bin/repo chmod a+x ~/bin/repo mkdir -p android-src/gingerbread cd android-src/gingerbread repo init -u git://android.git.kernel.org/platform/manifest.git -b gingerbread repo sync -j 40
编译Android源码
make -j 4
登录为: 读者 (reader)