-
-
Notifications
You must be signed in to change notification settings - Fork 55
Home
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/
To try it on your device, first check if it is supported: Supported Devices. If you try it and find if it works for you, then please update the Supported Devices page with the info about your device.
- currently needs a phone with ext2 support (Cyanogenmod, Nexus S?, phones that use ext4)
- 128MB bare minimum image, just to get things installed
- 256MB minimum image for something useful
- You can enlarge the image after the fact with "truncate /mnt/sdcard/debian.img -s NEWSIZE", followed by stopping and restarting LilDebian, followed by "resize2fs /dev/loop7".
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
and /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 /etc/init.d/ssh start
.
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:
- Post-start Script:
/etc/init.d/rc 2
- Pre-stop Script:
/etc/init.d/rc 0
You can 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.
- sshd
- dropbear
- lighttpd
- nginx
- samba
- quasselcore
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.
- apache
- jabberd14
- ejabberd
- polipo/tor
- make it download debootstrap directly from Debian
- make it also build/install Ubuntu
- ability to build a yaffs2 image/partition (then it'll work on any Android device)
- check supported filesystems and offer them as options (CM supports ext2, Nexus S supports ext4, etc.)
- allow filesystem select in setup (eg. ext2, ext3, ext4, yaffs2?)
- WiFi Autostart pref - start debian when wifi starts