Docker container for building CopperheadOS. Still very much a work in progress
Enable or disable using ccache. Can significantly speed up later builds for both
the CopperheadOS and chromium build processes. All cache files are saved to CCACHE_DIR.
Defaults to the value of 1.
If USE_CCACHE is true this variable determines the size of the ccache.
This value should be a number followed by an optional suffix: "k", "M", "G", "T".
The default suffix is G. Use 0 for no limit. Defaults to the value of "50G".
If set, privileged apps will be allowed to spoof their signature. This is needed for packages like Microg or FakeStore to spoof being Google Play Services or the Google Play Store. Please note that there is a security risk to setting this to "yes". Defaults to "no".
If set, the PICO package will be included in the system image.
Defaults to "no".
The codename of the device the build will be for. Currently supported is all the Google Pixel devices (sailfish, marlin, walleye, taimen). Defaults to "walleye".
The release version of CopperheadOS. Defaults to "OPM2.171019.029.B1.2018.05.15.17".
The Build ID of the build. Defaults to "OPM2.171019.029.B1".
The Chromium release name that is going to be built and included in the CopperheadOS build. Defaults to "66.0.3359.158".
The Chromium release code that is going to be built and included in the CopperheadOS build. Defaults to "335915852".
The number of threads/processes that will be used during the various stages of the build. Defaults to 8.
Location of where all the repositories will be downloaded and built.
Location of where the chromium repositories will be downloaded and built. The chromium prebuilt package is no longer provided and we will now have to build it from source.
Location of where the ccache files are saved for both the CopperheadOS build and the chromium build.
Location of where the release keys are located. If the directory is empty the
script will generate keys for you based on the DEVICE provided to the container.
Location of the temporary directory.
Location of any custom manifests that will be included when syncing repos.
Location of where the stdout and stderr logs will be saved to.
Location of where the output *.zips and *.xz files will be copied to after the
build process is complete. Will include the target files and packages derived from
the target files (OTA, Flash Archive).
If you want just plain CoppperheadOS just provide the enviroment variables.
$ sudo docker run \
-v /media/hdd/copperheados/src:/srv/src \
-v /media/hdd/copperheados/chromium:/srv/chromium \
-v /media/hdd/copperheados/ccache:/srv/ccache \
-v /media/hdd/copperheados/keys:/srv/keys \
-v /media/hdd/copperheados/tmp:/srv/tmp \
-v /media/hdd/copperheados/logs:/srv/logs \
-v /media/hdd/copperheados/zips:/srv/zips \
-e USE_CCACHE=1 \
-e CCACHE_SIZE="70G" \
-e SIGNATURE_SPOOFING="no" \
-e DEVICE="walleye" \
-e BUILD_TAG="OPM2.171019.029.B1.2018.05.15.17" \
-e BUILD_ID="OPM2.171019.029.B1" \
-e NUM_OF_THREADS=8 \
bflux/copperheados-docker
Microg is a FOSS implementation of most of the Google
Play Services Libraries. Most importantly it supports GCM and Account
Authentication. Inorder to support microg SIGNATURE_SPOOFING patch must be
applied. In addation CUSTOM_PACKAGES should include GmsCore, GsfProxy and
FakeStore. FakeStore is needed since most apps that rely on Google Play
Services will get upset if they don't see an app with the com.android.vending
package id installed on the system.
$ sudo docker run \
-v /media/hdd/copperheados/src:/srv/src \
-v /media/hdd/copperheados/chromium:/srv/chromium \
-v /media/hdd/copperheados/ccache:/srv/ccache \
-v /media/hdd/copperheados/keys:/srv/keys \
-v /media/hdd/copperheados/tmp:/srv/tmp \
-v /media/hdd/CopperheadOS-Docker/local_manifest/prebuilt:/srv/local_manifests \
-v /media/hdd/copperheados/logs:/srv/logs \
-v /media/hdd/copperheados/zips:/srv/zips \
-e USE_CCACHE=1 \
-e CCACHE_SIZE="70G" \
-e SIGNATURE_SPOOFING="yes" \
-e DEVICE="walleye" \
-e BUILD_TAG="OPM2.171019.029.B1.2018.05.15.17" \
-e BUILD_ID="OPM2.171019.029.B1" \
-e NUM_OF_THREADS=8 \
-e CUSTOM_PACKAGES="GmsCore GsfProxy MozillaNlpBackend NominatimNlpBackend com.google.android.maps FakeStore" \
bflux/copperheados-docker
If you are a complete newb like I am and aren't ready to give up the Google Play
Store and Google Play Services, then simply mount the local_manifest/opengapps folder
as the /srv/local_manifests volume and set the OPEN_GAPPS variable to yes.
$ sudo docker run \
-v /media/hdd/copperheados/src:/srv/src \
-v /media/hdd/copperheados/chromium:/srv/chromium \
-v /media/hdd/copperheados/ccache:/srv/ccache \
-v /media/hdd/copperheados/keys:/srv/keys \
-v /media/hdd/copperheados/tmp:/srv/tmp \
-v /media/hdd/CopperheadOS-Docker/local_manifest/opengapps:/srv/local_manifests \
-v /media/hdd/copperheados/logs:/srv/logs \
-v /media/hdd/copperheados/zips:/srv/zips \
-e USE_CCACHE=1 \
-e CCACHE_SIZE="70G" \
-e SIGNATURE_SPOOFING="no" \
-e OPEN_GAPPS="yes" \
-e DEVICE="walleye" \
-e BUILD_TAG="OPM2.171019.029.B1.2018.05.15.17" \
-e BUILD_ID="OPM2.171019.029.B1" \
-e NUM_OF_THREADS=8 \
bflux/copperheados-docker