Created
September 19, 2012 13:07
-
-
Save joekickass/3749558 to your computer and use it in GitHub Desktop.
Schroot for Android development
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
[ubuntu-lucid] | |
description=Ubuntu | |
type=directory | |
directory=/var/chroot/ubuntu | |
users=myusername | |
root-users=myusername | |
aliases=lucid,default |
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
sudo debootstrap --arch amd64 lucid </path/to/target/directory/> http://au.archive.ubuntu.com/ubuntu/ | |
# E.g. sudo debootstrap --arch amd64 lucid /var/chroot/ubuntu http://au.archive.ubuntu.com/ubuntu/ |
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
mkdir ~/tmpdir && cd ~/tmpdir | |
wget https://aur.archlinux.org/packages/de/debootstrap/debootstrap.tar.gz | |
tar -zxvf debootstrap.tar.gz | |
cd debootstrap | |
makepkg | |
sudo pacman -U debootstrap-1.0.42-1-any.pkg.tar.xz | |
cd ~ |
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
cd /opt | |
cp <path/to/downloaded java installer> /opt | |
chmod 755 jdk-6u35-linux-x64.bin | |
./jdk-6u35-linux-x64.bin | |
update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.6.0_35/jre/bin/java" 1 | |
update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk1.6.0_35/bin/javac" 1 | |
update-alternatives --set java /opt/jdk1.6.0_35/jre/bin/java | |
update-alternatives --set javac /opt/jdk1.6.0_35/bin/javac |
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
pacman -S schroot |
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
apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc | |
ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so |
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
# Exit schroot as user root | |
exit | |
# Enter schroot as user <username> | |
schroot -c ubuntu-lucid -u <username> | |
# Set path to JDK (for finding e.g. jar) | |
export PATH=/opt/jdk1.6.0_35/bin:$PATH |
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
# System databases to copy into the chroot from the host system. | |
# | |
# <database name> | |
passwd | |
shadow | |
group | |
gshadow | |
services | |
protocols | |
#networks | |
hosts |
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
schroot -c ubuntu-lucid -u root |
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
############################################################# | |
################### OFFICIAL UBUNTU REPOS ################### | |
############################################################# | |
###### Ubuntu Main Repos | |
deb http://se.archive.ubuntu.com/ubuntu/ lucid main universe multiverse | |
###### Ubuntu Update Repos | |
deb http://se.archive.ubuntu.com/ubuntu/ lucid-security main universe multiverse | |
deb http://se.archive.ubuntu.com/ubuntu/ lucid-updates main universe multiverse | |
###### Ubuntu Partner Repo | |
deb http://archive.canonical.com/ubuntu lucid partner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment