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.


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
wget http://archlinuxarm.org/os/ArchLinuxARM-omap-smp-latest.tar.gz
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.