# HG changeset patch # User Rob Landley # Date 1309128172 18000 # Node ID 06f26d3b636ef252ad6757345ce7c8834a752f2d # Parent 6813331320ec54d5320ae9a802c74905fa657b34 Add a FAQ about android. diff -r 6813331320ec -r 06f26d3b636e www/FAQ.html --- a/www/FAQ.html Wed Jun 22 11:46:10 2011 +0200 +++ b/www/FAQ.html Sun Jun 26 17:42:52 2011 -0500 @@ -46,6 +46,7 @@
  • Q: Do you care about windows?

  • Q: What happened to impactlinux.com?

  • +
  • Q: What if I want to play with android?

  • @@ -669,5 +670,69 @@ 2010 when the corporation expired. Due to a miscommunication, this caught me by surprise, and the mailing list archives and subscribers were lost.

    +


    Q: What if I want to play with android?

    + +

    The Aboriginal Linux root filesystem should work just fine under Android's +proprietary Linux kernel fork: you can extract the root-filesystem-armv5l +tarball and chroot on most android hardware and life is good.

    + +

    Integrating Android userspace with Linux userspace is a bit more +complicated: Google decided they didn't want any GPL code in userspace, so they +rewrote the whole root filesystem from scratch. (The end result is missing +many features, and in doing so they opened themselves to a Java +patent lawsuit from Oratroll, we never said it was a _good_ decision.)

    + +

    This means that Android userspace doesn't use glibc or uClibc, it uses +an incompatible BSD-derived library called "bionic". Think "klibc with +threading support" and you're not far off: it's missing a lot of stuff +needed to build most conventional Linux userspace packages against it.

    + +

    However, the Android _kernel_ is mostly Linux. It's a fragmented mix +of several different obsolete forks with lots of garbage added, but Google's +idea of "embedded development" focused on adding stuff to the kernel rather +than removing stuff, so you can mostly ignore the differences. This means +binaries built against uClibc should run on the android kernel just fine: +assuming they're statically linked, or that you install the uClibc shared +libraries (possibly alongside the bionic ones).

    + +

    The other major deficiency of Android is "toolbox", which is their +clone of busybox. (It has nothing to do with toybox, either: that's also +GPL. About half the code and ideas of toybox went upstream into busybox +anyway, the rest is mothballed.)

    + +

    Android's toolbox is crap, and the first thing any serious developer +does is install busybox. Here's the easy way to do that.

    + +

    Download the armv5l prebuilt busybox binary from the busybox website onto your +android device. (These are the binaries Aboriginal Linux makes, but +the busybox website seemed like a better place for an ex-busybox maintainer +to save them than the Aboriginal downloads/binaries directory. You can +grab busybox out of root-filesystem-armv5l if you prefer.)

    + +

    This file is statically linked against uClibc, so it doesn't require +any external dependencies, meaning it should run on an Android system. +Now let's install it:

    + +

    Make a /busybox directory, move the busybox-armv5l binary to +/busybox/busybox (this will both move it and rename it), and "chmod 700 +/busybox/busybox". (The toolbox chmod doesn't understand "u+x", you have +to give it numbers. This is one of the many, many things this procedure +fixes.)

    + +

    Now run "PATH=/busybox busybox sh" to get a real shell prompt with command +history. In that command prompt run this:

    + +
    +
    +for i in $(busybox --list); do ln -s busybox /busybox/$i; done
    +
    +
    + +

    That gives you a /busybox directory full of symlinks to busybox. You're +running in a shell with a $PATH looking at those busybox commands, so any +command you type should run the busybox version.

    + +

    You should be able to take it from there.

    +