-
-
Save Thespartann/6f59d28e168a55ba3e6c980c014f35b7 to your computer and use it in GitHub Desktop.
WIP not execute manually!
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
# Script for building Roms with a few tweaks | |
sudo apt update | |
sudo apt upgrade -y | |
# Install tools required for building | |
sudo apt-get install openjdk-8-jdk -y | |
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip -y | |
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-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 -y | |
sudo apt install ninja-build python -y | |
# Android repo tool | |
mkdir -p ~/bin | |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | |
chmod a+x ~/bin/repo | |
export PATH=~/bin:$PATH | |
# Config git | |
git config --global user.email "[email protected]" | |
git config --global user.name "Bob the Builder" | |
# Create Rom folder | |
mkdir rom | |
cd rom | |
# Download Rom source | |
repo init -u git://github.com/rom/manifest.git -b x.x | |
repo sync --force-sync --no-tags --no-clone-bundle | |
# Download the device files | |
git clone https://github.com/organization/manifest.git -b x.x .repo/local_manifests | |
repo sync --force-sync --no-tags --no-clone-bundle | |
# Add Wireguard | |
git clone https://git.zx2c4.com/android_kernel_wireguard -b master kernel/wireguard | |
# Add KernelSU | |
cd kernel/brand/chip | |
curl -LsS "https://git.zx2c4.com/kernel-assisted-superuser/plain/fetch-and-patch.sh" | bash - | |
# Add `CONFIG_ASSISTED_SUPERUSER=y` to kernel config | |
# Add MicroG support | |
cd frameworks/base | |
git remote add microg https://github.com/Thespartann/android_frameworks_base_microg && git fetch microg | |
# Nougat | |
#git cherry-pick 067a593747eb28290a7a790868377613552fd988^..02532e93e3189a00db1f8b9f499071c14ed6695d | |
#Oreo | |
#git cherry-pick 6f6a023343ea014d4a97d09470f1c1502d6a1271^..8bb7b025fc4413ee97a97167fcbb4ec205adcfdc | |
#Pie | |
#git cherry-pick 7a99450a7cf44d65a937d9961982b015d0bc4f95^..4bbf5672df9fbd1c67a1667d8ffa1462f54facd4 | |
# Initialize build environment | |
#export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx7G" | |
#export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx6g" | |
#export LC_ALL=C | |
. build/envsetup.sh | |
# Start building | |
# Method 1 | |
lunch rom_codename-userdebug | |
mka romname/bacon/kronic | |
# Method 2 | |
brunch rom_codename-userdebug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment