repo

为什么有此记录?

在实验室时只需要拷贝个源码包就可以开发下android。现在每次都要pull代码,网速也不好。最初都是采用同事的方法拉代码,但是真的不能忍受这网速……最好能只下载需要的代码

参考:http://xda-university.com/as-a-developer/repo-tips-tricks

         jesper指导

 

repo help

repo help init

repo init -u url -b branch -m manif.xml

repo init -m  xxx.xml

1.

This local_manifest.xml  will allow us to:

  • Add new “remotes”
  • Add, remove or replace “projects” (repositories)
<?xml version="1.0" encoding="UTF-8"?>                                                                                            
<manifest>
    <remove-project name="a/aosp/device/generic/arm64" />
    <remove-project name="a/aosp/device/generic/armv7-a-neon" />
    <remove-project name="a/aosp/device/generic/mini-emulator-mips" />
    <remove-project name="a/aosp/device/generic/mips" />
    <remove-project path="hardware/qcom/display" name="CyanogenMod/android_hardware_qcom_display" />
    <project path="hardware/qcom/display" name="WinSuk/android_hardware_qcom_display" />
</manifest>

 

2. syncing a full new source tree in minutes (未验证)

We will use the  --reference  flag of repo init  to indicate to repo that we already have a local repository that it can take information from, instead of downloading everything from Internet again:

mkdir  ~/android/aokp
cd ~/android/aokp
repo init --reference=~/android/cm -u git://github.com/AOKP/platform_manifest.git -b jb

 

3. (不能使用,也许google的repo可以)

Sometimes you’ll wish repo be more verbose. It’s particularly true when repo sync fail, but won’t tell you why! The reason is usually a remote git server that isn’t available. To make repo be more verbose about what it does, you can add the --trace flasg, right after repo:

posted on 2014-11-22 15:18  阿加  阅读(345)  评论(0)    收藏  举报

导航