Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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 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".
Running the install
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
Support .onion addresses in Debian
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:
Using LilDebi as a Server
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. Since the Debian shutdown procedure should not halt/power-off your phone, some rc init scripts had to be removed. This doesn't always work, so when you run stop in Lil' Debi, it might poweroff your phone.
For more info, see:
Services that worked for us
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.
not working 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.
If you have a non-root user that cannot access the internet (but the root user can), it may be because the Android kernel setting CONFIG_ANDROID_PARANOID_NETWORK is not granting the user permission because they are not assigned to the correct group. Refer to the Enable inet socket page on this wiki or to this Arch Linux page
check this link if you get
socket error while running tor. Run:
groupadd -g 3003 sockets usermod -g sockets debian-tor
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.
Ideas for improvement
- make it download debootstrap directly from Debian
- make it also build/install Ubuntu
- WiFi Autostart pref - start debian when wifi starts
- Adding various 'Install Profiles'