Troubleshoot and fix sync issues  |  Android Open Source Project Skip to main content Docs What's new? Release notes Latest security bulletins Latest Compatibility Definition Document (CDD) Site updates Getting Started About Start Download Builds Test Create Contribute Community Tools, build, and related reference Security Overview Bulletins Features Testing Best Practices Core Topics Architecture Audio Camera Connectivity Data Display Fonts Graphics Interaction Media Performance Permissions Power Runtime Settings Storage Tests Updates Virtualization Compatibility Compatibility Definition Document (CDD) Compatibility Test Suite (CTS) Android Devices Cuttlefish Enterprise TV Automotive Overview Software Defined Vehicle In-vehicle Infotainment Release Details Reference HIDL HAL Trade Federation Security Test Suite Android Code Search / English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어 Sign in Documentation What's New? Getting Started Security Core Topics Compatibility Android Devices Automotive Reference Docs More What's New? Getting Started Security Core Topics Compatibility Android Devices Automotive Reference Android Code Search Overview About AOSP overview FAQ Start Try Android development Understand terminology Set up for AOSP development (9.0 or later) Set up for AOSP development (2.3 - 8.0) Download Download the Android source Troubleshoot and fix sync issues Source control tools Build Build overview Build Android Use feature launch flags Feature launch flag overview Determine flag usage and type Declare an aconfig flag Wrap code change in feature launch flag Set feature launch flag values Change a flag's value at runtime Declare and use a build flag Test code within feature launch flags Build kernels Build Pixel kernels Convert from Make to Soong Implement Java SDK library Android Rust Introduction Android Rust modules Binary modules Library modules Test modules Fuzz modules Source generators Source generators overview Bindgen bindings modules Protobuf modules Hello Rust example Android Rust patterns Rust IDE setup Compile with Jack (6.0 - 8.1) Create Source control workflow Custom device development Add a new device type Build for 32-bit and 64-bit architectures Use reference boards Create a software bill of materials (SBOM) Configure and handle update ownership for apps Test Test a build Flash with Fastboot Flash with Android Flash Tool Test with the cuttlefish emulator Use Android Emulator virtual devices Contribute Overview Android Code Search Contributor license agreements and headers Release lifecycle Submit code changes Contribute to upstream projects Git source editor Review a change Download build artifacts Report and track bugs Code with respect AOSP Java code style for contributors API guidelines Overview Android async and nonblocking API guidelines Android API client-side caching guidelines Community Code of conduct Discussion groups, contacts, and additional resources Tools, build, and related reference Overview Android.bp file format Kernel branches and their build systems Codenames, tags, and build numbers Fastboot key combinations Repo command reference What's new? Release notes Latest security bulletins Latest Compatibility Definition Document (CDD) Site updates Getting Started About Start Download Builds Test Create Contribute Community Tools, build, and related reference Security Overview Bulletins Features Testing Best Practices Core Topics Architecture Audio Camera Connectivity Data Display Fonts Graphics Interaction Media Performance Permissions Power Runtime Settings Storage Tests Updates Virtualization Compatibility Compatibility Definition Document (CDD) Compatibility Test Suite (CTS) Android Devices Cuttlefish Enterprise TV Automotive Overview Software Defined Vehicle In-vehicle Infotainment Release Details Reference HIDL HAL Trade Federation Security Test Suite Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, use android-latest-release. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP. AOSP Docs Getting Started Troubleshoot and fix sync issues Stay organized with collections Save and categorize content based on your preferences. This page explains how to troubleshoot and fix issues related to the repo sync command. Fix network issues This section provides several suggestions for fixing network issues that can cause unsuccessful syncs. Tip: Resyncing after an error can often fix a sync issue. Use authentication to avoid quota barriers To protect the servers against excessive use, each IP address that's used to access source is associated with a quota. When sharing an IP address with other users, such as when accessing the source repositories from beyond a NAT firewall, quotas can trigger for normal patterns. For example, a quota can trigger when several users sync new clients from the same IP address, within a short period. To avoid triggering quotas, you can use authenticated access, which uses a separate quota for each user, regardless of the IP address. To enable authenticated access: Create a password with the password generator. Run the following command to convert your client to use automatic authentication (without changing branch): $ repo init -u https://android.googlesource.com/a/platform/manifest Note that the /a/ directory prefix triggers automatic authentication. Configure for proxy use If you're downloading source from behind a proxy, as is common in some corporate environments, make sure that you explicitly specify a proxy for Repo to use by running these commands: $ export HTTP_PROXY=http://proxy_user_id:proxy_password@proxy_server:proxy_port $ export HTTPS_PROXY=http://proxy_user_id:proxy_password@proxy_server:proxy_port Adjust TCP/IP settings to avoid connectivity issues While it's rare, Linux clients can experience connectivity issues, such as getting stuck in the middle of downloads while receiving objects. To improve this issue, adjust the settings of the TCP/IP stack or use nonparallel connections. You must have root access to modify the TCP setting. To modify the setting, issue the following commands: $ sudo sysctl -w net.ipv4.tcp_window_scaling=0 $ repo sync -j1 Use a local mirror to avoid network latency When using several clients, you can create a local mirror of the entire server content and sync clients from that mirror without accessing the network. Follow these instructions to create a local mirror in at ~/aosp-mirror/ and sync clients against that mirror: Create and sync the mirror: $ mkdir -p /usr/local/aosp/mirror $ cd /usr/local/aosp/mirror $ repo init -u https://android.googlesource.com/mirror/manifest --mirror These commands create a local mirror in /user/local/aosp/mirror and initialize the mirror using the --mirror flag with the repo init command. Sync the clients from the mirror: $ mkdir -p /usr/local/aosp/main $ cd /usr/local/aosp/main $ repo init -u /usr/local/aosp/mirror/platform/manifest.git -b android-latest-release $ repo sync Sync the mirror against the server and sync the clients against the mirror: $ cd /usr/local/aosp/mirror $ repo sync $ cd /usr/local/aosp/android-latest-release $ repo sync It's possible to store the mirror on a LAN server and to access it over NFS, SSH, or Git. It's also possible to store it on a removable drive and to pass that drive among users or machines. Use a partial clone If you're using Git version 2.19 or later, specify --partial-clone when performing repo init to overcome any low-latency network issues: $ repo init -u https://android.googlesource.com/platform/manifest -b android-latest-release --partial-clone --clone-filter=blob:limit=10M Instead of initializing Repo to download everything, this command downloads Git objects as they are needed. Troubleshoot 403 or 500 errors (proxy issues) The repo init or repo sync commands might fail with either a 403 or 500 error. Most often these errors are related to HTTP proxies struggling to handle the large data transfers. While there isn't a specific fix to these errors, using the most recent Python version and explicitly using repo sync -j1 can sometimes help. Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Last updated 2026-06-17 UTC. [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-17 UTC."],[],[]] Build Android repository Requirements Downloading Preview binaries Factory images Driver binaries Connect @Android on X @AndroidDev on X Android Blog Google Security Blog Platform on Google Groups Building on Google Groups Porting on Google Groups Get help Android Help Center Pixel Help Center www.android.com Google Mobile Services Stack Overflow Issue Tracker About Android Community Legal License Privacy Site feedback Manage cookies English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어