Skip to content

Instantly share code, notes, and snippets.

@brarcher
Last active February 7, 2018 04:45
Show Gist options
  • Save brarcher/a8cf0d1117681be51b765f22072602a2 to your computer and use it in GitHub Desktop.
Save brarcher/a8cf0d1117681be51b765f22072602a2 to your computer and use it in GitHub Desktop.
LineageOS builds crespo4g
Instructions for building LineageOS for crespo4g
# These instructions are for building on a Docker image, specifically
# https://hub.docker.com/r/gmacario/build-yocto/
# The image has 6GB of RAM. A persistant disk is added under /workdir
# that is 128GB.
export PATH=$PATH:/workdir/platform-tools:/workdir/bin
export USER=build
sudo apt-get update
sudo apt install -y vim bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk
# Java 6 or 7 is needed, as Java 8 has additional lint errors which fail the build.
sudo apt-get install -y software-properties-common python-software-properties
sudo add-apt-repository ppa:openjdk-r/ppa -y
sudo apt-get update
sudo apt-get install -y openjdk-7-jdk
export USE_CCACHE=1
export CCACHE_DIR=/workdir/ccache
export CCACHE_COMPRESS=1
ccache -M 10G
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
mkdir cm-11.0
cd cm-11.0
repo init --depth=1 -u https://github.com/LineageOS/android.git -b cm-11.0
repo sync -c
source build/envsetup.sh
breakfast crespo4g
# or: cm_crespo4g-eng
# This will fail, as vendor blogs are not there
# Edit .repo/local_manifests/roomservice.xml with the following:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_samsung_crespo4g" path="device/samsung/crespo4g" remote="github" />
<project name="LineageOS/android_kernel_samsung_crespo" path="kernel/samsung/crespo" remote="github" />
<project name="LineageOS/android_device_samsung_crespo" path="device/samsung/crespo" remote="github" />
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-11.0" />
</manifest>
cd vendor/cm
# This may fail, may need to update the path to the Term.apk file
./get-prebuilts
cd ../../
repo sync -c
breakfast crespo4g
# or: cm_crespo4g-eng
# The output will likely be somewhere around here:
# /workdir/cm-11.0/out/target/product/crespo4g/lineage-11-20180206-UNOFFICIAL-crespo4g.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment