[写在前面的话]
本人比较懒惰,写BLOG这样的事情也是有一搭没一搭,最近想弄一下android,刚接触,自然不可能有一个完整的体系,很可能有时候是错误的,好在本人BLOG关注度那是十分低,不会误人,就权当学习LOG了。
[做事之前]
首先,我想找一份android的source,这个是必须的,对吧:),可郁闷之处在于
http://source.android.com/都没法访问。不知道是否老戏重演,又被电信劫持域名了,Torpark也没搞定,我就想不通,你封FLG吧是应该的,可怎么动不动就封技术网站,sourceforge曾也遭毒手,法国的一个USB CAMERA网站好像现在都还不行,这次又android?清政府还知道师夷长技以制夷呢,这环境,难怪朋友纷纷想出国,唉。没开篇就扯远了,打住。反正花了好一阵也没找到android的source code(也是自己不仔细的原因)差点就找朋友国外给我开个机器来远程上网了。此等曲折按下不表。无意中发现网上的一篇BOLG(http://blog.chinaunix.net/u/8059/showart_1360298.html),嗯,真是好东西,花了一个晚上,下载完毕。根据我用的时候的稍作修改LOG如下:
[步骤]
本人是ubuntu7.10环境。
首先通过System->software Sources->Download from:others(之后Select Best Server),找到最快的ubuntu package server. 完成后应用一下。
To install, initialize, and configure Repo, follow these steps:
Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
$ mkdir ~/software/repo -p
$ cd ~/software/repo
$ git-clone git://android.kernel.org/tools/repo.git
$ cd ~
$ mkdir bin
$ export PATH=~/bin:$PATH
$ echo $PATH
Download the repo script and make sure it is executable:
$ curl http://android.git.kernel.org/repo >~/bin/repo
$ cp ~/software/repo/* ~/bin -darf
$ chmod a+x ~/bin/repo
Create an empty directory to hold your working files:
$ mkdir mydroid
$ cd mydroid
Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a Google account.
A successful initialization will end with a message such as
repo initialized in /mydroid
To pull down files to your working directory from the repositories as specified in the default manifest, run
$ repo sync
另外,发现虚拟机中比较容易出现问题(特别是硬盘空间没有事前开出来的时候)
步骤没啥道理,甚至repo那段重复了,不过我下载到了source,就不管它了