To clone one of these trees, install git , and run:
git clone git://android.git.kernel.org/
+ project path.
To clone the entire platform, install repo , and run:
mkdir mydroid
cd mydroid
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
For more information about git , see an overview
打算全部下载回来再说,先下载repo脚本
更多git和repo使用说明看这里:
http://source.android.com/download/using-repo
curl http://android.git.kernel.org/repo >repo
chmod +x repo
wen@debian:~/android/source$ ./repo init -u git://android.git.kernel.org/platform/manifest.git
gpg: keyring `/home/wen/.repoconfig/gnupg/secring.gpg' created
gpg: keyring `/home/wen/.repoconfig/gnupg/pubring.gpg' created
gpg: /home/wen/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 920F5C65: public key "Repo Maintainer <[email protected] >" imported
gpg: Total number processed: 1
gpg: imported: 1
Getting repo ...
from git://android.git.kernel.org/tools/repo.git
wen@debian:~/android/source$ ./repo sync
和远程服务器同步,过程比较长,全部代码下来好几Gb
打算编译一个vmware虚拟机上能运行的
目前google已经出e pc支持的版本了
切换到cupcake 分支,master分支不是太稳定
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b
cupcake
$ repo sync
同步后,很多的更改会uncommit
建立一个local_manifest.xml
$ vi ./.repo/local_manifest.xml
<manifest>
<project name="platform/vendor/asus/eee_701" path="vendor/asus/
eee_701"/>
</manifest>
$ repo sync
... A new repo command ( 1.8) is available.
... You should upgrade soon:
cp /home/invain/bin_x86/mydroid/.repo/repo/repo /home/invain/bin/
repo
Initializing project platform/vendor/asus/eee_701 ...
remote: Counting objects: 33, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 33 (delta 2), reused 33 (delta 2)
Unpacking objects: 100% (33/33), done.
From git://android.git.kernel.org/platform/vendor/asus/eee_701
* [new branch] cupcake -> korg/cupcake
* [new branch] master -> korg/master
$ sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl li b ncurses5-dev zlib1g-dev
$ sudo apt-get install valgrind
TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=
true
make
-j2 installer_img CC=gcc CXX=g++
出现错误
No rule to make target `vendor/google/frameworks/maps/com.google.android.maps.xml'
把eee_701.mk中的 'generic_with_google.mk' 改为 'generic.mk'
编译遇到新错误
其他用户编译会提示没有找到e2fschk
这里不能简单的把文件从sbin目录复制到bin目录
否则会和root用户编译一样
出现下面的错误
Copy: out/target/product/eee_701/installer/root/system/bin/netcfg
Copying installer base files...
Copy: out/target/product/eee_701/obj/lib/libdiskconfig.so -> out/
target/product/eee_701/installer/root/system/lib/libdiskconfig.so
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
Try `cp --help' for more information.
Copy: ->
dirname: missing operand
Try `dirname --help' for more information.
mkdir: missing operand
Try `mkdir --help' for more information.
cp: missing file operand
android目录下的external/e2fsprogs 就是这些工具,没有编译而已
打下面的patch
project external/e2fsprogs/
diff --git a/Android.mk b/Android.mk
index e71cf08..3d39a41 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,3 +1,3 @@
-ifneq ($(TARGET_SIMULATOR),true)
-# include $(call all-subdir-makefiles)
+ifeq ($(TARGET_ARCH),x86)
+include $(call all-subdir-makefiles)
endif