seandroid下载编译

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

Java5: for Froyo and older

$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk

Installingrequired packages (Ubuntu 12.04)

Buildingon Ubuntu 12.04 is currently only experimentally supported and is notguaranteed to work on branches other than master.

$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so






  • Makesure you have a bin/ directory in your home directory, and that itis included in your path:

    $ mkdir ~/bin
    $ PATH=~/bin:$PATH
  • Downloadthe Repo script and ensure it is executable:

    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo
  • Forversion 1.17, the SHA-1 checksum for repo isddd79b6d5a7807e911b524cb223bc3544b661c28

Initializinga Repo client

Afterinstalling Repo, set up your client to access the android sourcerepository:

  • Createan empty directory to hold your working files. If you're usingMacOS, this has to be on a case-sensitive filesystem. Give it anyname you like:

    $ mkdir WORKING_DIRECTORY
    $ cd WORKING_DIRECTORY
  • Runrepo init to bring down the latestversion of Repo with all its most recent bug fixes. You must specifya URL for the manifest, which specifies where the variousrepositories included in the Android source will be placed withinyour working directory.

    $ repo init -u https://android.googlesource.com/platform/manifest

    Tocheck out a branch other than "master", specify it with-b:

    $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
  • Whenprompted, please configure Repo with your real name and emailaddress. To use the Gerrit code-review tool, you will need an emailaddress that is connected with a registeredGoogle account. Make sure this is a live address at which youcan receive messages. The name that you provide here will show up inattributions for your code submissions.

Asuccessful initialization will end with a message stating that Repois initialized in your working directory. Your client directoryshould now contain a .repo directorywhere files such as the manifest will be kept.

Gettingthe files

Topull down files to your working directory from the repositories asspecified in the default manifest, run

$ repo sync

TheAndroid source files will be located in your working directory undertheir project names. The initial sync operation will take an hour ormore to complete. For more about repo syncand other Repo commands, see VersionControl.

Usingauthentication

Bydefault, access to the Android source code is anonymous. To protectthe servers against excessive usage, each IP address is associatedwith a quota.

Whensharing an IP address with other users (e.g. when accessing thesource repositories from beyond a NAT firewall), the quotas cantrigger even for regular usage patterns (e.g. if many users sync newclients from the same IP address within a short period).

Inthat case, it is possible to use authenticated access, which thenuses a separate quota for each user, regardless of the IP address.

Thefirst step is to create a password from thepassword generator and to save it in ~/.netrcaccording to the instructions on that page.

Thesecond step is to force authenticated access, by using the followingmanifest URI: https://android.googlesource.com/a/platform/manifest.Notice how the /a/ directory prefixtriggers mandatory authentication. You can convert an existing clientto use mandatory authentication with the following command:

$ repo init -u https://android.googlesource.com/a/platform/manifest

Troubleshootingnetwork issues

Whendownloading from behind a proxy (which is common in some corporateenvironments), it might be necessary to explicitly specify the proxythat is then used by repo:

$ export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
$ export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>

Morerarely, Linux clients experience connectivity issues, getting stuckin the middle of downloads (typically during "Receivingobjects"). It has been reported that tweaking the settings ofthe TCP/IP stack and using non-parallel commands can improve thesituation. You need root access to modify the TCP setting:

$ sudo sysctl -w net.ipv4.tcp_window_scaling=0
$ repo sync -j1

Usinga local mirror

Whenusing several clients, especially in situations where bandwidth isscarce, it is better to create a local mirror of the entire servercontent, and to sync clients from that mirror (which requires nonetwork access). The download for a full mirror is smaller than thedownload of two clients, while containing more information.

Theseinstructions assume that the mirror is created in/usr/local/aosp/mirror. The first stepis to create and sync the mirror itself, which uses close to 13GB ofnetwork bandwidth and a similar amount of disk space. Notice the--mirror flag, which can only bespecified when creating a new client:

$ mkdir -p /usr/local/aosp/mirror
$ cd /usr/local/aosp/mirror
$ repo init -u https://android.googlesource.com/mirror/manifest --mirror
$ repo sync

Oncethe mirror is synced, new clients can be created from it. Note thatit's important to specify an absolute path:

$ mkdir -p /usr/local/aosp/master
$ cd /usr/local/aosp/master
$ repo init -u /usr/local/aosp/mirror/platform/manifest.git
$ repo sync

Finally,to sync a client against the server, the mirror needs to be syncedagainst the server, then the client against the mirror:

$ cd /usr/local/aosp/mirror
$ repo sync
$ cd /usr/local/aosp/master
$ repo sync

It'spossible to store the mirror on a LAN server and to access it overNFS, SSH or Git. It's also possible to store it on a removable driveand to pass that drive around between users or between machines.

VerifyingGit Tags

Loadthe following public key into your GnuPG key database. The key isused to sign annotated tags that represent releases.

$ gpg --import

Copyand paste the key(s) below, then enter EOF (Ctrl-D) to end the inputand process the keys.

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPg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9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----

Afterimporting the keys, you can verify any tag with

$ git tag -v TAG_NAME

Ifyou haven't setup ccache yet, now would be a good time to do it.

Next:Build the code



你可能感兴趣的:(seandroid下载编译)