# Clone AOSP repository

Official documentation [here](https://source.android.com/docs/setup/download/downloading)

AOSP source is a tree/jungle of multiple git repos, more than 1400 repos to be precise. It will consume around 200GB of Disk Space.

### Here are the Steps to clone the repo

1. Download repo tool, [read more](https://gerrit.googlesource.com/git-repo/+/HEAD/README.md)

   ```
     sudo apt-get update
     sudo apt-get install repo
   ```
2. Setup .gitconfig
3. ```
   repo init -u https://android.googlesource.com/platform/manifest -b main
   ```
4. ```
   repo sync -j64
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.tejpratapsingh.com/_/android-tips/aosp/clone-aosp-repository.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
