How to build from source
This guide explains how to build iodΓ©OS for BraX3 from source using a Docker-based build environment. By the end, you will have locally built OTA and fastboot images that you can flash to your device.
Why Docker?¶
Using Docker ensures all required dependencies are pre-installed and properly configured.
You do not need to install complex toolchains or modify your host system.
Requirements¶
Software¶
-
Linux distribution
A recent 64 bit Linux distribution installed on the host system, for example Ubuntu 22.04 LTS or Debian. -
Docker
Install Docker using the official script:
-
Git Install Git
-
Repo tool Install the Google
repotool:
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
Hardware¶
-
Disk: Minimum 500 GB of free space for source code and build artifacts. An SSD is strongly recommended.
-
CPU: 64 bit processor (Intel i5/i7 or AMD Ryzen 5/7 and above recommended, 8 cores or more preferred)
-
RAM: 64GB recommended (16GB minimum)
Usage¶
- Clone this repository to your local machine and move into it:
- Initialize the Android manifest in the
IodeOs/buildcheckout directory: -
Configure HTTP credentials for Google repositories to avoid
quota reachederrors during sync:- In your browser, go to https://android-review.googlesource.com/.
- Sign in with your Google account.
- Open Settings from the top-right menu.
- In the HTTP Credentials section, click Obtain password and grant the requested permissions.
- Copy the command that is shown and run it in your terminal. This command creates or updates a Git authentication cookie file called
.gitcookiesin your home directory.
-
Sync the repo (this may take a while):
π‘ Tip: You can speed up and stabilize the sync process with additional options:
-c: Sync only the current manifest branch-j$(nproc --all): Use all available CPU cores for parallel sync--force-sync: Discard local changes and ensure a clean state--no-clone-bundle: Skip using potentially outdated pre-packaged bundles--no-tags: Avoid downloading all Git tags (saves time/space)-f: Continue syncing other projects even if one fails
- Start the build with Docker:
- Monitor the build logs:
- Locate the built images once you see the
build completed successfullymessage in the logs (this typically takes 90β240 minutes, depending on your hardware and the number of threads used). The images are in theout/target/product/brax3directory, for example:
Troubleshooting¶
Repo tool not found¶
If you see:
Make sure ~/bin is in your PATH:
Add it to your ~/.bashrc or ~/.zshrc to make the change permanent.
Repo sync is very slow or stalls¶
- Use more jobs with
-j<number>(e.g.repo sync -j16) if you have a fast CPU and good network. - If syncing fails, retry with:
repo sync fails with quota errors (RESOURCE_EXHAUSTED)¶
If you see an error like:
RESOURCE_EXHAUSTED: Resource has been exhausted (e.g. check quota)
type.googleapis.com/google.rpc.QuotaFailure
This usually means your .gitcookies file is missing.
Fix:
- Follow step 3 (HTTP Credentials) to generate
~/.gitcookies. - Then run
repo syncagain.
repo sync fails with HTTP/2 PROTOCOL_ERROR¶
If you see:
fatal: unable to access 'https://android.googlesource.com/platform/external/fastrpc/': HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
This is commonly caused by an invalid or outdated .gitcookies file.
Fix:
- Recreate
~/.gitcookiesby repeating step 3 (HTTP Credentials). - Then rerun
repo sync.
Repo sync did not complete fully¶
If the sync stops partway through, it is usually safe to rerun it.
Fix:
- Run
repo syncagain. Only missing projects and files will be downloaded.
Docker permission denied (docker daemon socket)¶
If you see:
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
Fix (recommended):
Then log out and back in (or restart your session) so the group change takes effect.
Workaround:
- Run the command with
sudo, for example:
Docker permission denied when viewing logs¶
If you see:
Fix (recommended):
Then log out and back in (or restart your session).
Workaround: