---------------------------------------------------------------------
1 install java
1) google提供的方法不可用:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
2) 下面的命令可以安装java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
--> check java version
java -version
javac -version
2 检查 python版本
derek@u10:~$ python -V
Python 2.6.5
3 检查make版本
derek@u10:~$ make -v
GNU Make 3.81
4 install git
sudo apt-get install git-core
$ git --version
git version 1.7.0.4
新版本的android源码要求git版本不得低于1.7.2,而ubuntu默认的不够,或者用别的方式无法正常升级时,可采用下面这个方式来升级个git
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git
$ git --version
git version 1.8.3
---------------------------------------------------------------------
1 install required packages (Ubuntu 10.04 -- 11.10)
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
2 config usb access --这一步暂时没研究
The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. <username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
---------------------------------------------------------------------
setting up ccache
1 gedit ~/.bashrc
# derek for android build
export USE_CCACHE=1
When building Ice Cream Sandwich (4.0.x) or older, ccache is in a different location: prebuilt/linux-x86/ccache/ccache -M 50G
run it before compile:
cd source_dir
prebuilt/linux-x86/ccache/ccache -M 50G
---------------------------------------------------------------------
build it:
cd source_dir
$ make -j4
4 means task number
---------------------------------------------------------------------
run it:
$ export PATH=$PATH:~/ics/ics-4.0.4/out/host/linux-x86/bin
$ export ANDROID_PRODUCT_OUT=~/ics/ics-4.0.4/out/target/product/generic
$ emulator
模拟器运行需要四个文件,分别是Linux Kernel镜像zImage和Android镜像文件system.img、userdata.img和ramdisk.img。执行emulator命令时, 如果不带任何参数,则Linux Kernel镜像默认使用~/Android/prebuilt/android-arm/kernel目录下的kernel-qemu文件 ,而Android镜像文件则默认使用ANDROID_PRODUCT_OUT目录下的system.img、userdata.img和ramdisk.img,也就是我们刚刚编译出来的镜像问题。
当然,我们也可以以指定的镜像文件来运行模拟器,即运行emulator时,即:
USER-NAME@MACHINE-NAME:~/Android$ emulator -kernel ./prebuilt/android-arm/kernel/kernel-qemu -sysdir ./out/target/product/generic -system system.img -data userdata.img -ramdisk ramdisk.img
具体可参考: http://blog.csdn.net/derek_yi/article/details/9103563
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
1 install java
1) google提供的方法不可用:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
2) 下面的命令可以安装java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
--> check java version
java -version
javac -version
2 检查 python版本
derek@u10:~$ python -V
Python 2.6.5
3 检查make版本
derek@u10:~$ make -v
GNU Make 3.81
4 install git
sudo apt-get install git-core
$ git --version
git version 1.7.0.4
新版本的android源码要求git版本不得低于1.7.2,而ubuntu默认的不够,或者用别的方式无法正常升级时,可采用下面这个方式来升级个git
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git
$ git --version
git version 1.8.3
---------------------------------------------------------------------
1 install required packages (Ubuntu 10.04 -- 11.10)
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
2 config usb access --这一步暂时没研究
The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. <username> must be replaced by the actual username of the user who is authorized to access the phones over USB.
---------------------------------------------------------------------
setting up ccache
1 gedit ~/.bashrc
# derek for android build
export USE_CCACHE=1
When building Ice Cream Sandwich (4.0.x) or older, ccache is in a different location: prebuilt/linux-x86/ccache/ccache -M 50G
run it before compile:
cd source_dir
prebuilt/linux-x86/ccache/ccache -M 50G
---------------------------------------------------------------------
build it:
cd source_dir
$ make -j4
4 means task number
---------------------------------------------------------------------
run it:
$ export PATH=$PATH:~/ics/ics-4.0.4/out/host/linux-x86/bin
$ export ANDROID_PRODUCT_OUT=~/ics/ics-4.0.4/out/target/product/generic
$ emulator
模拟器运行需要四个文件,分别是Linux Kernel镜像zImage和Android镜像文件system.img、userdata.img和ramdisk.img。执行emulator命令时, 如果不带任何参数,则Linux Kernel镜像默认使用~/Android/prebuilt/android-arm/kernel目录下的kernel-qemu文件 ,而Android镜像文件则默认使用ANDROID_PRODUCT_OUT目录下的system.img、userdata.img和ramdisk.img,也就是我们刚刚编译出来的镜像问题。
当然,我们也可以以指定的镜像文件来运行模拟器,即运行emulator时,即:
USER-NAME@MACHINE-NAME:~/Android$ emulator -kernel ./prebuilt/android-arm/kernel/kernel-qemu -sysdir ./out/target/product/generic -system system.img -data userdata.img -ramdisk ramdisk.img
具体可参考: http://blog.csdn.net/derek_yi/article/details/9103563
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------