Last active
January 13, 2024 09:41
-
-
Save paigeadelethompson/beb01a7e07668a7fa9e1ded1d4b1f430 to your computer and use it in GitHub Desktop.
LineageOS Build Steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set PATH so it includes user's private bin if it exists | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
export USE_CCACHE=1 | |
export CCACHE_EXEC=/usr/bin/ccache | |
ccache -M 50G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ~/bin | |
mkdir -p ~/android/lineage | |
apt -y install bc \ | |
ccache \ | |
bison \ | |
build-essential \ | |
curl \ | |
flex \ | |
g++-multilib \ | |
gcc-multilib \ | |
git \ | |
gnupg \ | |
gperf \ | |
lib32ncurses5-dev \ | |
lib32readline-dev \ | |
lib32z1-dev \ | |
zip \ | |
unzip \ | |
libsdl1.2-dev \ | |
libssl-dev \ | |
libxml2 \ | |
libxml2-utils \ | |
lzop \ | |
pngcrush \ | |
rsync \ | |
schedtool \ | |
squashfs-tools \ | |
xsltproc \ | |
zlib1g-dev \ | |
libncurses5 \ | |
libncurses5-dev \ | |
lib32z1-dev \ | |
libelf-dev \ | |
liblz4-tool \ | |
python3 \ | |
python-is-python3 \ | |
android-sdk-platform-tools \ | |
adb \ | |
fastboot \ | |
repo \ | |
default-jre \ | |
sdkmanager \ | |
android-sdk-libsparse-utils \ | |
simg2img \ | |
imagemagick \ | |
git-lfs \ | |
tree | |
git lfs install | |
cd ~/android/lineage | |
repo init -u https://github.com/LineageOS/android.git -b lineage-20.0 --git-lfs | |
repo sync -j10 | |
cd ~ && mkdir android-kernel && cd android-kernel | |
repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline | |
repo sync -j10 | |
echo "******* Android Kernel" | |
echo "Links:" | |
echo "https://android.googlesource.com/kernel/build/+/refs/heads/main/kleaf/" | |
echo "https://source.android.com/docs/setup/build/building-kernels#running-on-cuttlefish" | |
echo "Note: Common kernels are generic, customizable kernels and therefore don't define" | |
echo "a default configuration." | |
echo "To build the GKI kernel for the aarch64 architecture, check out an Android Common" | |
echo "Kernel branch no earlier than Android 13 and then run the following command:" | |
echo "tools/bazel build //common:kernel_aarch64_allmodconfig" | |
echo "To create a distribution:" | |
echo "tools/bazel run //common:kernel_aarch64_allmodconfig -- --dist_dir=\$DIST_DIR" | |
echo "Thereafter the kernel binary, modules, and corresponding images are located in" | |
echo "the $DIST_DIR directory. If --dist_dir is unspecified, see output of the command" | |
echo "for the location of the artifacts." | |
echo "Build vendor modules:" | |
echo "tools/bazel build //common-modules/virtual-device:virtual_device_x86_64_dist" | |
echo "*******" | |
echo "" | |
echo "******* LineageOS" | |
echo "Links:" | |
echo "https://wiki.debian.org/AndroidTools" | |
echo "https://wiki.lineageos.org/emulator" | |
echo "IMPORTANT: Some devices require a vendor directory to be populated before breakfast will succeed." | |
echo "Build commands:" | |
echo "source build/envsetup.sh" | |
echo "lunch" | |
echo "mka -j10" | |
echo "*******" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment