Skip to main content

Building from Source

This guide covers how to build Cromite from the Chromium source code. You can use either a pre-built Docker image for a streamlined experience or manually set up your build environment.

Prerequisites

Before building Cromite, familiarize yourself with the official Chromium build documentation to understand the basic Chromium build process.

Build Configuration Files

Cromite uses several key files to configure the build:

RELEASE

Contains the Chromium version tag (currently 145.0.7632.120)Location: build/RELEASE

cromite.gn_args

GN build arguments that configure Cromite’s featuresLocation: build/cromite.gn_args

cromite_patches_list.txt

Lists all 332 patches applied to ChromiumLocation: build/cromite_patches_list.txt

build_cromite.yaml

GitHub Actions workflow for automated buildsLocation: .github/workflows/build_cromite.yaml
The easiest way to build Cromite is using the pre-built Docker images. Each release includes a corresponding Docker image.
1

Set Build Variables

Define your build environment variables:
SHA=fac696b3a422f196f698e6543913946ddaba1ef3
VERSION=145.0.7632.120
CHVERSION=uazo/cromite-build:$VERSION-$SHA
CONTAINER=dev1
BDEBUG=false
The Docker image format is: uazo/cromite-build:(VERSION)-(COMMIT)All available images are listed at Docker Hub
2

Create and Start Container

Create a Docker container with the build environment:
docker create --name $CONTAINER \
    -e "WORKSPACE=/home/lg/working_dir" \
    -e "TARGET_ISDEBUG=$BDEBUG" \
    --entrypoint "tail" $CHVERSION "-f" "/dev/null"

docker start $CONTAINER
docker exec -ti $CONTAINER bash
3

Configure Build Environment

Inside the container, set up the PATH and navigate to the source directory:
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
export HOME=/home/lg/working_dir
cd $HOME/chromium/src/
4

Build Cromite

The container is now ready to build. Run your build commands based on the target platform (see platform-specific sections below).

Key GN Build Arguments

Cromite uses custom GN arguments to configure the build. Here are the key settings from cromite.gn_args:
is_official_build=true
is_debug=false
is_component_build=false
symbol_level=1
treat_warnings_as_errors=true
use_official_google_api_keys=false
disable_fieldtrial_testing_config=true
enable_reporting=false
enable_bound_session_credentials=false
enable_request_header_integrity=false
safe_browsing_use_unrar=false
proprietary_codecs=true
ffmpeg_branding="Chrome"
enable_av1_decoder=true
enable_dav1d_decoder=true
enable_platform_aac_audio=true
enable_platform_h264_video=true
enable_platform_hevc=true
media_use_openh264=false
enable_mdns=false
enable_remoting=false
enable_vr=false
enable_arcore=false
enable_openxr=false
enable_glic=false  # Disable Gemini integration
build_contextual_search=false

Platform-Specific Builds

Building for Android

Android builds support multiple architectures: arm64-v8a, arm32-v7a, and x86_64.

Android-Specific GN Args

target_os = "android"
android_channel = "stable"
chrome_public_manifest_package = "org.cromite.cromite"
system_webview_package_name = "org.cromite.webview"

# PGO optimization
chrome_pgo_phase = 2

# High-end device optimization
is_high_end_android = true

# Hardware codec support
enable_platform_aac_audio = true
enable_platform_h264_video = true
enable_platform_hevc = true
The Docker commands shown above are valid for Android and Linux builds.

Build Outputs

Successful Android builds produce:
  • arm64_ChromePublic.apk
  • arm_ChromePublic.apk
  • x64_ChromePublic.apk
  • SystemWebView.apk (separate build)

Applying Patches

Cromite applies 332 patches to Chromium. These patches must be applied in the order specified in cromite_patches_list.txt.
# Apply patches using git am
cd chromium/src/
while read patch; do
  git am < "../../cromite/build/patches/$patch"
done < ../../cromite/build/cromite_patches_list.txt
See the Patch System documentation for detailed information about Cromite’s patches.

Debug Builds

To create a debug build, set the debug environment variable:
BDEBUG=true
TARGET_ISDEBUG=true
Debug builds use different GN arguments:
is_debug = true
is_official_build = false
dcheck_always_on = true
symbol_level = 1
strip_debug_info = false
generate_linker_map = false
android_static_analysis = "off"
v8_enable_debugging_features = false

Build Automation

Cromite uses GitHub Actions for automated builds. The workflow file at .github/workflows/build_cromite.yaml shows the complete build process:
  • Builds Docker containers for dependencies (uazo/build-deps)
  • Pulls Chromium source (uazo/chromium)
  • Applies Cromite patches (uazo/cromite)
  • Creates final build image (uazo/cromite-build)
  • Compiles for all platforms (Android arm/arm64/x64, Windows, Linux)
You can reference the GitHub Actions workflow to see the exact build commands used for releases.

Troubleshooting

Ensure you’re using the correct LLVM/Clang version bundled with Chromium:
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$PATH
Chromium builds require significant RAM (16GB+ recommended). Consider:
  • Reducing parallel jobs: ninja -j 4
  • Using swap space
  • Building with is_component_build=true for development
Make sure you’ve run the Windows SDK preparation script:
./tools/images/win-sdk/prepare.sh

Next Steps

Patch System

Learn about Cromite’s 332 patches to Chromium

Docker Setup

Deep dive into Docker development environment

Contributing

Contribute patches and features to Cromite

GitHub Workflow

View the complete build automation workflow

Build docs developers (and LLMs) love