Mirroring AOSP & やってみた

https://groups.google.com/forum/#!topic/android-building/2gLwqjlQq3A
AOSPをローカルミラーする方法。

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

取得するには、

$ repo init -u /platform/manifest.git -b gingerbread

mkdir /usr/local/android-mirror
cd /usr/local/android-mirror
repo init --mirror -u https://android.googlesource.com/mirror/manifest
repo sync
mkdir /usr/local/android-2.3.7
cd /usr/local/android-2.3.7
repo init -u /usr/local/mirror/platform/manifest.git -b android-2.3.7_r1
repo sync
repo init -u https://android.googlesource.com/platform/manifest
repo sync

そんなに負荷をかけてくれるなってことか。


やってみた。

kinneko@BuildSV:~$ mkdir AOSP
kinneko@BuildSV:~$ cd AOSP
kinneko@BuildSV:~/AOSP$ ../repo init --mirror -u https://android.googlesource.com/mirror/manifest
Get https://code.google.com/p/git-repo/
remote: Counting objects: 1405, done.
remote: Finding sources: 100% (1405/1405), done.
remote: Total 1405 (delta 912)
Receiving objects: 100% (1405/1405), 405.34 KiB | 225 KiB/s, done.
Resolving deltas: 100% (912/912), done.
From https://code.google.com/p/git-repo
 * [new branch]      maint      -> origin/maint
 * [new branch]      master     -> origin/master
 * [new branch]      stable     -> origin/stable
 * [new tag]         v1.0       -> v1.0
 * [new tag]         v1.0.1     -> v1.0.1
 * [new tag]         v1.0.2     -> v1.0.2
 * [new tag]         v1.0.3     -> v1.0.3
 * [new tag]         v1.0.4     -> v1.0.4
 * [new tag]         v1.0.5     -> v1.0.5
 * [new tag]         v1.0.6     -> v1.0.6
 * [new tag]         v1.0.7     -> v1.0.7
 * [new tag]         v1.0.8     -> v1.0.8
 * [new tag]         v1.0.9     -> v1.0.9
 * [new tag]         v1.1       -> v1.1
 * [new tag]         v1.2       -> v1.2
 * [new tag]         v1.3       -> v1.3
 * [new tag]         v1.3.1     -> v1.3.1
 * [new tag]         v1.3.2     -> v1.3.2
 * [new tag]         v1.4       -> v1.4
 * [new tag]         v1.4.1     -> v1.4.1
 * [new tag]         v1.4.2     -> v1.4.2
 * [new tag]         v1.4.3     -> v1.4.3
 * [new tag]         v1.4.4     -> v1.4.4
 * [new tag]         v1.5       -> v1.5
 * [new tag]         v1.5.1     -> v1.5.1
 * [new tag]         v1.6       -> v1.6
 * [new tag]         v1.6.1     -> v1.6.1
 * [new tag]         v1.6.10    -> v1.6.10
 * [new tag]         v1.6.10.1  -> v1.6.10.1
 * [new tag]         v1.6.10.2  -> v1.6.10.2
 * [new tag]         v1.6.2     -> v1.6.2
 * [new tag]         v1.6.3     -> v1.6.3
 * [new tag]         v1.6.4     -> v1.6.4
 * [new tag]         v1.6.5     -> v1.6.5
 * [new tag]         v1.6.6     -> v1.6.6
 * [new tag]         v1.6.7     -> v1.6.7
 * [new tag]         v1.6.7.1   -> v1.6.7.1
 * [new tag]         v1.6.7.2   -> v1.6.7.2
 * [new tag]         v1.6.7.3   -> v1.6.7.3
 * [new tag]         v1.6.7.4   -> v1.6.7.4
 * [new tag]         v1.6.7.5   -> v1.6.7.5
 * [new tag]         v1.6.8     -> v1.6.8
 * [new tag]         v1.6.8.1   -> v1.6.8.1
 * [new tag]         v1.6.8.10  -> v1.6.8.10
 * [new tag]         v1.6.8.11  -> v1.6.8.11
 * [new tag]         v1.6.8.2   -> v1.6.8.2
 * [new tag]         v1.6.8.3   -> v1.6.8.3
 * [new tag]         v1.6.8.4   -> v1.6.8.4
 * [new tag]         v1.6.8.5   -> v1.6.8.5
 * [new tag]         v1.6.8.6   -> v1.6.8.6
 * [new tag]         v1.6.8.7   -> v1.6.8.7
 * [new tag]         v1.6.8.8   -> v1.6.8.8
 * [new tag]         v1.6.8.9   -> v1.6.8.9
 * [new tag]         v1.6.9     -> v1.6.9
 * [new tag]         v1.6.9.1   -> v1.6.9.1
 * [new tag]         v1.6.9.2   -> v1.6.9.2
 * [new tag]         v1.6.9.3   -> v1.6.9.3
 * [new tag]         v1.6.9.4   -> v1.6.9.4
 * [new tag]         v1.6.9.5   -> v1.6.9.5
 * [new tag]         v1.6.9.6   -> v1.6.9.6
 * [new tag]         v1.6.9.7   -> v1.6.9.7
 * [new tag]         v1.6.9.8   -> v1.6.9.8
 * [new tag]         v1.7       -> v1.7
 * [new tag]         v1.7.1     -> v1.7.1
 * [new tag]         v1.7.2     -> v1.7.2
 * [new tag]         v1.7.3     -> v1.7.3
 * [new tag]         v1.7.3.1   -> v1.7.3.1
 * [new tag]         v1.7.4     -> v1.7.4
 * [new tag]         v1.7.4.1   -> v1.7.4.1
 * [new tag]         v1.7.4.2   -> v1.7.4.2
 * [new tag]         v1.7.4.3   -> v1.7.4.3
 * [new tag]         v1.7.5     -> v1.7.5
 * [new tag]         v1.7.6     -> v1.7.6
 * [new tag]         v1.7.6.1   -> v1.7.6.1
 * [new tag]         v1.7.7     -> v1.7.7
 * [new tag]         v1.7.7.1   -> v1.7.7.1
 * [new tag]         v1.7.7.2   -> v1.7.7.2
 * [new tag]         v1.7.7.3   -> v1.7.7.3
 * [new tag]         v1.7.7.4   -> v1.7.7.4
 * [new tag]         v1.7.7.5   -> v1.7.7.5
Get https://android.googlesource.com/mirror/manifest
remote: Counting objects: 3, done
remote: Total 3 (delta 0), reused 3 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://android.googlesource.com/mirror/manifest
 * [new branch]      master     -> origin/master

repo mirror initialized in /home/kinneko/AOSP

kinneko@BuildSV:~/AOSP$ ../repo sync
From /home/kinneko/AOSP/device/google/accessory/arduino.git/clone.bundle
 * [new branch]      master     -> master
 * [new branch]      gingerbread -> gingerbread
remote: Counting objects: 6, done
remote: Finding sources: 100% (6/6)
remote: Total 6 (delta 0), reused 6 (delta 0)
Unpacking objects: 100% (6/6), done.
(略)

なんか、たまに

error: RPC failed; result=28, HTTP code = 0
fatal: The remote end hung up unexpectedly

とか出ますね。


gitは、JBQは1.7.3.1を使っているそうです。
Ubuntu 11.04だと1.7.4.1-3かな。最近updateしてないけど。


deviceの下のバイナリとか、なんか落とすのイヤだなぁ。
使わないのに。

error: Exited sync due to fetch errors

エラーで落ちた。


-j8で再実行中。
なんか、pythonのエラーまで出てます...
ダメかも。


error: gnutls_handshake() failed: A TLS packet with unexpected length was received. while accessing https://android.googlesource.com//platform/external/v8/info/refs


platform/prebuilt 1104MB
でかすぎ。

kinneko@BuildSV:~/AOSP$ ../repo sync    
Fetching projects: 100% (233/233), done.  

終わった。
なんどもリトライしたよ。