Install Debian on Android
I always wanted to have a full Linux on my phone, not just a half-baked one such as Android. Then I saw Lil’ Debi, the Debian installer app for Android.
First of all, this app does not really install Debian on your mobile device and replace your Android. It will download the different packages, create a Debian disk image, and when you start it up, it will change root and mount the disk image, and then present you a window to run commands as root. So what you have here is a parallel environment.
After installing it on your device, the first first you would see is:
The screen shows that Debian has not been installed yet. This is just a bootstrapping app, and not a full Linux OS. You have to tell it to install Debian.
Depending on how much space you have on you SD card, you can change the disk space to be allocated to the Debian disk image. I allocated 1000MB. Then press on Install button.
The app will now create a container for the disk image, as shown in the following screen:
Depending on how large a space you allocated, this step would take a few minutes to finish.
After creating the container file, it will create the file systems for the virtual disk:
Now it’s going to download the software packages from the net:
This step will also take a while, depending on the bandwidth and latency of your network. You might want to have your device connected to a power source, just in case it runs out of juice in the middle. When everything is done, you would see the following page:
And you are left with the question: now what?
Well, that’s it. Debian is installed, and you have all the commands to work it. You are presented with a small input window to enter the command you want to execute. The middle section is just a scrolling output console. When you run a command, the output will be shown here. Here is the output for listing directories:
You can also install other software packages the Debian way, with aptitude. You can even start up SSH server with the command:
service ssh start
And stop the SSH server with:
service ssh stop
Ok, now that you can run the commands, but how useful is this? Not very. Why? Because this is not an interactive terminal console, that means you won’t be able to interact on the command line. The input box takes your command, send to Android VM to be executed in a separate thread, then pipe the output to the output console above.
It would have been so much more useful if this is a real terminal emulator. Anyway, you got the idea. Therefore, to fully use it, you have to install a terminal emulator, such as the Android Terminal Emulator.
If you have a terminal emulator, start it up, and run
first to get a root shell. Then run
to setup Debian chroot. Now you are good to go, it’s as if you have a Linux computer in your pocket. There are certain limitations, of course, e.g. you won’t be able to get any information from
/proc. But besides that, it is as good as you can get.
The installation went smoothly, and it’s quite intuitive. However, as good as it is, you still feel like it’s not a full Linux environment, not because you can’t run GUI applications, but because of the limitations of the packaging and layout. To have a more complete layout, you have to manually bind mount a few mount points, so that you can access from the chroot Linux environment, including
To stop the app, press on the Stop Debian button. It will umount everything, leaving you with the disk image file:
Note that before stopping it, you need to shutdown any service that is running, otherwise, it has trouble unmounting the disk.
That’s it. Have fun. There are other Linux installers out there, I’m going to try out more and report them here.