tips for android source code getting

Ubuntu8.10

 

1. install prerequiries:

 

sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential python valgrind curl git zlib1g-dev libncurses5-dev

 

2. refer to google source web: source.android.com

Installing Repo

Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Using Repo and Git .

To install, initialize, and configure Repo, follow these steps:

  1. Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
      $ cd ~
      $ mkdir bin
      $ echo $PATH
  2. Download the repo script and make sure it is executable:
    $ curl http://android.git.kernel.org/repo >~/bin/repo
    $ chmod a+x ~/bin/repo
  3. Initializing a Repo client
    1. Create an empty directory to hold your working files:
      $ mkdir mydroid
      $ cd mydroid
    2. 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
      • If you would like to check out a branch other than "master", specify it with -b, like:
        $ repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
    3. 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



    Your client directory should now contain a .repo  directory where files such as the manifest will be kept.
  4. Building the code


    To build the files, run make from within your working directory:
        $ cd ~/mydroid  
        $ make

    If your build fails, complaining about a missing "run-java-tool", try setting the ANDROID_JAVA_HOME env var to $JAVA_HOME before making.  E.g.,

        $ export ANDROID_JAVA_HOME=$JAVA_HOME

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值