Andreas Christoforou         home     posts

Building Chromium for Android

How to build chromium for Android.

Download Tools

sudo apt install python git
git clone
export PATH="$PATH:/path/to/depot_tools"

Get Chromium Project

mkdir chromium
cd chromium
fetch --nohooks android
echo "target_os = [ 'android' ]" >> ./gclient
gclient sync -D --with_branch_heads -r 83.0.4103.101 --jobs 32

Install dependencies

cd src/
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
gclient runhooks
build/linux/sysroot_scripts/ --arch=i386
build/linux/sysroot_scripts/ --arch=amd64

Setting up the build

tmpfs for the build output to reduce the amount of disk writes required.

mount -t tmpfs -o size=20G,nr_inodes=40k,mode=1777 tmpfs /path/to/out


mkdir -p out/Default

cat <<EOF > out/Default/
target_os = "android"
target_cpu = "arm64"
android_channel = "stable"
android_default_version_name = "83.0.4103.101"
android_default_version_code = "410310100"
is_component_build = false
is_debug = false
is_official_build = true
symbol_level = 1
fieldtrial_testing_like_official_build = true
ffmpeg_branding = "Chrome"
proprietary_codecs = true
is_cfi = true
enable_gvr_services = false
enable_remoting = false
enable_reporting = false

If you want to build the chromium for debugging or to fuzz with libfuzzer change or add the following


GN build configuration

gn gen out/Default


The following command is used to build Trichrome for Android Q.

ninja -C out/Default/ trichrome_webview_64_32_apk trichrome_chrome_64_32_bundle trichrome_library_64_32_apk

The following command is used to build Monochrome, which provides both Chromium and the WebView for Android N - P

autoninja -C out/Default monochrome_public_apk

The apk that we have compiled is supported on Devices with minSdkVersion=24 (Nougat), if you have older device use one of the following command.

for devices with minSdkVersion=19 (KitKat) and above use

autoninja -C out/Default chrome_public_apk

or for devices with minSdkVersion=21 (Lollipop) and above use

autoninja -C out/Default chrome_modern_public_apk

Install to Device

adb install out/Default/apks/MonochromePublic.apk

Running a test

out/Default/bin/monochrome_public_apk launch

Logging and debugging

You can see the logs with adb logcat when you will install the chrome apk or with

out/Default/bin/monochrome_public_apk logcat [-v]

Debugging Java and c/c++ code

C/C++ Debugger

out/Default/bin/monochrome_public_apk gdb

Java Debugger

out/Default/bin/monochrome_public_apk run --wait-for-java-debugger

Symbolizing Crash Stacks and Tombstones (C++)

build/android/ --output-directory out/Default
adb logcat -d | third_party/android_platform/development/scripts/stack --output-directory out/Default