The idea of this app is a super-simple installer for putting Debian on your Android phone. It requires root, and will probably require Blandroid/Cyanogenmod for the near future. The big advantage over other methods is that the whole thing runs on the phone, you don't need to prepare anything on a different computer. It is also a chroot manager, so it'll mount/umount the image file, and start/stop services. We hope to eventually have the whole Debian init process integrated, and have some things working now.
Download a dev build: https://guardianproject.info/builds/lildebi/
Currently the install process is somewhat fragile because it doesn't handle the Android lifecycle. Your best bet for getting a complete install is to plug in your phone, start the install process, and don't touch the phone while it runs the install. On an HTC Wildfire, it took under an hour to create a 600MB image and install a Debian/stable basic setup.
If the install fails, you can try downloading a pre-built image from the github Downloads: debian-squeeze.img.bz2, bunzip2 it, and copy the debian.img to the SD card.
Once the install has finished, you probably want to use Debian. If you have a terminal, you can start there. We use Android Terminal Emulator. First run
su to get a root shell, then
/data/data/info.guardianproject.lildebi/app_bin/shell to set up the Debian chroot. There are also two shortcuts that might work for you:
/debian/shell. You should see the shell prompt turn to
root@localhost:/#. Now you can install stuff, like sshd is especially useful:
apt-get install ssh then
If you want to use ssh with onion addresses, then install Orbot on your phone, and follow these instructions from Debian/Ubuntu for ssh'ing to your phone: http://www.mancoosi.org/~abate/hidden-ssh-service-tor
Debian gives you a huge array of server software to install and run on your Android device. It is also possible for Lil' Debi to start and stop everything using the
rc scripts that all daemons in Debian install. If you don't want the shutdown procedure to halt/power-off your phone, you need to remove some rc init scripts. This doesn't always work, so when you run stop in Lil' Debi, it might poweroff your phone. We got it working on Blandroid by running these commands in the debian shell (via ssh is probably the easiest):
update-rc.d -f halt remove update-rc.d -f reboot remove
On CyanogenMod, we had to remove a lot more scripts to prevent it from shutting down, like
sendsigs. But then
/etc/init.d/rc 0 no longer shutdown all of the Debian services.
update-rc.d -f halt remove update-rc.d -f reboot remove update-rc.d -f sendsigs remove update-rc.d -f umountfs remove update-rc.d -f umountroot remove
To have Lil' Debi start and stop everything automatically you need to set up the preferences:
apt-get install anything that Debian has to offer, including all sorts of services like HTTP servers, SSH, etc. Here's the start of a catalog of what's working now, and what's known to not work yet.
Android will deny access to processes that listen to network ports and are not running as root. To grant access, the app's UID needs to be added to the group that grants access to create internet ports.
As of version 0.4.4 of Lil' Debi Android /dev/ is not bind-mounted in chroot. This means no /dev/block/, /dev/log/, /dev/graphics/ and such. Bind-mounting it there results in conflict between Android logger and syslog, so syslog users should not do that, unless they have workaround.
Using su -l to login into the chroot may result in unsetting of some important Android variables, such as BOOTCLASSPATH and LD_LIBRARY_PATH. Additionally, if /dev/ isn't bind-mounted some Android executables, such as am, dalvikvm, logcat and many others won't run from inside chroot.
Last edited by Alexander--,