Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> Android開發實例 >> 在本地建立android源碼鏡像

在本地建立android源碼鏡像

編輯:Android開發實例


               
Creating an OMAP-Android Mirror
This article describes how to create a mirror of the OMAP-Android
repositories on a local server. This allow users working on the local
server to create clones of the OMAP-Android repositories locally rather
than over the internet.

Prerequisites/Assumptions
This article assumes that you already have repo, git and a git
server installed on the local server. If you do not please refer to the
following articles.
Installing Repo:
"http://source.android.com/download"
Installing Git:
http://wiki.omap.com/index.php?title=Git#Installing_Gi
t
Setting up a Git Server:
http://wiki.omap.com/index.php?title=Git#Setting_up_a_Git_Server
IMPORTANT! If you are
working behind a firewall, you will need to use corkscrew in order to
create the mirror. When you configure corkscrew it is important that
you configure git to only use corkscrew when cloning from kernel.org
and omapzoom.org sites. If you do not then when you attempt to perform
a local clone of the mirror, git will try to go through the firewall
and will not find your local server. For instructions on installing
corkscrew and configuring git to use corkscrew click
here


HOWTO Create an OMAP-Android Mirror
On the local server create a new directory that where the local
mirror will reside. Note that the Git server should be configured to
export this server. See reference above for installing a Git server on
the Linux host. For example, if the Git server was configured to export
the directory "/pub/gittrees" on the Linux host, then the following
directory could be create for the OMAP-Android mirror...
mkdir /pub/gittrees/omap-android/

Create the mirror by executing the following commands.
cd /pub/gittrees/omap-android/
repo init -u git://git.omapzoom.org/repo/android/platform/omapmanifest.git --mirror
repo sync
Once the "sync" has completed it is then necessary to modify the
OMAP-Android manifest , so that when users attempt to create clones of
the OMAP-Android git trees it directs them to the local server and not
to the external servers. To do this create a clone of the OMAP-Android
manifest as shown below. The clone may be created as "user" and so long
as the user has write permission in the directory where the mirror is
located. Please note that in this example the IP address of the local
server is 192.168.0.100 and assumes the Git server is configured with
the option --base-path=/pub/gittrees.
cd ~
git clone git://192.168.0.100/omap-android/repo/android/platform/omapmanifest.git

Edit the file "~/omap-android-manifest.git/default.xml" in "and
replace the "fetch" location for the remote korg and omap with the IP
address and directory name of the OMAP-Android mirror. The below
illustrates the changes made to the default.xml file for this
example...


   
   
+           fetch="git://192.168.0.100/omap-android/" />
   

Finally, commit this change to the Git repository and push this
change back to the parent Git tree. Please note that "user" is the
username of the person that has modifed the manifest.
cd ~/omap-android-manifest.git
git commit -a
git push [email protected]:[email protected]

The setup of the mirror is now complete.
IMPORTANT! Please note
that if you update the mirror by executing "repo sync" sometime later,
if the manifest has been updated, sync'ing the mirror will overwrite
the changes you have made. Hence, when updating the mirror check to see
if the manifest has been updated.


HOWTO Clone from the Local Mirror
On a developer system on the same network as the host, users may
make clones from the local mirror by executing the following commands.
cd ~
mkdir mydroid
cd mydroid
repo init -u git://192.168.0.100/omap-android/repo/android/platform/omapmanifest.git
repo sync

               
               

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved