Created
November 4, 2019 04:30
-
-
Save gardner/5c979da9bf80b2ef8c8b01070116f9f0 to your computer and use it in GitHub Desktop.
build lineageos
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 | |
apt-get update && apt-get install aria2 wget 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 | |
mkdir -p ~/bin ~/android/system | |
aria2c -x8 -o bin/repo https://storage.googleapis.com/git-repo-downloads/repo && chmod a+x ~/bin/repo | |
aria2c -x8 https://dl.google.com/android/repository/platform-tools-latest-linux.zip && unzip platform-tools*.zip -d ~ | |
if ! grep platform-tools ~/.profile; then | |
cat << EOF >> ~/.profile | |
# add Android SDK platform tools to path | |
if [ -d "$HOME/platform-tools" ] ; then | |
PATH="$HOME/platform-tools:$PATH" | |
fi | |
EOF | |
fi | |
if ! grep 'PATH="$HOME/bin:$PATH"' ~/.profile; then | |
cat << EOF >> ~/.profile | |
# set PATH so it includes user's private bin if it exists | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
EOF | |
fi | |
source ~/.profile | |
cd ~/android/system | |
repo init -u https://github.com/LineageOS/android.git -b lineage-16.0 | |
repo sync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment