PengDroid: a healthy fusion of Debian and Android
Notice: Now that PengDroid has been rolled into BotBrew, this installation method is now deprecated. You'd get all this, and a package manager GUI, by installing BotBrew "basil".
I love Debian, and I think it's nice to have a chroot environment full of useful tools. However, there's always a barrier keeping Android and Linux from talking to each other. This is why BotBrew
is designed to not rely on a chroot system.
PengDroid is an experimental
chimera of Android and Linux that gives you access to a chrooted Linux userland while preserving access to the Android system.
If this sounds dangerous, let me explain why this is safe. Have a look at the root directory of a Linux system and the root directory of an Android system; notice how they don't overlap much. This means that we could safely map some of the most useful Android directories into the Linux namespace; there's no need to modify the Android side. Let's see the code.
I made a prebuilt archive to demonstrate this method. In exchange for trying, you get a nice Debian chroot. What's not to love?!
- download pengdroid.tgz to your Android device
- unpack it to /data (or /sd-ext): tar zxvf path/to/pengdroid.tgz -C /data
- run it: /data/pengdroid/init
For a quick sanity check, run: getprop ro.product.model
(whoa, Android inside Linux)
Then, for some more fun: apt-get
By default, no repositories are enabled.
Before we start installing packages from Debian, we should actually install Debian. Wait, what?
Right, PengDroid is so small because it packs just enough for us to use dpkg/apt; but many Debian packages assume that we have a complete setup. To bootstrap a minimal Debian installation, run /debian.sh
(which makes the final installed size a whopping 58mb
). If that's too much, keep reading.
Installing a minimal Debian gives us a fairly complete, but still small, *nix system. If we wanted to go even lighter, but still have a reasonably robust setup, we could run the alternative installer: /debian.sh apt
-- which installs a complete dpkg/apt system.
It's a hassle to run /data/pengdroid/init all the time, but we could fix that by making a shortcut:
busybox mount -o remount,rw /system
echo '/data/pengdroid/init -- "$@"' > /system/bin/pengdroid
chmod 0755 /system/bin/pengdroid
Now, we could just prefix everything with pengdroid
, like so: pengdroid python
Or, if we just want a shell: pengdroid