Last active
April 5, 2017 07:25
-
-
Save ddm/25d561cc6cf4570ac67062859d9f440e to your computer and use it in GitHub Desktop.
CM13 bacon
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
#!/usr/bin/env bash | |
sudo apt-get update && sudo apt-get install -y bc bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-dev lib32z1-dev android-sdk | |
if `hash adb &>/dev/null`; then | |
echo "Android tools found..." | |
else | |
echo "Installing android tools..." | |
echo "y" | android update sdk -u -a --filter tools | |
echo "y" | android update sdk -u -a --filter platform-tools | |
echo "y" | android update sdk -u -a --filter extra-android-support | |
echo "y" | android update sdk -u -a --filter extra-android-m2repository | |
echo "y" | android update sdk -u -a --filter extra-google-google_play_services | |
echo "y" | android update sdk -u -a --filter extra-google-m2repository | |
echo "y" | android update sdk -u -a --filter extra-google-analytics_sdk_v2 | |
echo "y" | android update sdk -u -a --filter android-25 | |
echo "y" | android update sdk -u -a --filter build-tools-25.0.2 | |
echo "y" | android update sdk -u -a --filter android-24 | |
echo "y" | android update sdk -u -a --filter build-tools-24.0.3 | |
echo "y" | android update sdk -u -a --filter android-23 | |
echo "y" | android update sdk -u -a --filter build-tools-23.0.3 | |
echo "y" | android update sdk -u -a --filter android-22 | |
echo "y" | android update sdk -u -a --filter build-tools-22.0.1 | |
echo "y" | android update sdk -u -a --filter android-21 | |
echo "y" | android update sdk -u -a --filter build-tools-21.1.2 | |
echo "y" | android update sdk -u -a --filter android-20 | |
echo "y" | android update sdk -u -a --filter build-tools-20.0.0 | |
echo "y" | android update sdk -u -a --filter android-19 | |
echo "y" | android update sdk -u -a --filter build-tools-19.1.0 | |
fi | |
if [ ! -f $HOME/bin/repo ]; then | |
mkdir -p $HOME/bin | |
curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo | |
chmod a+x $HOME/bin/repo | |
fi | |
export ARCH="arm" | |
export CM_VENDOR="oneplus" | |
export CM_DEVICE="bacon" | |
export CM_BRANCH="stable/cm-13.0-ZNH5Y" | |
export INIT_BOOTCHART=true | |
mkdir -p $HOME/android/system | |
cd $HOME/android | |
git clone https://github.com/TheMuppets/proprietary_vendor_$CM_VENDOR.git | |
cd $HOME/android/system/ | |
repo init -u https://github.com/CyanogenMod/android.git -b $CM_BRANCH | |
repo sync | |
source build/envsetup.sh | |
breakfast $CM_DEVICE | |
rm -rf $HOME/android/system/vendor/$CM_VENDOR/$CM_DEVICE | |
ln -s $HOME/android/proprietary_vendor_$CM_VENDOR/$CM_DEVICE $HOME/android/system/vendor/$CM_VENDOR/$CM_DEVICE | |
croot | |
make -j8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment