Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use my android tablet as a dev environment. So far I have created an Arch and Ubuntu img. I can chroot into both just fine and I have created a user using adduser, but I do not know how to log in. The android shell doesn't have schroot and I can't, or if I can I don't know how to, install it.

Is there a way to schroot into a system from the chroot of that same system?

Lastly the reason I prefer this method to SSH is because I cannot connect to the SSH localhost while offline.

share|improve this question
up vote 0 down vote accepted

I found out how to do this by following this tutorial.

Incase something happens with the sight I'll post the method here:

Setup the environment:

cd /data/local/
mkdir arch
cd arch
tar xzf Arch*.tar.gz
rm Arch*.tar.gz
mount -o bind /dev dev
mount -t proc proc proc
mount -t sysfs sysfs sys
ln -s /proc/self/fd dev/fd
echo "nameserver" >> /data/local/arch/etc/resolv.conf

Enter the environment:

chroot . /bin/bash
source /etc/profile
export TERM=xterm-256color
export HOME=/root
mount /dev/pts
pacman -Syuu
useradd -m -G wheel,net_raw lrvick # your username here obviously

This is the part I was missing:

Setup an Init script:


cd /data/local/arch

if ! mountpoint -q dev; then
    mount -t proc /proc proc
    mount -o bind /dev dev
        mount -o bind /dev/pts dev/pts

chroot . /bin/bash -c "source /etc/profile; export HOME=/home/${USER}; export TERM=xterm-256color; clear; su - ${USER}"

worked beautifully. Logged in as user now on every start and can setup my dev environment :D

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .