Created
January 18, 2020 07:08
-
-
Save shakalaca/d664d6e5468312f112456a62f4b2b246 to your computer and use it in GitHub Desktop.
Vagrant setup for building Magisk
This file contains hidden or 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
git clone -b master --recursive https://github.com/topjohnwu/Magisk.git /vagrant/Magisk | |
cat > /vagrant/Magisk/config.prop << EOF | |
version=20.4-custom | |
versionCode=20400 | |
appVersion=7.5-custom | |
appVersionCode=750 | |
outdir=out | |
prettyName=false | |
keyStore=release-key.jks | |
EOF |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "2048" | |
end | |
config.vm.provision "shell", inline: <<-SHELL | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y openjdk-8-jdk | |
apt-get install -y swapspace | |
apt-get install -y unzip | |
echo "export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64'" >> /etc/profile.d/myvar.sh | |
if [ ! -d /vagrant/FrankeNDK ]; then | |
git clone https://github.com/topjohnwu/FrankeNDK.git /vagrant/FrankeNDK | |
echo "export ANDROID_NDK_HOME='/vagrant/FrankeNDK'" >> /etc/profile.d/myvar.sh | |
fi | |
if [ ! -d /vagrant/android-sdk ]; then | |
wget -c https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip -d /vagrant/android-sdk sdk-tools-linux-4333796.zip | |
mkdir /vagrant/android-sdk/licenses | |
echo -e "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > /vagrant/android-sdk/licenses/android-sdk-license | |
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > /vagrant/android-sdk/licenses/android-sdk-preview-license | |
/vagrant/android-sdk/tools/bin/sdkmanager --update | |
/vagrant/android-sdk/tools/bin/sdkmanager "build-tools;29.0.2" "platforms;android-29" "extras;android;m2repository" "extras;google;m2repository" | |
echo "export ANDROID_HOME='/vagrant/android-sdk'" >> /etc/profile.d/myvar.sh | |
fi | |
apt-get autoremove -y | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment