How much internet data is need for aosp repo sync

1,251 views
Skip to first unread message

Sunder Rawat

unread,
Jul 1, 2020, 3:25:39 PM7/1/20
to Android Building
I want to download android open source code from https://source.android.com/setup/build/downloading but my internet connection is slow so can you give me estimate of how much internet is data i need for downloading all aosp from repo sync command. I want to download latest master branch.
repo init -u https://android.googlesource.com/platform/manifes
repo init -u https://android.googlesource.com/platform/manifes
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest

Igor Kukushkin

unread,
Jul 3, 2020, 12:35:45 PM7/3/20
to android-...@googlegroups.com
For the record, I just ran these download commands @ my server, here are results (perhaps with some 1-2% variation accounting for other traffic).

Recommended download:
Download size ~18.7 GB,  .repo folder used up 17 GB disk space  (network transfer overhead is below 2%).

Using master branch:
Download size ~18.2 GB, .repo folder used up 18 GB disk space.

Full checkout:
Download size ~46.0 GB, .repo folder used up 45 GB disk space.


(Note that when downloading with --depth 1, you can fetch full git history for specific project anytime later by running variation of git --unshallow inside specific project dir)

On Thu, Jul 2, 2020 at 4:07 PM Igor Kukushkin <igo...@gmail.com> wrote:
Run it with --depth 1, like:
repo init -u  https://android.googlesource.com/platform/manifest -b android-10.0.0_r39 --depth 1

(note use of -b, most likely you don't want to clone master branch as well)

Then you can also omit fetching some parts of repository with --groups, e.g. if you're building AOSP on Linux, you probably don't want to download OSX toolchain, and likely don't need stuff for MIPS architecture (emulator, etc):
repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r39 --depth 1 --groups=all,-darwin,-mips
(you can get a list of groups from .repo/**.xml from prior attempts , make sure to not omit stuff in important groups such as pdk, etc)

Total download size this way will be 14..18 GB with some transfer overhead. Full git history is likely over 50+gb, and it'll take 3-5 more GB to get kernel source (not included) and device binaries

You can also rent a cloud server instance (paid per use  instance with enough storage space would cost around a dollar), fetch repo, zip it and download over http, https://forum.xda-developers.com/chef-central/android/guide-how-to-build-rom-google-cloud-t3360430 for starters (please don't forget to shut down and delete all instances, disks and backups when done).

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/5ccf88c6-811c-49b9-93c0-415960b87512o%40googlegroups.com.

林果皞

unread,
Jul 3, 2020, 12:35:48 PM7/3/20
to Android Building
From my previous record is spent ~31 to ~41 minutes for Android 8 branch. My internet speed is average, not fast but not slow.

Ensure you do repo sync when try to do second branch, See here https://stackoverflow.com/questions/9099505/android-repo-command-and-switching-branches

Kind Regards.

kausha...@xperi.com

unread,
Jul 3, 2020, 12:38:51 PM7/3/20
to Android Building
Initial checkout can easily take several hours and your are probably talking about 50 GB of data. From the build instructions page:


Initial syncs can take an hour or more. See the downloading instructions for related details while you wait.

Each repo checkout is represented by a manifest file. You may have more than one repo checkout at a time so long as they exist in distinct directories. But note each checkout and build amounts to roughly 300GB and growing, so limit yourself to two or augment your system with a secondary drive.


Reply all
Reply to author
Forward
0 new messages