- Home
- Projects
- Publications
- Academic
- Research Notes
- Open Source
- Miscellaneous
- SSD Linux benchmarks
- Git cheat sheet
- Home directory version control
- Austrian "Buergerkarte" under Linux
- Debian on a Thinkpad T42p
- (K)Ubuntu on a Dell Latitude XT
- Debian on a Gericom Phantom
- Encrypted home directories
- Automounting with hotplug
- Aladdin eToken under Linux
- Encrypted container under Linux and Windows
- SpeedTouch 330 ADSL USB modem with kernel 2.4
- Combining an open WLAN hotspot with private IPsec
- How to make a USB stick bootable
- Encrypted suspend-to-disk with Debian
- Import old emails into a Cyrus spool
- IPsec/L2TP gateway for Android and iPhone
- Nokia N900 synchronization with Egroupware
- Suspend and wakeup under Linux
- Android applications
- Debian Root CAs for KDE4
Howto create a Debian chroot on an Android phone (HTC Desire and Motorola Milestone)
This page will grow once I have everything running, but this is a starting point:http://www.android-hilfe.de/an
- [HTC Desire, unbranded, European version]: Flashed (pre-rooted and with busybox included) firmware from http://android.modaco.com/cont
ent/htc-desire-desire-modaco-c om/315108/04..., taking file 2.09.405.8-update-bravo-stock- rooted-busybox-withradio-signe d.zip - On a Debian squeeze (amd64, but with i386 it will be similar) box:
- sudo apt-get install debchroot qemu-user
- Download qemu-arm-static from http://packages.ubuntu.com/luc
id/qemu-arm-static (and its dependency) to get the build-arm-chroot script - dd if=/dev/zero of=debian.img bs=1024 count=1950000
- sudo mkfs.ext2 -F debian.img
- sudo tune2fs -c0 debian.img
- mkdir debian
- sudo mount -o loop debian.img debian/
- sudo build-arm-chroot --verbose --arch=armel --foreign squeeze debian http://ftp.de.debian.org/debia
n - sudo mkdir debian/sdcard
- sudo mount -t proc none debian/proc/
- sudo mount -t sysfs sysfs debian/sys/
- sudo mount -t devpts devpts debian/dev/pts
- sudo chroot debian/ /bin/bash
- export HOME=/root
- export USER=root
- export LC_ALL=C
- echo 'deb http://ftp.de.debian.org/debia
n squeeze main contrib non-free' > /etc/apt/sources.list - aptitude update
- aptitude install --without-recommends lxde tightvncserver xfonts-base
- [optional, this is my personal package selection]: aptitude install psmisc nmap aircrack-ng ruby1.8 rubygems driftnet wireshark tshark subversion openssh-client openssh-server git
- aptitude clean
- echo localhost > /etc/hostname
- echo 'nameserver 4.2.2.2' > /etc/resolv.conf
- to create VNC server startup files (setting connect password, I used password 'debian'):
[for HTC Desire]: vncserver -geometry 800x480
[for Motorola Milestone]: vncserver -geometry 854x480 - sed -i 's/\/etc\/X11\/Xsession/lx
session/' /root/.vnc/xstartup - echo > /usr/sbin/lxde <<EOF
#!bin/sh
export USER=root
vncserver -geometry 800x480
EOF - chmod +x /usr/sbin/lxde
- echo > /usr/sbin/klxde <<EOF
#!/bin/sh
killall Xtightvnc && killall lxsession
EOF - chmod +x /usr/sbin/klxde
- killall /usr/bin/qemu-arm-static
- exit
- sudo umount debian/proc
- sudo umount debian/dev/pts
- sudo umount debian/sys
- sudo umount debian/
- Copy this debian.img file to the SD card under a newly created folder "debian".
- Copy the startdeb and stopdeb scripts to the same "debian" folder.
- Deactivate the hard disk mode so that the SD card is again available to Android running on the phone.
- On the mobile phone (e.g. via a "local" shell with ConnectBot or with "adb shell" from the connected Debian box):
- mkdir data/local/debian
- mkdir data/local/debian/mnt
- sh /sdcard/debian/startdeb
- lxde
- Use any local VNC client to connect to localhost, port 5091 using the password set previously
- klxde
- sh /sdcard/debian/stopdeb
