Running Debian Armhf alongside Android

I used Debian Kit for Android with some changes.

First, I am using a loop disk file with 4Gb size. This is possible in Google Nexus tablet because it is not using the vfat file system for the external storage.

Follow the instruction for manual installation in Debian Kit. The archive will be extracted to the /data/local/deb directory.

I modify the mk-debian file:

Change the default LOOPSIZE TO 4095

1     # Preset some defaults
2 ACTION=install

and in later part of the script, it does a size check to prevent size of 2048Mb or bigger. Need to change the 2048 to a number that is bigger than the size I need, eg 4096.

1 	if [ -z "${LOOPSIZE}" ] || [ "${LOOPSIZE}" -lt 512 ] || [ "${LOOPSIZE}" -ge 4096 ];then
2 echo "You need to specify loop disk file size in Megabyte (512-2047)." >&2
3 exit 1
4 fi

Second, I am using Debian Wheezy armhf instead of the default Debian Squeeze. I modify the mk-debian file:

Change the default DISTRO TO wheezy

1     DISTRO=wheezy

and also modify the "case ${DISTRO} in squeeze)" to wheezy or to include wheezy

1     case ${DISTRO} in squeeze|wheezy)
3 DISTRO_COM="main non-free contrib"
4 DISTRO_SEC="updates"
5 DISTRO_UPD=" ${DISTRO}/updates"

and change the "--arch ${CPU}" argument to "--arch armhf" in the debootstrap line below.

1     SUCCESS=no
2 if PATH=/usr/sbin:/usr/bin:/sbin:/bin chroot ${MNT} debootstrap --no-check-gpg --verbose --arch armhf --foreign ${DISTRO} /new-root ${DISTRO_URL};then
3 test -d ${MNT}/new-root && SUCCESS=yes
4 fi

At the time of my installation, there is a newer version of debootstrap which I downloaded and place it in the same directory. I change the script to use the newer version of debootstrap. In my case, I replace all occurrence of debootstrap_1.0.38_all.deb by debootstrap_1.0.44_all.deb (the version I have downloaded)

Run the manual installation with:

1     mk-debian 

After the installation is completed, you can activate Debian in the shell using deb . This will mount the Debian loop disk file /sdcard/debian.img and we will have the expected Linux file system alongside the Android file system.

1     deb

In the bash root shell, type apt-get update and apt-get upgrade to get the latest Debian security updates. Also enter apt-get install andromize to install a package that adds Android specific user groups, changes some defaults for the "adduser" command.

And to unmount the Debian file system, type deb u .

The andromize package is from , the problem is it does not support wheezy or armhf.

You can download it from and install it.
(To clarify, I did not install its dependencies)

1     # dpkg --force-depends -i andromize_0.2-3_all.deb

Ignore all the warning messages. The users and groups are added by the postinst script of the andromize package. After installing the package, one can delete it with:

1     # dpkg --purge andromize

Also, the file /etc/apt/sources.list.d/sven-ola.list can be removed.

For X server, one can install tightvncserver, and then use the android-vnc-viewer, the open source VNC viewer for Android platform to connect to the X server.

I suggest now to replace the above tightvncserver & Android VNC viewer with the Android X server (XServer XSDL).


blog comments powered by Disqus