An overview of the

TUNA AOSP starter package (AOSP -lastest. Tar) to synchronize the latest AOSP source code.

steps

Repo

curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
sudo mv repo /usr/local/bin/
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
Copy the code

Download, verify, decompress

Tar: md5sum aosp-latest.tar calculates and compares the checksum. If no error is found, run tar xf aosp-latest.tar to decompress the file

Set branches (optional)

Repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest - b android - 12.0.0 _r2Copy the code

If this parameter is not set, the main branch source is downloaded by default

Synchronization source

repo sync -j4
Copy the code

After that, you can simply run Repo Sync each time to keep in sync. We strongly recommend that you keep your day at the same time and try to choose low peak times such as early morning

Use Local Manifests to clone equipment code

Open. Repo/manifests the default XML, add the following content (already do not need to add) :

<remote  name="github"
           fetch="https://github.com/" />
Copy the code

Create.repo/ local_MANIFESTS /hammerhead.xml (with revision specified version) :

<? The XML version = "1.0" encoding = "utf-8"? > <manifest> <project name="z3DD3r/android_device_lge_hammerhead" revision="lineage-18.1" path="device/lge/hammerhead" Remote ="github" /> <project name="z3DD3r/android_kernel_lge_hammerhead" revision="lineage 18.1" Path ="kernel/lge/hammerhead" remote="github" /> <project name="z3DD3r/android_vendor_lge" revision="lineage 18.1" path="vendor/lge" remote="github" /> </manifest>Copy the code

Repo sync-c-j4 –force-sync

Problems encountered

error: RPC failed; curl 56 GnuTLS recv error (-9)

apt-get install gnutls-bin
git config --global http.sslVerify false
git config --global http.postBuffer 1048576000
Copy the code

Disable SSL verification and set the buffer size

curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.

Gnutls_handshake error, suggest canceling the proxy and then synchronizing the code

You can also use OpenSSL instead of gnutls to recompile git (not tested). See Error RPC Failed. curl 56 GnuTLS recv error (-110) The TLS connection was non-properly terminated

Sudo apt install installs dependencies if the dependency is not installed at compile time

fatal: Could not reset index file to revision

warning: repo is not tracking a remote branch, so it will not receive updates
repo reset: error: Entry 'git_superproject.py' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'vx.x.x^0'
Copy the code

Solution:

Repo /repo git reset –hard Penultimate commit Git pull repo sync

reference

Android 8.1.0 AOSP source code download and compile

Git Clone: error: RPC failed; curl 56 GnuTLS recv error (-9)’