Building from Android Source Code -- Android Open Source Project
The repo init command doesn't like some forms of NAT. A command like:
$ repo init --depth 1 --no-clone-bundle -u https://android.googlesource.com/platform/manifest
may stick at the following with 100% cpu:
* [new tag] v1.9.5 -> v1.9.5 * [new tag] v1.9.6 -> v1.9.6 Get https://android.googlesource.com/platform/manifest
When performing a debug, this is the stage where it is stuck (no idea how to fix it, ended up bypassing NAT):
$ repo --trace init --depth 1 --no-clone-bundle -u https://android.googlesource.com/platform/manifest Geta https://gerrit.googlesource.com/git-repo remote: Counting objects: 142, done remote: Total 4158 (delta 2038), reused 4158 (delta 2038) Receiving objects: 100% (4158/4158), 4.69 MiB | 519.00 KiB/s, done. Resolving deltas: 100% (2038/2038), done. From https://gerrit.googlesource.com/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.8.2 -> v1.8.2 * [new tag] v1.9.0 -> v1.9.0 * [new tag] v1.9.1 -> v1.9.1 * [new tag] v1.9.2 -> v1.9.2 * [new tag] v1.9.3 -> v1.9.3 * [new tag] v1.9.4 -> v1.9.4 * [new tag] v1.9.5 -> v1.9.5 * [new tag] v1.9.6 -> v1.9.6 : git --version 1>| 2>| : parsing /home/rpb/.gitconfig Get https://android.googlesource.com/platform/manifest : export GIT_DIR=/home/rpb/aosp/.repo/manifests.git : git init 1>| 2>| : git config --file /home/rpb/aosp/.repo/manifests.git/config --null --list 1>| 2>| : git config --file /home/rpb/aosp/.repo/manifests.git/config --replace-all filter.lfs.smudge git-lfs smudge --skip -- %f 1>| 2>| : git config --file /home/rpb/aosp/.repo/manifests.git/config --unset-all core.bare 1>| 2>| : git config --file /home/rpb/aosp/.repo/manifests.git/config --replace-all remote.origin.url https://android.googlesource.com/platform/manifest 1>| 2>| : git config --file /home/rpb/aosp/.repo/manifests.git/config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/* 1>| 2>| : git fetch --progress origin --tags +refs/heads/*:refs/remotes/origin/* +refs/heads/master:refs/remotes/origin/master 1>| 2>| ^Caborted by user
A few different sync command styles from AOSP repo sync takes too long:
$ repo sync -f --force-sync --no-clone-bundle --no-tags -j$(nproc --all) $ repo sync -c --no-tags --no-clone-bundle -j2 $ repo sync -c --no-clone-bundle
where -j2 is number of parallel processes to use, the other parameters require some description.
Android for Enterprise
- Android for enterprise in Platform Developers
- Build for Enterprise - overview
- Enterprise - Device Administration
- Android Enterprise Recommended
- Android Enterprise devices and service providers
- DevicePolicyManager - in developers