This repository contains scripts to build and edit Bromite from source. Since I couldn't get a normal build to work, the build happens inside a Docker container.
Currently only a build for arm64
is compiled. To build for other architectures one has to adjust the target_cpu
flag passed to gn
in the build config.
This repository also contains my own patches for Bromite, of which there currently aren't many.
There's also a dev container configuration for VSCode, which makes it very easy to set up the dev environment.
First you should make sure you have a machine that is powerful enough to run this build. I recommend having at least 16GB of RAM and a powerful processor.
Then make sure you have make
installed. On Ubuntu, you can install it with sudo apt install make
.
Then you can take a look at the Makefile
to see what targets are available. The most commonly used targets while developing are current
(also available via the bake
command in the container) and patch
.
bromite
: downloads Chromium and Bromite code, applies the patches and builds Bromite (thechrome_public_apk
target). Note that the default bromite distribution does not contain branding, so it looks like normal Chromiumchromium
: downloads Chromium code and Bromite code and builds Chromium patched with some patches from Bromite (same as the official Bromite Chromium release)current
: Does not update the Chromium and Bromite code, but rather just builds what is there. This assumes you want to build Potassium, my own browser variant (it uses theout/Potassium
directory)patch-bromite
,patch-chromium
: Downloads & patches the code, but doesn't run the buildpatch
: Extracts commits you made to the current branch to patch files in thepatches
directory (the branch must start withxarantolus-
and must not end with-base
; these branches are created by the build script to know where your changes started)repatch
: Resets the checkout to the Bromite base version and then re-applies the Potassium patches. Useful for testing if the generated patches still apply cleanlycontainer
: Builds the Docker container. Do this if you don't want to use the pre-built container from the GitHub registry or there were changes to the Dockerfile. This container is the base container for the VSCode dev containergc
: Runsgit gc
on the Chromium repository within Dockerinstall
: Assumes you're on Windows and usesadb
to install a built Bromite APKupgrade
: Updates the chromium checkout to the latest tag specified by Bromite, applies all Bromite patches to the code and applies all patches from this repo to the code. The last step will probably fail, so you'll have to fix the patches manually. See my notes on this to see how to continue in case of failureshell
: Allows you to run commands inside the Docker containerapks
: Copies built APKs from the chromium output directory to anapks
directory, this is useful for keeping all app versions you have built