The Webkey Terminal feature enable real-time pseudo terminal access to your Android devices. In this tutorial we will demonstrate how to install and run Debian Linux applications on your Android in chroot jail environment.
To make it work, you will need:
- A rooted Android device
- Debian Linux distribution on your PC
- Installed applications on your PC: chroot, qemu-user-static
- Webkey Client App (Free)
Prepare the chroot environment on the PC
- On the PC, create a folder and generate a formatted, mountable image.
- Install a Debian Buster linux inside the chroot environment with the debootstrap command.
- Upload this image (debian.img) to your web server to download it later
mkdir -p webkey/tutorial
cd webkey/tutorial
dd if=/dev/zero of=debian.img bs=1024 count=614400
sudo mkfs.ext2 -F debian.img
sudo tune2fs -c0 debian.img
mkdir debian
sudo mount -o loop debian.img debian/
sudo debootstrap --verbose --foreign --arch armel buster debian http://ftp.de.debian.org/debian
sudo chroot debian
export LC_ALL=C
debootstrap/debootstrap --second-stage
On your Android device
- Download the Webkey Client App to your device
- Install and register an account
On your PC
- Open https://webkey.cc/dashboard/ and sign in to your account
- Select your device from the list and launch the terminal
- Create a new folder and download the image file created earlier (debian.img)
su cd /data/media/0 mkdir debian curl -s -k https://webkey.cc/public/chroot/debian_arm.img > debian.img
- Mount the image and use busybox to change chroot to this environment
mount -t ext2 -o loop debian.img debian curl -s -k https://webkey.cc/public/chroot/busybox > busybox chmod 755 busybox ./busybox chroot debian /usr/bin/bash
- Now you can act as a Debian distribution
Try running Midnight Commander as an example. How cool is that? 💪