Hi, All

If you need often sync different versions of AOSP from google or internet, 
It's better for you to have a local AOSP mirror, it will help you to repo sync
AOSP source much faster.

1. Create a local AOSP mirror
    Here is the link about how to create local AOSP mirror:
    https://source.android.com/source/downloading.html#using-a-local-mirror
$ mkdir -p /usr/local/aosp/mirror
$ cd /usr/local/aosp/mirror
$ repo init -u https://android.googlesource.com/mirror/manifest --mirror
$ repo sync

2. Use a local AOSP mirror
    As described  here:
$ mkdir -p /usr/local/aosp/master
$ cd /usr/local/aosp/master
$ repo init -u /usr/local/aosp/mirror/platform/manifest.git
$ repo sync

3. linaro_android_build_cmds.sh supports to use mirror now.
    Linaro releases each android build with a linaro_android_build_cmds.sh script which helps you
    repo sync and build the android source to reproduce the build.
    It supports using local mirror from now on, like:

./linaro_android_build_cmds.sh -t -u <url-aosp-mirror-manifest>    
    
    For other options of linaro_android_build_cmds.sh, please check the help or the release page of that build.

-------------------------------------------------------------------------------------------------------------------
If you do not use hackbox for Android building, you can ignore the following part now.
-------------------------------------------------------------------------------------------------------------------
4. Use AOSP mirror on hackbox.linaro.org
   Since I often use hackbox to build android for different versions, I created a local AOSP mirror on hackbox,
   and it is synced every 6 hours.
   **** If you have AOSP mirror on hackbox too, let's talk to keep only one for disk space.****

   The AOSP mirror path is here:
  /home/yongqin.liu/aosp-mirror/
   
   It's very similar to sync from AOSP or android-git.linaro.org, you can use it like this:
mkdir aosp-master
cd aosp-master
repo init -u /home/yongqin.liu/aosp-mirror/platform/manifest.git -p linux
repo sync

   Or use it with linaro_android_build_cmds.sh like this:
./linaro_android_build_cmds.sh -u /home/yongqin.liu/aosp-mirror/platform/manifest.git -t -y


If you can specify --depth=1 or -g option for your repo init command, it will help you repo sync more faster.
Like with,
      repo init -u /home/yongqin.liu/aosp-mirror/platform/manifest.git -p linux --depth=1

It took less than 10 minutes to finish the following repo sync command;
      $time repo sync -j8 
      .......
      real 7m22.535s
      user 8m41.735s
      sys 2m13.250s
      $

-- 
Best Regards,
Yongqin Liu
---------------------------------------------------------------
#mailing list
linaro-android@lists.linaro.org