Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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:

su
bash
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 8.8.8.8" >> /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:

USER='lrvick'

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
fi

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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